diff --git a/libsrc/core/archive.hpp b/libsrc/core/archive.hpp index 76cb3567..dc381a4a 100644 --- a/libsrc/core/archive.hpp +++ b/libsrc/core/archive.hpp @@ -936,6 +936,11 @@ namespace ngcore Archive & operator & (char *& str) override { char* s = str; while(*s != '\0') ApplyHash(*(s++)); return *this; } + // HashArchive can be used in const context + template + Archive & operator& (const T& val) const + { return (*this) & const_cast(val); } + size_t GetHash() const { return hash_value; } private: diff --git a/libsrc/core/bitarray.hpp b/libsrc/core/bitarray.hpp index dff55daf..4005fc81 100644 --- a/libsrc/core/bitarray.hpp +++ b/libsrc/core/bitarray.hpp @@ -131,7 +131,7 @@ public: return Test(i); } - bool operator==(const BitArray& other) const; + NGCORE_API bool operator==(const BitArray& other) const; /// invert all bits NGCORE_API BitArray & Invert (); @@ -147,7 +147,7 @@ public: NGCORE_API size_t NumSet () const; - void DoArchive(Archive& archive); + NGCORE_API void DoArchive(Archive& archive); private: ///