diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-01-12 05:46:01 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-01-12 05:46:01 +0100 |
commit | 43e684071933adef93040e8d4b830d5c6b71cf9a (patch) | |
tree | 014e5300feb1cdbbb8f24e4e42594eeb841f0be2 /source/WebPlugin.cpp | |
parent | Fixed rclk in doublechests (diff) | |
download | cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.gz cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.bz2 cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.lz cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.xz cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.zst cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.zip |
Diffstat (limited to '')
-rw-r--r-- | source/WebPlugin.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/source/WebPlugin.cpp b/source/WebPlugin.cpp index 93619ef14..343ca64fa 100644 --- a/source/WebPlugin.cpp +++ b/source/WebPlugin.cpp @@ -12,9 +12,11 @@ cWebPlugin::cWebPlugin() { - LOG("cWebPlugin::cWebPlugin()"); - cWebAdmin* WebAdmin = cRoot::Get()->GetWebAdmin(); - if( WebAdmin ) WebAdmin->AddPlugin( this ); + cWebAdmin * WebAdmin = cRoot::Get()->GetWebAdmin(); + if (WebAdmin != NULL) + { + WebAdmin->AddPlugin(this); + } } @@ -23,11 +25,13 @@ cWebPlugin::cWebPlugin() cWebPlugin::~cWebPlugin() { - LOG("~cWebPlugin::cWebPlugin()"); - cWebAdmin* WebAdmin = cRoot::Get()->GetWebAdmin(); - if( WebAdmin ) WebAdmin->RemovePlugin( this ); + cWebAdmin * WebAdmin = cRoot::Get()->GetWebAdmin(); + if (WebAdmin != NULL) + { + WebAdmin->RemovePlugin(this); + } - for( TabList::iterator itr = m_Tabs.begin(); itr != m_Tabs.end(); ++itr ) + for (TabList::iterator itr = m_Tabs.begin(); itr != m_Tabs.end(); ++itr) { delete *itr; } @@ -38,7 +42,7 @@ cWebPlugin::~cWebPlugin() -std::list< std::pair<AString, AString> > cWebPlugin::GetTabNames() +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 ) @@ -55,7 +59,7 @@ std::list< std::pair<AString, AString> > cWebPlugin::GetTabNames() -std::pair< AString, AString > cWebPlugin::GetTabNameForRequest( HTTPRequest* a_Request ) +std::pair< AString, AString > cWebPlugin::GetTabNameForRequest(HTTPRequest * a_Request) { std::pair< AString, AString > Names; AStringVector Split = StringSplit(a_Request->Path, "/"); |