diff --git a/Library/lua/LuaManager.cpp b/Library/lua/LuaManager.cpp index dac3b79c..8ff5b151 100644 --- a/Library/lua/LuaManager.cpp +++ b/Library/lua/LuaManager.cpp @@ -17,7 +17,7 @@ lua_State* LuaManager::m_pState = 0; void LuaManager::Init() { - if(m_pState == 0) + if (m_pState == 0) { // initialize Lua m_pState = lua_open(); diff --git a/Library/lua/LuaPush.cpp b/Library/lua/LuaPush.cpp index a103d5e8..4025edc1 100644 --- a/Library/lua/LuaPush.cpp +++ b/Library/lua/LuaPush.cpp @@ -3,21 +3,19 @@ #include "../Litestep.h" -void push_wstring (lua_State* L, void* value, const char* type) +void push_wstring(lua_State* L, void* value, const char* type) { - std::string str2 = std::string( ConvertToAscii((const wchar_t*)value) ); + std::string str2 = std::string(ConvertToAscii((const wchar_t*)value)); lua_pushstring(L,str2.c_str()); } - -void push_wchar (lua_State* L, void* value, const char* type) +void push_wchar(lua_State* L, void* value, const char* type) { - std::string str2 = ConvertToAscii( (WCHAR*) value ); + std::string str2 = ConvertToAscii((WCHAR*)value); lua_pushstring(L,str2.c_str()); } - -std::wstring to_wstring (lua_State* L, int arg, void* type) +std::wstring to_wstring(lua_State* L, int arg, void* type) { // We have a static wstring here so we can keep a copy of the string // passed in alive while its being passed around. @@ -25,7 +23,7 @@ std::wstring to_wstring (lua_State* L, int arg, void* type) // Rainmeter isn't threaded. static std::wstring str2 = std::wstring(L""); - str2 = ConvertToWide( lua_tostring(L,arg) ); + str2 = ConvertToWide(lua_tostring(L,arg)); return str2; } @@ -38,17 +36,17 @@ const wchar_t* to_wchar (lua_State* L, int arg, void* type) // Rainmeter isn't threaded. static std::wstring str = std::wstring(L""); - str = ConvertToWide( lua_tostring(L,arg) ); + str = ConvertToWide(lua_tostring(L,arg)); return str.c_str(); } -int is_wstring (lua_State* L, int lo, const char* type, int def, tolua_Error* err) +int is_wstring(lua_State* L, int lo, const char* type, int def, tolua_Error* err) { return is_wchar(L,lo,type,def,err); } -int is_wchar (lua_State* L, int lo, const char* type, int def, tolua_Error* err) +int is_wchar(lua_State* L, int lo, const char* type, int def, tolua_Error* err) { if (def && lua_gettop(L)