mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-09 03:57:51 +03:00
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:
parent
d782d37ee2
commit
21bd28542a
14 changed files with 25 additions and 18 deletions
|
@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue