diff --git a/luna/include/luna/OwnedStringView.h b/luna/include/luna/OwnedStringView.h index 4dd59332..50e208b3 100644 --- a/luna/include/luna/OwnedStringView.h +++ b/luna/include/luna/OwnedStringView.h @@ -9,14 +9,14 @@ class OwnedStringView OwnedStringView(const OwnedStringView&) = delete; ~OwnedStringView(); - Result clone(); + Result clone() const; - const char* chars() + const char* chars() const { return m_string; } - usize length() + usize length() const { return m_length; } diff --git a/luna/src/OwnedStringView.cpp b/luna/src/OwnedStringView.cpp index d81a30cf..1bf1b4ec 100644 --- a/luna/src/OwnedStringView.cpp +++ b/luna/src/OwnedStringView.cpp @@ -26,7 +26,7 @@ OwnedStringView::~OwnedStringView() if (m_string) destroy_array(m_string); } -Result OwnedStringView::clone() +Result OwnedStringView::clone() const { char* buf = TRY(make_array(m_length + 1));