diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-18 18:42:17 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-18 18:42:17 +0000 |
commit | 59427ca7f163c39acab3853f22ab23cc11b92606 (patch) | |
tree | 9065fec357bac87ecba56b8bf0f0f69a5df456b9 | |
parent | dc92b9996c92cfcafb7347e8e1c97e16ffd4e746 (diff) |
std::string something = "";
is the most redundant and wasteful thing in the world, apart from unrealircd. BE GONE WITH IT!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6046 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/helperfuncs.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 842a6a4ca..dab21744a 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -76,7 +76,7 @@ void InspIRCd::Log(int level, const std::string &text) std::string InspIRCd::GetServerDescription(const char* servername) { - std::string description = ""; + std::string description; FOREACH_MOD_I(this,I_OnGetServerDescription,OnGetServerDescription(servername,description)); @@ -238,12 +238,7 @@ userrec* InspIRCd::FindNick(const std::string &nick) userrec* InspIRCd::FindNick(const char* nick) { - user_hash::iterator iter; - - if (!nick) - return NULL; - - iter = clientlist.find(nick); + user_hash::iterator iter = clientlist.find(nick); if (iter == clientlist.end()) return NULL; @@ -255,12 +250,7 @@ userrec* InspIRCd::FindNick(const char* nick) chanrec* InspIRCd::FindChan(const char* chan) { - chan_hash::iterator iter; - - if (!chan) - return NULL; - - iter = chanlist.find(chan); + chan_hash::iterator iter = chanlist.find(chan); if (iter == chanlist.end()) /* Couldn't find it */ @@ -280,7 +270,6 @@ chanrec* InspIRCd::FindChan(const std::string &chan) return iter->second; } - /* * sends out an error notice to all connected clients (not to be used * lightly!) |