mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-20 11:01:49 +01: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:
@@ -20,7 +20,7 @@ static LLValue* to_keyti(DValue* aa)
|
||||
{
|
||||
// keyti param
|
||||
assert(aa->type->toBasetype()->ty == Taarray);
|
||||
TypeAArray * aatype = (TypeAArray*)aa->type->toBasetype();
|
||||
TypeAArray * aatype = static_cast<TypeAArray*>(aa->type->toBasetype());
|
||||
return DtoTypeInfoOf(aatype->index, false);
|
||||
}
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user