mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-28 16:09:43 +00:00
moved all code in CPP in ESM namespace since it was already necessary for << operator
in the equality operator, no longer need ciequal since the id is already always lowercase
This commit is contained in:
parent
c8bb733360
commit
0d68735e23
1 changed files with 17 additions and 12 deletions
|
@ -4,26 +4,31 @@
|
|||
|
||||
#include "components/misc/strings/algorithm.hpp"
|
||||
|
||||
bool ESM::RefId::operator==(const RefId& rhs) const
|
||||
{
|
||||
return Misc::StringUtils::ciEqual(this->mId, rhs.mId);
|
||||
}
|
||||
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
std::ostream& operator<<(std::ostream& os, const ESM::RefId& refId)
|
||||
bool RefId::operator==(const RefId& rhs) const
|
||||
{
|
||||
return this->mId == rhs.mId;
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const RefId& refId)
|
||||
{
|
||||
os << refId.getRefIdString();
|
||||
return os;
|
||||
}
|
||||
|
||||
RefId RefId::stringRefId(const std::string_view & id)
|
||||
{
|
||||
RefId newRefId;
|
||||
newRefId.mId = Misc::StringUtils::lowerCase(id);
|
||||
return newRefId;
|
||||
}
|
||||
|
||||
const RefId RefId::sEmpty = RefId::stringRefId("");
|
||||
}
|
||||
|
||||
ESM::RefId ESM::RefId::stringRefId(const std::string_view & id)
|
||||
{
|
||||
RefId newRefId;
|
||||
newRefId.mId = Misc::StringUtils::lowerCase(id);
|
||||
return newRefId;
|
||||
}
|
||||
|
||||
const ESM::RefId ESM::RefId::sEmpty = ESM::RefId::stringRefId("");
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue