diff --git a/include/color.hpp b/include/color.hpp index caa6778..d426daf 100644 --- a/include/color.hpp +++ b/include/color.hpp @@ -114,7 +114,9 @@ namespace ztd }; //! Insert color code to stream - inline std::ostream& operator<<(std::ostream& st, const color& c) { return st << c.code(); } + inline std::ostream& operator<<(std::ostream& st, const ztd::color& c) { return st << c.code(); } + //! Insert color code to stream + inline std::ostream& operator<<(std::ostream& st, const ztd::color::color_name& c) { return st << ztd::color::color_index[c]; } } #endif //COLOR_HPP diff --git a/include/filedat.hpp b/include/filedat.hpp index 3ce9a46..74e1ddb 100644 --- a/include/filedat.hpp +++ b/include/filedat.hpp @@ -342,10 +342,10 @@ namespace ztd //! @brief Reference to subchunk //! @see chunkdat::operator[](std::string const &a) const - inline chunkdat& operator[](const std::string& index) { return m_dataChunk->subChunkRef(index); } + inline chunkdat& operator[](const std::string& index) const { return m_dataChunk->subChunkRef(index); } //! @brief Reference to subchunk //! @see chunkdat::operator[](const unsigned int a) const - inline chunkdat& operator[](const unsigned int index) { return m_dataChunk->subChunkRef(index); } + inline chunkdat& operator[](const unsigned int index) const { return m_dataChunk->subChunkRef(index); } //! @brief add data and return *this //! @see chunkdat::operator+=(std::pair const& a)