Fixed issue with getSummonedCreature( that returned a reference to a non const static value

Fix compile, and apply review comment

Fixed greater vs more typo.

getCellname is back to a string view.

Because in most cases was used as a strong not a refId.
and there was a fundamental issue with region names used as a cellname
This commit is contained in:
florent.teppe 2022-12-01 22:09:30 +01:00
parent 1ef1de974d
commit dc21df97c8
17 changed files with 57 additions and 43 deletions

View file

@ -20,14 +20,14 @@ namespace Misc::StringUtils
return std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end(), CiCharLess());
}
struct CiCharMore
struct CiCharGreater
{
bool operator()(char x, char y) const { return toLower(x) > toLower(y); }
};
inline bool ciMore(std::string_view x, std::string_view y)
inline bool ciGreater(std::string_view x, std::string_view y)
{
return std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end(), CiCharMore());
return std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end(), CiCharGreater());
}
inline bool ciEqual(std::string_view x, std::string_view y)