mirror of
https://github.com/EQEmu/Server.git
synced 2026-11-24 09:47:20 +00:00
Change emptiness checks to empty() from size() [clang-tidy]
This has two benefits, it's clear what we are checking and size() isn't always constant time, where empty is (performance!)
This commit is contained in:
1 parent
c43d436b1f
commit
cdbeb24a05
16 files changed
+45
-45
No files matched your search
+2
-2
@@ -2326,7 +2326,7 @@ void Client::SendFriends() {
|
||||
|
||||
std::string Client::MailBoxName() {
|
||||
|
||||
if((Characters.size() == 0) || (CurrentMailBox > (Characters.size() - 1)))
|
||||
if((Characters.empty()) || (CurrentMailBox > (Characters.size() - 1)))
|
||||
{
|
||||
Log.Out(Logs::Detail, Logs::UCS_Server, "MailBoxName() called with CurrentMailBox set to %i and Characters.size() is %i",
|
||||
CurrentMailBox, Characters.size());
|
||||
@@ -2343,7 +2343,7 @@ std::string Client::MailBoxName() {
|
||||
|
||||
int Client::GetCharID() {
|
||||
|
||||
if(Characters.size() == 0)
|
||||
if(Characters.empty())
|
||||
return 0;
|
||||
|
||||
return Characters[0].CharID;
|
||||
|
||||
Reference in new issue
Block a user