Use single implementation to check whether marker is hidden

LTO-timing^2
elsid 3 years ago
parent cec7f1e7bc
commit 4613840914
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -2,6 +2,8 @@
#include "types/types.hpp"
#include <components/misc/resourcehelpers.hpp>
namespace MWLua
{
@ -12,8 +14,7 @@ namespace MWLua
bool isMarker(const MWWorld::Ptr& ptr)
{
std::string_view id = ptr.getCellRef().getRefId();
return id == "prisonmarker" || id == "divinemarker" || id == "templemarker" || id == "northmarker";
return Misc::ResourceHelpers::isHiddenMarker(ptr.getCellRef().getRefId());
}
std::string ptrToString(const MWWorld::Ptr& ptr)

@ -7,6 +7,8 @@
#include <string_view>
#include <sstream>
#include <components/misc/resourcehelpers.hpp>
#include "livecellref.hpp"
namespace MWWorld
@ -58,7 +60,7 @@ namespace MWWorld
std::string_view id = mRef->mRef.getRefId();
if (id == "player")
return ESM::REC_INTERNAL_PLAYER;
else if (id == "prisonmarker" || id == "divinemarker" || id == "templemarker" || id == "northmarker")
else if (Misc::ResourceHelpers::isHiddenMarker(id))
return ESM::REC_INTERNAL_MARKER;
else
return mRef->getType();

Loading…
Cancel
Save