Disabled RTTI and removed dynamic_cast

This commit is contained in:
Birunthan Mohanathas
2012-04-09 19:45:54 +03:00
parent c6a382f4ab
commit 7168634bb6
50 changed files with 161 additions and 16 deletions

View File

@ -137,10 +137,11 @@ static int Show(lua_State* L)
static int SetText(lua_State* L)
{
CMeter* self = GetSelf(L);
if (CMeterString* stringMeter = dynamic_cast<CMeterString*>(self))
if (self->GetTypeID() == TypeID<CMeterString>())
{
CMeterString* string = (CMeterString*)self;
std::wstring str = LuaManager::ToWide(L, 2);
stringMeter->SetText(str.c_str());
string->SetText(str.c_str());
}
return 0;