diff --git a/hecl/blender/BlenderConnection.hpp b/hecl/blender/BlenderConnection.hpp index a81a60a4e..180fde1dd 100644 --- a/hecl/blender/BlenderConnection.hpp +++ b/hecl/blender/BlenderConnection.hpp @@ -384,7 +384,7 @@ public: Vector3f aabbMin; Vector3f aabbMax; - /* HECL source of each material */ + /** HECL source and metadata of each material */ struct Material { std::string name; @@ -415,7 +415,7 @@ public: std::vector> skins; std::vector contiguousSkinVertCounts; - /* Islands of the same material/skinBank are represented here */ + /** Islands of the same material/skinBank are represented here */ struct Surface { Vector3f centroid; @@ -425,7 +425,7 @@ public: Vector3f reflectionNormal; uint32_t skinBankIdx; - /* Vertex indexing data (all primitives joined as degenerate tri-strip) */ + /** Vertex indexing data (all primitives joined as degenerate tri-strip) */ struct Vert { uint32_t iPos; diff --git a/hecl/extern/LogVisor b/hecl/extern/LogVisor index 189e04797..4c2442df2 160000 --- a/hecl/extern/LogVisor +++ b/hecl/extern/LogVisor @@ -1 +1 @@ -Subproject commit 189e047977b138b711259ad84d94471f5d006ffb +Subproject commit 4c2442df2d800fc25339d3d301d7d3691da7bafb diff --git a/hecl/include/HECL/HECL.hpp b/hecl/include/HECL/HECL.hpp index d12ca3b68..6486e7e5b 100644 --- a/hecl/include/HECL/HECL.hpp +++ b/hecl/include/HECL/HECL.hpp @@ -399,7 +399,9 @@ public: Hash(unsigned long long hashin) : hash(hashin) {} Hash(const Hash& other) {hash = other.hash;} - unsigned long long val() const {return hash;} + uint32_t val32() const {return uint32_t(hash);} + uint64_t val64() const {return uint64_t(hash);} + size_t valSizeT() const {return size_t(hash);} Hash& operator=(const Hash& other) {hash = other.hash; return *this;} bool operator==(const Hash& other) const {return hash == other.hash;} bool operator!=(const Hash& other) const {return hash != other.hash;} @@ -502,7 +504,7 @@ public: * @brief HECL-specific xxhash * @return unique hash value */ - size_t hash() const {return m_hash.val();} + Hash hash() const {return m_hash;} bool operator==(const ProjectRootPath& other) const {return m_hash == other.m_hash;} bool operator!=(const ProjectRootPath& other) const {return m_hash != other.m_hash;} }; @@ -543,6 +545,21 @@ public: */ operator bool() const {return m_absPath.size() != 0;} + /** + * @brief Clears path + */ + void clear() + { + m_proj = nullptr; + m_absPath.clear(); + m_relPath.clear(); + m_hash = 0; +#if HECL_UCS2 + m_utf8AbsPath.clear(); + m_utf8RelPath.clear(); +#endif + } + /** * @brief Construct a project subpath representation within a project's root path * @param project previously constructed Project to use root path of @@ -814,7 +831,7 @@ public: * @brief HECL-specific xxhash * @return unique hash value */ - size_t hash() const {return m_hash.val();} + Hash hash() const {return m_hash;} bool operator==(const ProjectPath& other) const {return m_hash == other.m_hash;} bool operator!=(const ProjectPath& other) const {return m_hash != other.m_hash;} @@ -961,7 +978,7 @@ template <> struct hash template <> struct hash { size_t operator()(const HECL::ProjectPath& val) const NOEXCEPT - {return val.hash();} + {return val.hash().valSizeT();} }; }