From 44d28163797f5df52663918121ff24304e4c3350 Mon Sep 17 00:00:00 2001 From: psychon Date: Sun, 2 Jan 2011 16:33:42 +0000 Subject: [PATCH] Remove some more pointless checks for sPageName.empty() git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2241 726aef4b-f618-498e-8847-2d620e286838 --- modules/extra/listsockets.cpp | 2 +- modules/lastseen.cpp | 2 +- modules/stickychan.cpp | 2 +- modules/webadmin.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/extra/listsockets.cpp b/modules/extra/listsockets.cpp index 697612db..f6d9c577 100644 --- a/modules/extra/listsockets.cpp +++ b/modules/extra/listsockets.cpp @@ -94,7 +94,7 @@ public: virtual CString GetWebMenuTitle() { return "List sockets"; } virtual bool OnWebRequest(CWebSock& WebSock, const CString& sPageName, CTemplate& Tmpl) { - if (sPageName.empty() || sPageName == "index") { + if (sPageName == "index") { if (CZNC::Get().GetManager().empty()) { return false; } diff --git a/modules/lastseen.cpp b/modules/lastseen.cpp index f8451b9a..e8fe09ff 100644 --- a/modules/lastseen.cpp +++ b/modules/lastseen.cpp @@ -94,7 +94,7 @@ public: virtual CString GetWebMenuTitle() { return "Last Seen"; } virtual bool OnWebRequest(CWebSock& WebSock, const CString& sPageName, CTemplate& Tmpl) { - if (sPageName.empty() || sPageName == "index") { + if (sPageName == "index") { CModules& GModules = CZNC::Get().GetModules(); Tmpl["WebAdminLoaded"] = CString(GModules.FindModule("webadmin") != NULL); diff --git a/modules/stickychan.cpp b/modules/stickychan.cpp index aa4976b1..814650ab 100644 --- a/modules/stickychan.cpp +++ b/modules/stickychan.cpp @@ -104,7 +104,7 @@ public: virtual CString GetWebMenuTitle() { return "Sticky Chans"; } virtual bool OnWebRequest(CWebSock& WebSock, const CString& sPageName, CTemplate& Tmpl) { - if (sPageName.empty() || sPageName == "index") { + if (sPageName == "index") { bool bSubmitted = (WebSock.GetParam("submitted").ToInt() != 0); const vector& Channels = m_pUser->GetChans(); diff --git a/modules/webadmin.cpp b/modules/webadmin.cpp index 96257c4a..b85a75b3 100644 --- a/modules/webadmin.cpp +++ b/modules/webadmin.cpp @@ -481,7 +481,7 @@ public: return ListUsersPage(WebSock, Tmpl); } else if (sPageName == "traffic" && spSession->IsAdmin()) { return TrafficPage(WebSock, Tmpl); - } else if (sPageName.empty() || sPageName == "index") { + } else if (sPageName == "index") { return true; }