diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-14 04:54:59 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-14 04:54:59 +0200 |
commit | 5d5c0c3020cca1681f9e368804f0ae712c2bf1b5 (patch) | |
tree | 4939251bf558eb1532fc110a1eee8d197e62077c | |
parent | 24640fdb03eb098f5c308ee26d8372a366525a8f (diff) |
prevent converting 'nullptr' to integer in global_coords
-rw-r--r-- | src/global-coords.hpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/global-coords.hpp b/src/global-coords.hpp index 3ed4a855..4a4d2d4d 100644 --- a/src/global-coords.hpp +++ b/src/global-coords.hpp @@ -80,6 +80,7 @@ struct global_coords final { y{ uint32_t((c.y + s0::value) << 4) | (xy.y & 0x0f) } {} constexpr global_coords(uint32_t x, uint32_t y, std::nullptr_t) noexcept : x{x}, y{y} {} + constexpr global_coords(uint32_t, uint32_t, uint32_t) = delete; constexpr global_coords(int32_t x, int32_t y, int8_t z) noexcept : x{uint32_t(x + (s0::value<<4)) | uint32_t(((z + z0::value) & 0x0f) << 20)}, y{uint32_t(y + (s0::value<<4))} |