Make all methods in OwnedStringView const
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
apio 2022-12-16 19:48:22 +01:00
parent 2e24e09146
commit 4a6c59d519
Signed by: apio
GPG Key ID: B8A7D06E42258954
2 changed files with 4 additions and 4 deletions

View File

@ -9,14 +9,14 @@ class OwnedStringView
OwnedStringView(const OwnedStringView&) = delete;
~OwnedStringView();
Result<OwnedStringView> clone();
Result<OwnedStringView> clone() const;
const char* chars()
const char* chars() const
{
return m_string;
}
usize length()
usize length() const
{
return m_length;
}

View File

@ -26,7 +26,7 @@ OwnedStringView::~OwnedStringView()
if (m_string) destroy_array(m_string);
}
Result<OwnedStringView> OwnedStringView::clone()
Result<OwnedStringView> OwnedStringView::clone() const
{
char* buf = TRY(make_array<char>(m_length + 1));