mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +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:
@@ -227,7 +227,7 @@ bool EQWParser::dosub(const char * subname, const std::vector<std::string> &args
|
||||
ENTER; // everything created after here
|
||||
SAVETMPS; // ...is a temporary variable
|
||||
PUSHMARK(SP); // remember the stack pointer
|
||||
if(args.size() > 0)
|
||||
if(!args.empty())
|
||||
{
|
||||
for (auto i = args.begin(); i != args.end(); ++i) { /* push the arguments onto the perl stack */
|
||||
XPUSHs(sv_2mortal(newSVpv(i->c_str(), i->length())));
|
||||
|
||||
Reference in New Issue
Block a user