From eb730d72d76a22edcd289d627e90d637725b5c8e Mon Sep 17 00:00:00 2001 From: psychon Date: Sun, 2 Jan 2011 10:46:46 +0000 Subject: [PATCH] notes: Remove a pointless "if" When you load /mods/notes/ in your browser, OnWebRequest will be called with sPageName == "index". So that variable can never actually be empty. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2240 726aef4b-f618-498e-8847-2d620e286838 --- modules/notes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/notes.cpp b/modules/notes.cpp index 806fcb05..c4e5e046 100644 --- a/modules/notes.cpp +++ b/modules/notes.cpp @@ -165,7 +165,7 @@ public: } virtual bool OnWebRequest(CWebSock& WebSock, const CString& sPageName, CTemplate& Tmpl) { - if (sPageName.empty() || sPageName == "index") { + if (sPageName == "index") { for (MCString::iterator it = BeginNV(); it != EndNV(); ++it) { CTemplate& Row = Tmpl.AddRow("NotesLoop");