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:
kai
2012-08-03 06:32:23 +02:00
parent 2dbee75523
commit 311297b096
8 changed files with 18 additions and 18 deletions

View File

@@ -129,7 +129,7 @@ IrFunction::IrFunction(FuncDeclaration* fd)
Type* t = fd->type->toBasetype();
assert(t->ty == Tfunction);
type = (TypeFunction*)t;
type = static_cast<TypeFunction*>(t);
func = NULL;
allocapoint = NULL;