Use empty instead of size

This commit is contained in:
Filip Gawin
2019-02-12 23:47:17 +01:00
parent 363ce67459
commit 49fe9f5db1
28 changed files with 56 additions and 56 deletions

View File

@ -25,10 +25,10 @@ public:
const std::string& audio_backend)
: ConfigLayerLoader(Config::LayerType::CommandLine)
{
if (video_backend.size())
if (!video_backend.empty())
m_values.emplace_back(std::make_tuple(Config::MAIN_GFX_BACKEND.location, video_backend));
if (audio_backend.size())
if (!audio_backend.empty())
m_values.emplace_back(
std::make_tuple(Config::MAIN_DSP_HLE.location, ValueToString(audio_backend == "HLE")));

View File

@ -232,7 +232,7 @@ bool GameFileCache::SyncCacheFile(bool save)
else
{
std::vector<u8> buffer(f.GetSize());
if (buffer.size() && f.ReadBytes(buffer.data(), buffer.size()))
if (!buffer.empty() && f.ReadBytes(buffer.data(), buffer.size()))
{
u8* ptr = buffer.data();
PointerWrap p(&ptr, PointerWrap::MODE_READ);