summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorB00mX0r <b00mx0r@aureus.pw>2018-07-03 16:07:39 +0100
committerPeter Powell <petpow@saberuk.com>2018-07-03 16:09:35 +0100
commit5585654df265bc37d547fa7738e35cc7ae7dacbb (patch)
tree87f38acbb577a0a237cb310dc2bc5f3615e573f6 /src/modules
parent197279b8c9aa4d98f0a7b0a8231fe6e7380d6e0f (diff)
Use !empty() instead of 'size() > 0' when checking parameter count.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_jumpserver.cpp2
-rw-r--r--src/modules/m_silence.cpp4
-rw-r--r--src/modules/m_spanningtree/away.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp
index f94fc31e6..e54d1efb2 100644
--- a/src/modules/m_jumpserver.cpp
+++ b/src/modules/m_jumpserver.cpp
@@ -58,7 +58,7 @@ class CommandJumpserver : public Command
std::string n_done_s;
/* No parameters: jumpserver disabled */
- if (!parameters.size())
+ if (parameters.empty())
{
if (port)
user->WriteNotice("*** Disabled jumpserver (previously set to '" + redirect_to + ":" + ConvToStr(port) + "')");
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index cc510c3dd..e60694470 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -123,7 +123,7 @@ class CommandSilence : public Command
CmdResult Handle(const std::vector<std::string>& parameters, User* user) CXX11_OVERRIDE
{
- if (!parameters.size())
+ if (parameters.empty())
{
// no parameters, show the current silence list.
silencelist* sl = ext.get(user);
@@ -140,7 +140,7 @@ class CommandSilence : public Command
return CMD_SUCCESS;
}
- else if (parameters.size() > 0)
+ else
{
// one or more parameters, add or delete entry from the list (only the first parameter is used)
std::string mask(parameters[0], 1);
diff --git a/src/modules/m_spanningtree/away.cpp b/src/modules/m_spanningtree/away.cpp
index 7c514c49e..28cbf8f73 100644
--- a/src/modules/m_spanningtree/away.cpp
+++ b/src/modules/m_spanningtree/away.cpp
@@ -25,7 +25,7 @@
CmdResult CommandAway::HandleRemote(::RemoteUser* u, std::vector<std::string>& params)
{
- if (params.size())
+ if (!params.empty())
{
FOREACH_MOD(OnSetAway, (u, params.back()));