diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-05-27 10:34:57 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-05-27 10:34:57 +0200 |
commit | a30ac3790edea8329c199c9c42ff4150cf20c8ba (patch) | |
tree | aea060cc17ac6783389e2561e81b3b74c74ab6ad /src/uniquekey.h | |
parent | 96be015111e2d4b05ae8cb9496b752472e8578a9 (diff) | |
download | lanes-a30ac3790edea8329c199c9c42ff4150cf20c8ba.tar.gz lanes-a30ac3790edea8329c199c9c42ff4150cf20c8ba.tar.bz2 lanes-a30ac3790edea8329c199c9c42ff4150cf20c8ba.zip |
More string_view + improved DEBUGSPEW output
Diffstat (limited to 'src/uniquekey.h')
-rw-r--r-- | src/uniquekey.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/uniquekey.h b/src/uniquekey.h index 67b3279..9981bb8 100644 --- a/src/uniquekey.h +++ b/src/uniquekey.h | |||
@@ -13,10 +13,10 @@ class UniqueKey | |||
13 | uintptr_t const storage{ 0 }; | 13 | uintptr_t const storage{ 0 }; |
14 | 14 | ||
15 | public: | 15 | public: |
16 | char const* debugName{ nullptr }; | 16 | std::string_view debugName{}; |
17 | 17 | ||
18 | // --------------------------------------------------------------------------------------------- | 18 | // --------------------------------------------------------------------------------------------- |
19 | constexpr explicit UniqueKey(uint64_t val_, char const* debugName_ = nullptr) | 19 | constexpr explicit UniqueKey(uint64_t val_, std::string_view const& debugName_ = {}) |
20 | #if LUAJIT_FLAVOR() == 64 // building against LuaJIT headers for 64 bits, light userdata is restricted to 47 significant bits, because LuaJIT uses the other bits for internal optimizations | 20 | #if LUAJIT_FLAVOR() == 64 // building against LuaJIT headers for 64 bits, light userdata is restricted to 47 significant bits, because LuaJIT uses the other bits for internal optimizations |
21 | : storage{ static_cast<uintptr_t>(val_ & 0x7FFFFFFFFFFFull) } | 21 | : storage{ static_cast<uintptr_t>(val_ & 0x7FFFFFFFFFFFull) } |
22 | #else // LUAJIT_FLAVOR() | 22 | #else // LUAJIT_FLAVOR() |