fixed filedat[] to const & fixed color << operators

This commit is contained in:
zawz 2019-09-26 11:03:57 +02:00
parent 96637468dc
commit 03bf9107e4
2 changed files with 5 additions and 3 deletions

View file

@ -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

View file

@ -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<std::string, chunkdat> const& a)