Applies review advice

2d coord hash moved to hash.hpp file
format version adds suffix to be more coherent
don't use ESM::RefId::sEmpty
RefId equality with string_view, conversion to refId unecessary
action teleport remove test that mCellId is empty
removes some const references, when copy is enough
invalid refid => empty refid
removes useless change
This commit is contained in:
florent.teppe 2023-04-02 22:00:39 +02:00
parent d782d37ee2
commit 21bd28542a
14 changed files with 25 additions and 18 deletions

View file

@ -6,6 +6,8 @@
#include <utility>
#include <components/misc/hash.hpp>
namespace ESM
{
class ESM3ExteriorCellRefId
@ -47,7 +49,7 @@ namespace std
{
std::size_t operator()(ESM::ESM3ExteriorCellRefId value) const noexcept
{
return (53 + std::hash<int32_t>{}(value.mX)) * 53 + std::hash<int32_t>{}(value.mY);
return Misc::hash2dCoord(value.mX, value.mY);
}
};
}