libluna: Add/remove some const qualifiers

This commit is contained in:
apio 2023-04-07 11:52:20 +02:00
parent 1c6fd95a70
commit 1210d2b7da
Signed by: apio
GPG Key ID: B8A7D06E42258954
3 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ class Buffer
Result<u8*> slice(usize offset, usize size); Result<u8*> slice(usize offset, usize size);
Result<void> append_data(u8* data, usize size); Result<void> append_data(const u8* data, usize size);
u8* data() u8* data()
{ {

View File

@ -122,7 +122,7 @@ template <typename T> class Result
return m_value.try_move_value(ref); return m_value.try_move_value(ref);
} }
bool try_move_value_or_error(T& ref, int& err) const bool try_move_value_or_error(T& ref, int& err)
{ {
bool ok = m_value.try_move_value(ref); bool ok = m_value.try_move_value(ref);
if (!ok) err = m_error; if (!ok) err = m_error;

View File

@ -46,7 +46,7 @@ Result<u8*> Buffer::slice(usize offset, usize size)
return m_data + offset; return m_data + offset;
} }
Result<void> Buffer::append_data(u8* data, usize size) Result<void> Buffer::append_data(const u8* data, usize size)
{ {
memcpy(TRY(slice_at_end(size)), data, size); memcpy(TRY(slice_at_end(size)), data, size);