diff --git a/DataSpec/DNACommon/CMDL.cpp b/DataSpec/DNACommon/CMDL.cpp index 4081375bd..7f4cb2ffa 100644 --- a/DataSpec/DNACommon/CMDL.cpp +++ b/DataSpec/DNACommon/CMDL.cpp @@ -208,7 +208,7 @@ public: m_cur = m_dl.get(); } - operator bool() { return ((m_cur - m_dl.get()) < intptr_t(m_dlSize)) && *m_cur; } + explicit operator bool() const { return ((m_cur - m_dl.get()) < intptr_t(m_dlSize)) && *m_cur; } GX::Primitive readPrimitive() { return GX::Primitive(*m_cur++ & 0xf8); } diff --git a/DataSpec/DNACommon/DNACommon.hpp b/DataSpec/DNACommon/DNACommon.hpp index 17809cbb7..4dc5c961a 100644 --- a/DataSpec/DNACommon/DNACommon.hpp +++ b/DataSpec/DNACommon/DNACommon.hpp @@ -396,7 +396,7 @@ public: ++m_idx; return *this; } - bool operator*() { return m_bmp.getBit(m_idx); } + bool operator*() const { return m_bmp.getBit(m_idx); } bool operator!=(const Iterator& other) const { return m_idx != other.m_idx; } }; Iterator begin() const { return Iterator(*this, 0); } diff --git a/DataSpec/DNAMP1/DCLN.hpp b/DataSpec/DNAMP1/DCLN.hpp index 1839b559b..305828698 100644 --- a/DataSpec/DNAMP1/DCLN.hpp +++ b/DataSpec/DNAMP1/DCLN.hpp @@ -74,7 +74,7 @@ struct DCLN : BigDNA { #endif }; Node root; - size_t getMemoryUsage() { return root.getMemoryUsage(); } + size_t getMemoryUsage() const { return root.getMemoryUsage(); } /* Dummy MP2 member */ void insertNoClimb(hecl::blender::PyOutStream&) const {} diff --git a/DataSpec/DNAMP1/SCAN.hpp b/DataSpec/DNAMP1/SCAN.hpp index 6bd76fc9b..701070ddd 100644 --- a/DataSpec/DNAMP1/SCAN.hpp +++ b/DataSpec/DNAMP1/SCAN.hpp @@ -98,7 +98,7 @@ struct SCAN : BigDNA { } } - void gatherDependencies(std::vector& pathsOut) { + void gatherDependencies(std::vector& pathsOut) const { g_curSpec->flattenDependencies(frame, pathsOut); g_curSpec->flattenDependencies(string, pathsOut); for (int i = 0; i < 4; ++i)