mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
Use empty instead of size
This commit is contained in:
parent
363ce67459
commit
49fe9f5db1
28 changed files with 56 additions and 56 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue