From b61d5d8123715ec91b8efb722f171c048020dcaa Mon Sep 17 00:00:00 2001 From: "florent.teppe" Date: Sun, 13 Nov 2022 11:57:51 +0100 Subject: [PATCH] Some RefId == ESM::RefId::StringRefId('constString') still existed --- apps/essimporter/converter.hpp | 12 ++++++------ apps/openmw_test_suite/mwscript/test_utils.hpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/essimporter/converter.hpp b/apps/essimporter/converter.hpp index 7606484e0a..858143e460 100644 --- a/apps/essimporter/converter.hpp +++ b/apps/essimporter/converter.hpp @@ -164,13 +164,13 @@ namespace ESSImport bool isDeleted = false; global.load(esm, isDeleted); - if (global.mId == ESM::RefId::stringRefId("gamehour")) + if (global.mId == "gamehour") mContext->mHour = global.mValue.getFloat(); - if (global.mId == ESM::RefId::stringRefId("day")) + if (global.mId == "day") mContext->mDay = global.mValue.getInteger(); - if (global.mId == ESM::RefId::stringRefId("month")) + if (global.mId == "month") mContext->mMonth = global.mValue.getInteger(); - if (global.mId == ESM::RefId::stringRefId("year")) + if (global.mId == "year") mContext->mYear = global.mValue.getInteger(); mRecords[global.mId] = global; } @@ -185,7 +185,7 @@ namespace ESSImport bool isDeleted = false; class_.load(esm, isDeleted); - if (class_.mId == ESM::RefId::stringRefId("NEWCLASSID_CHARGEN")) + if (class_.mId == "NEWCLASSID_CHARGEN") mContext->mCustomPlayerClassName = class_.mName; mRecords[class_.mId] = class_; @@ -216,7 +216,7 @@ namespace ESSImport auto id = ESM::RefId::stringRefId(esm.getHNString("NAME")); NPCC npcc; npcc.load(esm); - if (id == ESM::RefId::stringRefId("PlayerSaveGame")) + if (id == "PlayerSaveGame") { convertNPCC(npcc, mContext->mPlayer.mObject); } diff --git a/apps/openmw_test_suite/mwscript/test_utils.hpp b/apps/openmw_test_suite/mwscript/test_utils.hpp index 5ab655b3d1..07e8fff7cc 100644 --- a/apps/openmw_test_suite/mwscript/test_utils.hpp +++ b/apps/openmw_test_suite/mwscript/test_utils.hpp @@ -33,7 +33,7 @@ namespace { return { ' ', false }; } - bool isId(const ESM::RefId& name) const override { return name == ESM::RefId::stringRefId("player"); } + bool isId(const ESM::RefId& name) const override { return name == "player"; } }; class TestErrorHandler : public Compiler::ErrorHandler