diff options
Diffstat (limited to 'src/Bindings')
-rw-r--r-- | src/Bindings/ManualBindings.cpp | 22 | ||||
-rw-r--r-- | src/Bindings/PluginManager.cpp | 2 | ||||
-rw-r--r-- | src/Bindings/WebPlugin.cpp | 10 |
3 files changed, 17 insertions, 17 deletions
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp index 4047adc3a..5e9e7349d 100644 --- a/src/Bindings/ManualBindings.cpp +++ b/src/Bindings/ManualBindings.cpp @@ -656,12 +656,12 @@ template< static int tolua_ForEach(lua_State * tolua_S) { int NumArgs = lua_gettop(tolua_S) - 1; /* This includes 'self' */ - if( NumArgs != 1 && NumArgs != 2) + if ((NumArgs != 1) && (NumArgs != 2)) { return lua_do_error(tolua_S, "Error in function call '#funcname#': Requires 1 or 2 arguments, got %i", NumArgs); } - Ty1 * self = (Ty1 *) tolua_tousertype(tolua_S, 1, NULL); + Ty1 * self = (Ty1 *)tolua_tousertype(tolua_S, 1, NULL); if (self == NULL) { return lua_do_error(tolua_S, "Error in function call '#funcname#': Not called on an object instance"); @@ -1360,7 +1360,7 @@ static int tolua_cPluginManager_AddHook(lua_State * tolua_S) static int tolua_cPluginManager_ForEachCommand(lua_State * tolua_S) { int NumArgs = lua_gettop(tolua_S) - 1; /* This includes 'self' */ - if( NumArgs != 1) + if (NumArgs != 1) { LOGWARN("Error in function call 'ForEachCommand': Requires 1 argument, got %i", NumArgs); return 0; @@ -1437,7 +1437,7 @@ static int tolua_cPluginManager_ForEachCommand(lua_State * tolua_S) static int tolua_cPluginManager_ForEachConsoleCommand(lua_State * tolua_S) { int NumArgs = lua_gettop(tolua_S) - 1; /* This includes 'self' */ - if( NumArgs != 1) + if (NumArgs != 1) { LOGWARN("Error in function call 'ForEachConsoleCommand': Requires 1 argument, got %i", NumArgs); return 0; @@ -1938,16 +1938,16 @@ static int tolua_cPluginLua_AddWebTab(lua_State * tolua_S) return tolua_do_error(tolua_S, "#ferror calling function '#funcname#'", &tolua_err); } - if( Reference != LUA_REFNIL ) + if (Reference != LUA_REFNIL) { - if( !self->AddWebTab( Title.c_str(), tolua_S, Reference ) ) + if (!self->AddWebTab(Title.c_str(), tolua_S, Reference)) { - luaL_unref( tolua_S, LUA_REGISTRYINDEX, Reference ); + luaL_unref(tolua_S, LUA_REGISTRYINDEX, Reference); } } else { - LOGERROR("ERROR: cPluginLua:AddWebTab invalid function reference in 2nd argument (Title: \"%s\")", Title.c_str() ); + LOGWARNING("cPluginLua:AddWebTab: invalid function reference in 2nd argument (Title: \"%s\")", Title.c_str()); } return 0; @@ -2016,7 +2016,7 @@ static int tolua_push_StringStringMap(lua_State* tolua_S, std::map< std::string, lua_newtable(tolua_S); int top = lua_gettop(tolua_S); - for( std::map< std::string, std::string >::iterator it = a_StringStringMap.begin(); it != a_StringStringMap.end(); ++it ) + for (std::map<std::string, std::string>::iterator it = a_StringStringMap.begin(); it != a_StringStringMap.end(); ++it) { const char* key = it->first.c_str(); const char* value = it->second.c_str(); @@ -2060,7 +2060,7 @@ static int tolua_get_HTTPRequest_FormData(lua_State* tolua_S) lua_newtable(tolua_S); int top = lua_gettop(tolua_S); - for( std::map< std::string, HTTPFormData >::iterator it = FormData.begin(); it != FormData.end(); ++it ) + for (std::map<std::string, HTTPFormData>::iterator it = FormData.begin(); it != FormData.end(); ++it) { lua_pushstring(tolua_S, it->first.c_str() ); tolua_pushusertype(tolua_S, &(it->second), "HTTPFormData" ); @@ -2109,7 +2109,7 @@ static int tolua_cWebPlugin_GetTabNames(lua_State * tolua_S) lua_newtable(tolua_S); int index = 1; cWebPlugin::TabNameList::const_iterator iter = TabNames.begin(); - while(iter != TabNames.end()) + while (iter != TabNames.end()) { const AString & FancyName = iter->first; const AString & WebName = iter->second; diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp index 2c0ce701b..33ecb95ad 100644 --- a/src/Bindings/PluginManager.cpp +++ b/src/Bindings/PluginManager.cpp @@ -1434,7 +1434,7 @@ cPluginManager::CommandResult cPluginManager::HandleCommand(cPlayer * a_Player, cPlugin * cPluginManager::GetPlugin( const AString & a_Plugin ) const { - for( PluginMap::const_iterator itr = m_Plugins.begin(); itr != m_Plugins.end(); ++itr ) + for (PluginMap::const_iterator itr = m_Plugins.begin(); itr != m_Plugins.end(); ++itr) { if (itr->second == NULL ) continue; if (itr->second->GetName().compare(a_Plugin) == 0) diff --git a/src/Bindings/WebPlugin.cpp b/src/Bindings/WebPlugin.cpp index 57ed9f6a4..a22826d1b 100644 --- a/src/Bindings/WebPlugin.cpp +++ b/src/Bindings/WebPlugin.cpp @@ -45,7 +45,7 @@ cWebPlugin::~cWebPlugin() std::list<std::pair<AString, AString> > cWebPlugin::GetTabNames(void) { std::list< std::pair< AString, AString > > NameList; - for( TabList::iterator itr = GetTabs().begin(); itr != GetTabs().end(); ++itr ) + for (TabList::iterator itr = GetTabs().begin(); itr != GetTabs().end(); ++itr ) { std::pair< AString, AString > StringPair; StringPair.first = (*itr)->Title; @@ -69,7 +69,7 @@ std::pair< AString, AString > cWebPlugin::GetTabNameForRequest(const HTTPRequest sWebPluginTab * Tab = NULL; if (Split.size() > 2) // If we got the tab name, show that page { - for( TabList::iterator itr = GetTabs().begin(); itr != GetTabs().end(); ++itr ) + for (TabList::iterator itr = GetTabs().begin(); itr != GetTabs().end(); ++itr ) { if ((*itr)->SafeTitle.compare(Split[2]) == 0) // This is the one! { @@ -80,7 +80,7 @@ std::pair< AString, AString > cWebPlugin::GetTabNameForRequest(const HTTPRequest } else // Otherwise show the first tab { - if( GetTabs().size() > 0 ) + if (GetTabs().size() > 0 ) Tab = *GetTabs().begin(); } @@ -100,10 +100,10 @@ std::pair< AString, AString > cWebPlugin::GetTabNameForRequest(const HTTPRequest AString cWebPlugin::SafeString(const AString & a_String) { AString RetVal; - for( unsigned int i = 0; i < a_String.size(); ++i ) + for (unsigned int i = 0; i < a_String.size(); ++i ) { char c = a_String[i]; - if( c == ' ' ) + if (c == ' ' ) { c = '_'; } |