Make all methods in OwnedStringView const
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2e24e09146
commit
4a6c59d519
@ -9,14 +9,14 @@ class OwnedStringView
|
|||||||
OwnedStringView(const OwnedStringView&) = delete;
|
OwnedStringView(const OwnedStringView&) = delete;
|
||||||
~OwnedStringView();
|
~OwnedStringView();
|
||||||
|
|
||||||
Result<OwnedStringView> clone();
|
Result<OwnedStringView> clone() const;
|
||||||
|
|
||||||
const char* chars()
|
const char* chars() const
|
||||||
{
|
{
|
||||||
return m_string;
|
return m_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
usize length()
|
usize length() const
|
||||||
{
|
{
|
||||||
return m_length;
|
return m_length;
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ OwnedStringView::~OwnedStringView()
|
|||||||
if (m_string) destroy_array(m_string);
|
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));
|
char* buf = TRY(make_array<char>(m_length + 1));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user