Write StringRefId as is when converting UniversalId to string

To avoid adding quotes which on conversion ESM::StringRefId -> UniversalId ->
std::string -> UniversalId changes the string value adding quotes.
macos_ci_fix
elsid 5 months ago
parent 0fc78aa173
commit 7b5310b569
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -187,6 +187,8 @@ namespace
{
mStream << ": " << value;
}
void operator()(const ESM::RefId& value) const { mStream << ": " << value.toString(); }
};
struct GetTypeData

@ -177,11 +177,11 @@ namespace CSMWorld
UniversalId::ArgumentType_Id, "Instance", "Instance: f", ":./instance.png" },
Params{ UniversalId(UniversalId::Type_Reference, ESM::RefId::stringRefId("g")), UniversalId::Type_Reference,
UniversalId::Class_SubRecord, UniversalId::ArgumentType_RefId, "Instance", "Instance: \"g\"",
UniversalId::Class_SubRecord, UniversalId::ArgumentType_RefId, "Instance", "Instance: g",
":./instance.png" },
Params{ UniversalId(UniversalId::Type_Reference, ESM::RefId::index(ESM::REC_SKIL, 42)),
UniversalId::Type_Reference, UniversalId::Class_SubRecord, UniversalId::ArgumentType_RefId, "Instance",
"Instance: Index:SKIL:0x2a", ":./instance.png" },
"Instance: SKIL:0x2a", ":./instance.png" },
};
INSTANTIATE_TEST_SUITE_P(ValidParams, CSMWorldUniversalIdValidPerTypeTest, ValuesIn(validParams));

Loading…
Cancel
Save