mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-08-11 00:40:04 +02:00
Prefer C++-style casts.
This is based on Item 2 of "More Effective C++". In general, the C++ cast operators are more expressive and easy to find, e.g. by grep. Using const_cast also shuts up some compiler warnings.
This commit is contained in:
@@ -18,7 +18,7 @@ RTTIBuilder::RTTIBuilder(AggregateDeclaration* base_class)
|
||||
base_class->codegen(Type::sir);
|
||||
|
||||
base = base_class;
|
||||
basetype = (TypeClass*)base->type;
|
||||
basetype = static_cast<TypeClass*>(base->type);
|
||||
|
||||
baseir = base->ir.irStruct;
|
||||
assert(baseir && "no IrStruct for TypeInfo base class");
|
||||
|
||||
Reference in New Issue
Block a user