diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-05-30 23:36:42 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-05-30 23:36:42 +0200 |
| commit | 5755d4515599b934274dc28d9d4896bf7fe6f95b (patch) | |
| tree | 28e4e0ce13925d3e437b62b25dee24bbe315af01 /serialize/world-reader.cpp | |
| parent | 17772a53ea0a18f386721fc5c404f80f57dc8a00 (diff) | |
serialize/save: simplify up some bit shifting
Diffstat (limited to 'serialize/world-reader.cpp')
| -rw-r--r-- | serialize/world-reader.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/serialize/world-reader.cpp b/serialize/world-reader.cpp index eadda90a..170f9c97 100644 --- a/serialize/world-reader.cpp +++ b/serialize/world-reader.cpp @@ -239,9 +239,8 @@ void reader_state::read_chunks(reader_t& s) for (auto i = 0uz; i < entity_count; i++) { object_id _id; _id << s; - const auto oid = _id & (1ULL << 60)-1; + const auto oid = _id & lowbits<60, object_id>; fm_soft_assert(oid != 0); - static_assert(entity_type_BITS == 3); const auto type = entity_type(_id >> 61); const auto local = local_coords{s.read<uint8_t>()}; |
