diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-04-26 10:17:09 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-04-26 10:17:09 +0200 |
commit | 4343dc14c1db7ef9e5d57ed1d40740439e1c51d6 (patch) | |
tree | e3e7d192218291e4d089835fd63ac052142aa673 /src/deep.h | |
parent | 0b5108a8a0d9b7a4a63bd6aae0271b71a887beea (diff) | |
download | lanes-4343dc14c1db7ef9e5d57ed1d40740439e1c51d6.tar.gz lanes-4343dc14c1db7ef9e5d57ed1d40740439e1c51d6.tar.bz2 lanes-4343dc14c1db7ef9e5d57ed1d40740439e1c51d6.zip |
Formalize a few coding style rules, start to enforce them for constants
Diffstat (limited to 'src/deep.h')
-rw-r--r-- | src/deep.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -30,14 +30,14 @@ enum class LookupMode | |||
30 | 30 | ||
31 | // ################################################################################################# | 31 | // ################################################################################################# |
32 | 32 | ||
33 | // xxh64 of string "DEEP_VERSION_3" generated at https://www.pelock.com/products/hash-calculator | 33 | // xxh64 of string "kDeepVersion_1" generated at https://www.pelock.com/products/hash-calculator |
34 | static constexpr UniqueKey DEEP_VERSION{ 0xB2CC0FD9C0AE9674ull, "DEEP_VERSION_3" }; | 34 | static constexpr UniqueKey kDeepVersion{ 0x91171AEC6641E9DBull, "kDeepVersion" }; |
35 | 35 | ||
36 | // should be used as header for deep userdata | 36 | // should be used as header for deep userdata |
37 | // a deep userdata is a full userdata that stores a single pointer to the actual DeepPrelude-derived object | 37 | // a deep userdata is a full userdata that stores a single pointer to the actual DeepPrelude-derived object |
38 | struct DeepPrelude | 38 | struct DeepPrelude |
39 | { | 39 | { |
40 | UniqueKey const m_magic{ DEEP_VERSION }; | 40 | UniqueKey const m_magic{ kDeepVersion }; |
41 | // when stored in a keeper state, the full userdata doesn't have a metatable, so we need direct access to the factory | 41 | // when stored in a keeper state, the full userdata doesn't have a metatable, so we need direct access to the factory |
42 | class DeepFactory& m_factory; | 42 | class DeepFactory& m_factory; |
43 | // data is destroyed when refcount is 0 | 43 | // data is destroyed when refcount is 0 |