mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-05 22:43:13 +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:
@@ -411,7 +411,7 @@ static void DtoCreateNestedContextType(FuncDeclaration* fd) {
|
||||
size_t nnest = fd->closureVars.dim;
|
||||
for (size_t i = 0; i < nnest; ++i)
|
||||
{
|
||||
VarDeclaration* vd = (VarDeclaration*)fd->closureVars.data[i];
|
||||
VarDeclaration* vd = static_cast<VarDeclaration*>(fd->closureVars.data[i]);
|
||||
fd->nestedVars.insert(vd);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user