mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-02 05:06:40 +00:00
Make ESM::StringRefId compatible with std::string UniversalId
This commit is contained in:
parent
c53abd870b
commit
0fc78aa173
1 changed files with 4 additions and 0 deletions
|
@ -360,6 +360,10 @@ const std::string& CSMWorld::UniversalId::getId() const
|
|||
if (const std::string* result = std::get_if<std::string>(&mValue))
|
||||
return *result;
|
||||
|
||||
if (const ESM::RefId* refId = std::get_if<ESM::RefId>(&mValue))
|
||||
if (const ESM::StringRefId* result = refId->getIf<ESM::StringRefId>())
|
||||
return result->getValue();
|
||||
|
||||
throw std::logic_error("invalid access to ID of " + ::toString(getArgumentType()) + " UniversalId");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue