diff options
author | Sadie Powell <sadie@witchery.services> | 2020-12-16 03:46:36 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-12-16 03:47:31 +0000 |
commit | 66dbd438f23a6beb06b0d44b9121deeb1e3f73bc (patch) | |
tree | 35214288e86506d739f0a4cdf59ba6e86c5ef6b5 | |
parent | b7bc4b576c34dffcc9ea337a09f7c475b6ea2402 (diff) |
Use !empty instead of size when checking if containers are empty.
-rw-r--r-- | src/configreader.cpp | 2 | ||||
-rw-r--r-- | src/cull_list.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_sasl.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index d06753423..b258d93fc 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -524,7 +524,7 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid) // On first run, ports are bound later on FailedPortList pl; ServerInstance->BindPorts(pl); - if (pl.size()) + if (!pl.empty()) { std::cout << "Warning! Some of your listener" << (pl.size() == 1 ? "s" : "") << " failed to bind:" << std::endl; for (FailedPortList::const_iterator iter = pl.begin(); iter != pl.end(); ++iter) diff --git a/src/cull_list.cpp b/src/cull_list.cpp index e05d44918..80d7ddb97 100644 --- a/src/cull_list.cpp +++ b/src/cull_list.cpp @@ -73,7 +73,7 @@ void CullList::Apply() classbase* c = queue[i]; delete c; } - if (list.size()) + if (!list.empty()) { ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, "WARNING: Objects added to cull list in a destructor"); Apply(); diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index 6aaa83f33..e202bae45 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -213,7 +213,7 @@ class SaslAuthenticator params.push_back(method); const std::string fp = sslapi ? sslapi->GetFingerprint(user) : ""; - if (fp.size()) + if (!fp.empty()) params.push_back(fp); SendSASL(user, "*", 'S', params); |