diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-04-15 09:44:45 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-04-15 09:44:45 +0200 |
commit | 111790701a45e074de2e8e5d8d4831ac285e22b0 (patch) | |
tree | 3f9233015e61f605e22e9fd0d4c8642a8e7000cd /src/uniquekey.h | |
parent | 69d40c81d8343a1af7e0fe61fbf20a4cf5880c25 (diff) | |
download | lanes-111790701a45e074de2e8e5d8d4831ac285e22b0.tar.gz lanes-111790701a45e074de2e8e5d8d4831ac285e22b0.tar.bz2 lanes-111790701a45e074de2e8e5d8d4831ac285e22b0.zip |
C++ migration: keeper_call returns a std::optional
Diffstat (limited to '')
-rw-r--r-- | src/uniquekey.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/uniquekey.h b/src/uniquekey.h index a89ecd3..78c0765 100644 --- a/src/uniquekey.h +++ b/src/uniquekey.h | |||
@@ -13,12 +13,15 @@ class UniqueKey | |||
13 | 13 | ||
14 | public: | 14 | public: |
15 | 15 | ||
16 | constexpr explicit UniqueKey(uint64_t val_) | 16 | char const* m_debugName{ nullptr }; |
17 | |||
18 | constexpr explicit UniqueKey(uint64_t val_, char const* debugName_ = nullptr) | ||
17 | #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 | 19 | #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 |
18 | : m_storage{ static_cast<uintptr_t>(val_ & 0x7fffffffffffull) } | 20 | : m_storage{ static_cast<uintptr_t>(val_ & 0x7fffffffffffull) } |
19 | #else // LUAJIT_FLAVOR() | 21 | #else // LUAJIT_FLAVOR() |
20 | : m_storage{ static_cast<uintptr_t>(val_) } | 22 | : m_storage{ static_cast<uintptr_t>(val_) } |
21 | #endif // LUAJIT_FLAVOR() | 23 | #endif // LUAJIT_FLAVOR() |
24 | , m_debugName{ debugName_ } | ||
22 | { | 25 | { |
23 | } | 26 | } |
24 | constexpr UniqueKey(UniqueKey const& rhs_) = default; | 27 | constexpr UniqueKey(UniqueKey const& rhs_) = default; |