aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/iohash.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-09-23 19:19:40 +0200
committerGitHub Enterprise <[email protected]>2024-09-23 19:19:40 +0200
commitbc9e590727211d803cce7be84c1cbc026179b841 (patch)
tree96d89b59cdced94ce1d795cd941d35d26f6c5e88 /src/zencore/iohash.cpp
parentmade fmt formatter format function const (#162) (diff)
downloadzen-bc9e590727211d803cce7be84c1cbc026179b841.tar.xz
zen-bc9e590727211d803cce7be84c1cbc026179b841.zip
gc unused refactor (#165)
* optimize IoHash and OId comparisions * refactor filtering of unused references * add attachment filtering to gc
Diffstat (limited to 'src/zencore/iohash.cpp')
-rw-r--r--src/zencore/iohash.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/zencore/iohash.cpp b/src/zencore/iohash.cpp
index 1bf2c033d..8f3f8da26 100644
--- a/src/zencore/iohash.cpp
+++ b/src/zencore/iohash.cpp
@@ -12,7 +12,11 @@
namespace zen {
-const IoHash IoHash::Zero{}; // Initialized to all zeros
+static const uint8_t MaxData[20] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+
+const IoHash IoHash::Max = IoHash::MakeFrom(MaxData); // Initialized to all 0xff
+const IoHash IoHash::Zero{}; // Initialized to all zeros
IoHash
IoHash::HashBuffer(const void* data, size_t byteCount)