Skip to content

Commit

Permalink
Add missing const to flecs::string_view getters
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyoyuppe committed Aug 5, 2023
1 parent 88bcbc3 commit 2a9565a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/flecs/addons/cpp/utils/string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,16 @@ struct string {
return m_const_str;
}

std::size_t length() {
std::size_t length() const {
return static_cast<std::size_t>(m_length);
}

template <size_t N>
static constexpr size_t length( char const (&)[N] ) {
static constexpr size_t length( char const (&)[N] ) const {
return N - 1;
}

std::size_t size() {
std::size_t size() const {
return length();
}

Expand Down

0 comments on commit 2a9565a

Please sign in to comment.