summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-09-02 16:32:00 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-09-02 16:32:00 +0200
commit01a6b5d21c8a24a133693c7c65779cfa78fc164d (patch)
tree536bdd5eba63f6cb0a64742b72349bc0b67ee33a
parent0140bc21056b4c7f6ede16cdbf0563b0af566dbf (diff)
Change mode_sequence to be a const ref in ModeParser::Process()
Also change the signature of DisplayListModes() to accept a const ref
-rw-r--r--include/mode.h2
-rw-r--r--src/mode.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/mode.h b/include/mode.h
index 3e30d5b88..9e57cf298 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -541,7 +541,7 @@ class CoreExport ModeParser : public fakederef<ModeParser>
/** Displays the value of a list mode
* Used by ModeParser::Process.
*/
- void DisplayListModes(User* user, Channel* chan, std::string &mode_sequence);
+ void DisplayListModes(User* user, Channel* chan, const std::string& mode_sequence);
/**
* Attempts to apply a mode change to a user or channel
diff --git a/src/mode.cpp b/src/mode.cpp
index d24346e59..4c31a94d7 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -403,7 +403,7 @@ void ModeParser::Process(const std::vector<std::string>& parameters, User* user,
return;
}
- std::string mode_sequence = parameters[1];
+ const std::string& mode_sequence = parameters[1];
std::string output_mode;
std::string output_parameters;
@@ -512,7 +512,7 @@ void ModeParser::Process(const std::vector<std::string>& parameters, User* user,
}
}
-void ModeParser::DisplayListModes(User* user, Channel* chan, std::string &mode_sequence)
+void ModeParser::DisplayListModes(User* user, Channel* chan, const std::string& mode_sequence)
{
seq++;