add missing NGCORE_API and HashArchive & with const value

This commit is contained in:
Christopher Lackner 2020-08-29 16:19:45 +02:00
parent 55971b3dde
commit deab89adf8
2 changed files with 7 additions and 2 deletions

View File

@ -936,6 +936,11 @@ namespace ngcore
Archive & operator & (char *& str) override Archive & operator & (char *& str) override
{ char* s = str; while(*s != '\0') ApplyHash(*(s++)); return *this; } { char* s = str; while(*s != '\0') ApplyHash(*(s++)); return *this; }
// HashArchive can be used in const context
template<typename T>
Archive & operator& (const T& val) const
{ return (*this) & const_cast<T&>(val); }
size_t GetHash() const { return hash_value; } size_t GetHash() const { return hash_value; }
private: private:

View File

@ -131,7 +131,7 @@ public:
return Test(i); return Test(i);
} }
bool operator==(const BitArray& other) const; NGCORE_API bool operator==(const BitArray& other) const;
/// invert all bits /// invert all bits
NGCORE_API BitArray & Invert (); NGCORE_API BitArray & Invert ();
@ -147,7 +147,7 @@ public:
NGCORE_API size_t NumSet () const; NGCORE_API size_t NumSet () const;
void DoArchive(Archive& archive); NGCORE_API void DoArchive(Archive& archive);
private: private:
/// ///