Use empty() instead of comparing size() with 0

Recommendation from Clang-Tidy: https://clang.llvm.org/extra/clang-tidy/checks/readability-container-size-empty.html
This commit is contained in:
scribam 2019-06-01 15:25:33 +02:00 committed by Ivan
parent bf557ea6e6
commit 09c9996f31
23 changed files with 33 additions and 33 deletions

View file

@ -209,7 +209,7 @@ void ds4_pad_handler::GetNextButtonPress(const std::string& padId, const std::fu
if (get_blacklist)
{
if (blacklist.size() <= 0)
if (blacklist.empty())
LOG_SUCCESS(HLE, "DS4 Calibration: Blacklist is clear. No input spam detected");
return;
}
@ -786,7 +786,7 @@ bool ds4_pad_handler::Init()
LOG_ERROR(HLE, "[DS4] Check https://wiki.rpcs3.net/index.php?title=Help:Controller_Configuration for intructions on how to solve this issue");
#endif
}
else if (controllers.size() == 0)
else if (controllers.empty())
{
LOG_WARNING(HLE, "[DS4] No controllers found!");
}