diff options
| -rw-r--r-- | zencore/include/zencore/iohash.h | 4 | ||||
| -rw-r--r-- | zencore/iohash.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/zencore/include/zencore/iohash.h b/zencore/include/zencore/iohash.h index 475bfe447..4a8fcd03f 100644 --- a/zencore/include/zencore/iohash.h +++ b/zencore/include/zencore/iohash.h @@ -25,7 +25,7 @@ class CompositeBuffer; */ struct IoHash { - uint8_t Hash[20]; + alignas(uint32_t) uint8_t Hash[20]; static IoHash MakeFrom(const void* data /* 20 bytes */) { @@ -53,7 +53,7 @@ struct IoHash static const int StringLength = 40; typedef char String_t[StringLength + 1]; - static IoHash Zero; // Initialized to all zeros + static const IoHash Zero; // Initialized to all zeros inline auto operator<=>(const IoHash& rhs) const = default; diff --git a/zencore/iohash.cpp b/zencore/iohash.cpp index 2b9bec120..fbfaf8363 100644 --- a/zencore/iohash.cpp +++ b/zencore/iohash.cpp @@ -11,7 +11,7 @@ namespace zen { -IoHash IoHash::Zero; // Initialized to all zeros +const IoHash IoHash::Zero; // Initialized to all zeros IoHash IoHash::HashBuffer(const void* data, size_t byteCount) |