From 1fec68b4cabc45efd24124b4656ad89bae264f3e Mon Sep 17 00:00:00 2001 From: Jackmcbarn Date: Wed, 1 Dec 2010 14:27:27 -0500 Subject: Use const references --- src/modules/m_alias.cpp | 2 +- src/modules/m_clear.cpp | 4 ++-- src/modules/m_filter.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index a911cd1ae..3b2fcbf89 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -276,7 +276,7 @@ class ModuleAlias : public Module } - int DoAlias(LocalUser *user, Channel *c, Alias *a, const std::string compare, const std::string safe) + int DoAlias(LocalUser *user, Channel *c, Alias *a, const std::string& compare, const std::string& safe) { User *u = NULL; diff --git a/src/modules/m_clear.cpp b/src/modules/m_clear.cpp index b3d8d9338..e964bd3f8 100644 --- a/src/modules/m_clear.cpp +++ b/src/modules/m_clear.cpp @@ -26,7 +26,7 @@ class ClearBase : public Command the command but kick and mode accesses must be checked */ virtual int CheckAccess (User *who, Channel *chan) = 0; /* function to do things after the clear, like notifying ircops in saclear */ - virtual void PostClear (User *user, Channel *chan, const std::string type) + virtual void PostClear (User *user, Channel *chan, const std::string& type) { } /* make the user user clear the mode pointed to by mh on channel chan */ @@ -155,7 +155,7 @@ class SaclearCommand : public ClearBase return 0; } /* post clear hook */ - void PostClear (User *user, Channel *chan, const std::string type) + void PostClear (User *user, Channel *chan, const std::string& type) { /* send notice */ ServerInstance->SNO->WriteGlobalSno ('a', "%s used saclear %s on channel %s", user->nick.c_str ( ), type.c_str ( ), chan->name.c_str ( diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index 979af5c9f..dd5d30c51 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -42,7 +42,7 @@ class FilterResult bool flag_privmsg; bool flag_notice; - FilterResult(const std::string free, const std::string &rea, const std::string &act, long gt, const std::string &fla) : + FilterResult(const std::string &free, const std::string &rea, const std::string &act, long gt, const std::string &fla) : freeform(free), reason(rea), action(act), gline_time(gt), flags(fla) { this->FillFlags(fla); -- cgit v1.3.1-10-gc9f91