mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2024-12-29 03:19:44 +00:00
Minor simplification in multidircollection.cpp
This commit is contained in:
parent
1a9fe98764
commit
a204f392c9
@ -16,22 +16,7 @@ namespace Files
|
||||
{
|
||||
if (mStrict)
|
||||
return left==right;
|
||||
|
||||
std::size_t len = left.length();
|
||||
|
||||
if (len!=right.length())
|
||||
return false;
|
||||
|
||||
for (std::size_t i=0; i<len; ++i)
|
||||
{
|
||||
char l = Misc::StringUtils::toLower (left[i]);
|
||||
char r = Misc::StringUtils::toLower (right[i]);
|
||||
|
||||
if (l!=r)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return Misc::StringUtils::ciEqual(left, right);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -24,21 +24,7 @@ namespace Files
|
||||
{
|
||||
if (mStrict)
|
||||
return left<right;
|
||||
|
||||
std::size_t min = std::min (left.length(), right.length());
|
||||
|
||||
for (std::size_t i=0; i<min; ++i)
|
||||
{
|
||||
char l = Misc::StringUtils::toLower (left[i]);
|
||||
char r = Misc::StringUtils::toLower (right[i]);
|
||||
|
||||
if (l<r)
|
||||
return true;
|
||||
if (l>r)
|
||||
return false;
|
||||
}
|
||||
|
||||
return left.length()<right.length();
|
||||
return Misc::StringUtils::ciLess(left, right);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user