diff options
| author | 2022-09-03 22:52:53 +0100 | |
|---|---|---|
| committer | 2022-09-03 23:17:05 +0100 | |
| commit | 9203f40f41e4a735d379d13867d277c696fb28c5 (patch) | |
| tree | 93a171344e801b44918229fdd6b8778293ab88aa /src/modules/m_spanningtree/capab.cpp | |
| parent | Fix some warnings noticed by the bugprone-* clang-tidy checkers. (diff) | |
Fix some warnings noticed by the readability-* clang-tidy checkers.
Diffstat (limited to 'src/modules/m_spanningtree/capab.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/capab.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp index bd9e3138d..08533f5a8 100644 --- a/src/modules/m_spanningtree/capab.cpp +++ b/src/modules/m_spanningtree/capab.cpp @@ -201,7 +201,9 @@ namespace return true; bool okay; - std::ostringstream diffconfig, localmissing, remotemissing; + std::ostringstream diffconfig; + std::ostringstream localmissing; + std::ostringstream remotemissing; if (protocol <= PROTO_INSPIRCD_3) okay = CompareModulesOld(property, *remote, diffconfig, localmissing, remotemissing); else @@ -418,7 +420,7 @@ void TreeSocket::ListDifference(const std::string &one, const std::string &two, bool TreeSocket::Capab(const CommandBase::Params& params) { - if (params.size() < 1) + if (params.empty()) { this->SendError("Invalid number of parameters for CAPAB - Mismatched version"); return false; @@ -471,7 +473,8 @@ bool TreeSocket::Capab(const CommandBase::Params& params) { if (capab->ChanModes != BuildModeList(MODETYPE_CHANNEL)) { - std::string diffIneed, diffUneed; + std::string diffIneed; + std::string diffUneed; ListDifference(capab->ChanModes, BuildModeList(MODETYPE_CHANNEL), ' ', diffIneed, diffUneed); if (diffIneed.length() || diffUneed.length()) { @@ -489,7 +492,8 @@ bool TreeSocket::Capab(const CommandBase::Params& params) { if (capab->UserModes != BuildModeList(MODETYPE_USER)) { - std::string diffIneed, diffUneed; + std::string diffIneed; + std::string diffUneed; ListDifference(capab->UserModes, BuildModeList(MODETYPE_USER), ' ', diffIneed, diffUneed); if (diffIneed.length() || diffUneed.length()) { |
