mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Use empty instead of size
This commit is contained in:
@ -54,7 +54,7 @@ void LoadPatchSection(const std::string& section, std::vector<Patch>& patches, I
|
||||
localIni.GetLines(enabledSectionName, &enabledLines);
|
||||
for (const std::string& line : enabledLines)
|
||||
{
|
||||
if (line.size() != 0 && line[0] == '$')
|
||||
if (!line.empty() && line[0] == '$')
|
||||
{
|
||||
std::string name = line.substr(1, line.size() - 1);
|
||||
enabledNames.insert(name);
|
||||
@ -71,13 +71,13 @@ void LoadPatchSection(const std::string& section, std::vector<Patch>& patches, I
|
||||
|
||||
for (std::string& line : lines)
|
||||
{
|
||||
if (line.size() == 0)
|
||||
if (line.empty())
|
||||
continue;
|
||||
|
||||
if (line[0] == '$')
|
||||
{
|
||||
// Take care of the previous code
|
||||
if (currentPatch.name.size())
|
||||
if (!currentPatch.name.empty())
|
||||
{
|
||||
patches.push_back(currentPatch);
|
||||
}
|
||||
@ -119,7 +119,7 @@ void LoadPatchSection(const std::string& section, std::vector<Patch>& patches, I
|
||||
}
|
||||
}
|
||||
|
||||
if (currentPatch.name.size() && currentPatch.entries.size())
|
||||
if (!currentPatch.name.empty() && !currentPatch.entries.empty())
|
||||
{
|
||||
patches.push_back(currentPatch);
|
||||
}
|
||||
|
Reference in New Issue
Block a user