diff options
| author | 2021-04-06 10:36:32 +0100 | |
|---|---|---|
| committer | 2021-04-06 10:37:00 +0100 | |
| commit | 34169ed0a703034bb5c9f02d8e320ca80cde6bb9 (patch) | |
| tree | a6f7b101fee4116eef1795ed23ae66c5227623f2 /src/mode.cpp | |
| parent | Fix core_dns failing to compile on GCC. (diff) | |
Constify their_param in ResolveModeConflict.
There's no reason for this to be mutable.
Diffstat (limited to 'src/mode.cpp')
| -rw-r--r-- | src/mode.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 4539d1ee2..78997b29e 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -104,7 +104,7 @@ void ModeHandler::OnParameterInvalid(User* user, Channel* targetchannel, User* t user->WriteNumeric(Numerics::InvalidModeParameter(targetuser, this, "*")); } -bool ModeHandler::ResolveModeConflict(std::string& theirs, const std::string& ours, Channel*) +bool ModeHandler::ResolveModeConflict(const std::string& theirs, const std::string& ours, Channel*) { return (theirs < ours); } @@ -405,7 +405,7 @@ static bool IsModeParamValid(User* user, Channel* targetchannel, User* targetuse } // Returns true if we should apply a merged mode, false if we should skip it -static bool ShouldApplyMergedMode(Channel* chan, Modes::Change& item) +static bool ShouldApplyMergedMode(Channel* chan, const Modes::Change& item) { ModeHandler* mh = item.mh; if ((!chan) || (!chan->IsModeSet(mh)) || (mh->IsListMode())) @@ -413,7 +413,7 @@ static bool ShouldApplyMergedMode(Channel* chan, Modes::Change& item) return true; // Mode handler decides - std::string ours = chan->GetModeParameter(mh); + const std::string ours = chan->GetModeParameter(mh); return mh->ResolveModeConflict(item.param, ours, chan); } |
