Skip to content

Commit 975402c

Browse files
committed
Formatting
1 parent 878e690 commit 975402c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

libcxxabi/src/private_typeinfo.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ void dyn_cast_get_derived_info(derived_object_info* info, const void* static_ptr
114114
reinterpret_cast<const uint8_t*>(vtable) + offset_to_ti_proxy;
115115
info->dynamic_type = *(reinterpret_cast<const __class_type_info* const*>(ptr_to_ti_proxy));
116116
#else
117-
void **vtable = strip_vtable(*static_cast<void ** const *>(static_ptr));
118-
info->offset_to_derived = reinterpret_cast<ptrdiff_t>(vtable[-2]);
119-
info->dynamic_ptr = static_cast<const char*>(static_ptr) + info->offset_to_derived;
120-
info->dynamic_type = static_cast<const __class_type_info*>(vtable[-1]);
117+
void** vtable = strip_vtable(*static_cast<void** const*>(static_ptr));
118+
info->offset_to_derived = reinterpret_cast<ptrdiff_t>(vtable[-2]);
119+
info->dynamic_ptr = static_cast<const char*>(static_ptr) + info->offset_to_derived;
120+
info->dynamic_type = static_cast<const __class_type_info*>(vtable[-1]);
121121
#endif
122122
}
123123

@@ -1512,8 +1512,8 @@ __base_class_type_info::search_above_dst(__dynamic_cast_info* info,
15121512
ptrdiff_t offset_to_base = __offset_flags >> __offset_shift;
15131513
if (__offset_flags & __virtual_mask)
15141514
{
1515-
const char* vtable = strip_vtable(*static_cast<const char*const*>(current_ptr));
1516-
offset_to_base = update_offset_to_base(vtable, offset_to_base);
1515+
const char* vtable = strip_vtable(*static_cast<const char* const*>(current_ptr));
1516+
offset_to_base = update_offset_to_base(vtable, offset_to_base);
15171517
}
15181518
__base_type->search_above_dst(info, dst_ptr,
15191519
static_cast<const char*>(current_ptr) + offset_to_base,
@@ -1532,8 +1532,8 @@ __base_class_type_info::search_below_dst(__dynamic_cast_info* info,
15321532
ptrdiff_t offset_to_base = __offset_flags >> __offset_shift;
15331533
if (__offset_flags & __virtual_mask)
15341534
{
1535-
const char* vtable = strip_vtable(*static_cast<const char*const*>(current_ptr));
1536-
offset_to_base = update_offset_to_base(vtable, offset_to_base);
1535+
const char* vtable = strip_vtable(*static_cast<const char* const*>(current_ptr));
1536+
offset_to_base = update_offset_to_base(vtable, offset_to_base);
15371537
}
15381538
__base_type->search_below_dst(info,
15391539
static_cast<const char*>(current_ptr) + offset_to_base,

0 commit comments

Comments
 (0)