diff --git a/cpp/csp/core/Enum.h b/cpp/csp/core/Enum.h index d6dac5ee..aac11fd5 100644 --- a/cpp/csp/core/Enum.h +++ b/cpp/csp/core/Enum.h @@ -110,8 +110,8 @@ struct Enum : public EnumTraits iterator( int v ) : m_v( v ) {} Enum operator*() { return Enum( ( EnumV ) m_v ); } - bool operator==(const iterator &rhs) { return m_v == rhs.m_v; } - bool operator!=(const iterator &rhs) { return !(*this == rhs); } + bool operator==(const iterator &rhs) const { return m_v == rhs.m_v; } + bool operator!=(const iterator &rhs) const { return !(*this == rhs); } iterator &operator++() { ++m_v; diff --git a/cpp/csp/engine/DialectGenericType.h b/cpp/csp/engine/DialectGenericType.h index 0aa0dfad..23a008e8 100644 --- a/cpp/csp/engine/DialectGenericType.h +++ b/cpp/csp/engine/DialectGenericType.h @@ -28,7 +28,7 @@ struct CSPTYPESIMPL_EXPORT DialectGenericType size_t hash() const; private: - [[maybe_unused]] void* m_data; + [[maybe_unused]] void* m_data = nullptr; }; CSPTYPESIMPL_EXPORT std::ostream & operator<<( std::ostream & o, const DialectGenericType & obj );