Skip to content

Commit 47f91c9

Browse files
author
devsh
committed
give the IPreHashed a good initial value
1 parent 8355881 commit 47f91c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/nbl/asset/IPreHashed.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ class IPreHashed : public IAsset
123123
virtual void discardContent_impl() = 0;
124124

125125
private:
126-
core::blake3_hash_t m_contentHash = {};
126+
// The initial value is a hash of an "as if" of a zero-length array
127+
core::blake3_hash_t m_contentHash = static_cast<core::blake3_hash_t>(core::blake3_hasher{});
127128
};
128129
}
129130

0 commit comments

Comments
 (0)