Change NULL to nullptr

This commit is contained in:
Birunthan Mohanathas
2013-05-31 17:28:39 +03:00
parent da9384cfad
commit 1934c5db72
92 changed files with 760 additions and 759 deletions

View File

@ -26,7 +26,7 @@ lua_State* LuaManager::c_State = 0;
void LuaManager::Initialize()
{
if (c_State == NULL)
if (c_State == nullptr)
{
// Initialize Lua
c_State = luaL_newstate();
@ -50,10 +50,10 @@ void LuaManager::Finalize()
--c_RefCount;
}
if (c_RefCount == 0 && c_State != NULL)
if (c_RefCount == 0 && c_State != nullptr)
{
lua_close(c_State);
c_State = NULL;
c_State = nullptr;
}
}

View File

@ -60,7 +60,7 @@ bool LuaScript::Initialize(const std::wstring& scriptFile)
fread(fileData, fileSize, 1, file);
fclose(file);
file = NULL;
file = nullptr;
int load = luaL_loadbuffer(L, fileData, fileSize, "");
delete [] fileData;
@ -209,7 +209,7 @@ int LuaScript::RunFunctionWithReturn(const char* funcName, double& numValue, std
size_t strLen = 0;
const char* str = lua_tolstring(L, -1, &strLen);
strValue = StringUtil::Widen(str, (int)strLen);
numValue = strtod(str, NULL);
numValue = strtod(str, nullptr);
}
lua_pop(L, 2);

View File

@ -37,7 +37,7 @@ static int Print(lua_State* L)
// Get result
const char* s = lua_tostring(L, -1);
if (s == NULL)
if (s == nullptr)
{
return luaL_error(L, LUA_QL("tostring") " must return a string to " LUA_QL("print"));
}
@ -73,7 +73,7 @@ void LuaManager::RegisterGlobal(lua_State* L)
const luaL_Reg toluaFuncs[] =
{
{ "cast", tolua_cast },
{ NULL, NULL }
{ nullptr, nullptr }
};
luaL_register(L, "tolua", toluaFuncs);

View File

@ -147,7 +147,7 @@ void LuaManager::RegisterMeasure(lua_State* L)
{ "GetMinValue", GetMinValue },
{ "GetMaxValue", GetMaxValue },
{ "GetStringValue", GetStringValue },
{ NULL, NULL }
{ nullptr, nullptr }
};
luaL_register(L, "Measure", functions);

View File

@ -164,7 +164,7 @@ void LuaManager::RegisterMeter(lua_State* L)
{ "Hide", Hide },
{ "Show", Show },
{ "SetText", SetText },
{ NULL, NULL }
{ nullptr, nullptr }
};
luaL_register(L, "Meter", functions);

View File

@ -228,7 +228,7 @@ void LuaManager::RegisterMeterWindow(lua_State* L)
{ "GetX", GetX },
{ "GetY", GetY },
{ "MakePathAbsolute", MakePathAbsolute },
{ NULL, NULL }
{ nullptr, nullptr }
};
luaL_register(L, "MeterWindow", functions);