summaryrefslogtreecommitdiff
path: root/src/u8.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/u8.hh')
-rw-r--r--src/u8.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/u8.hh b/src/u8.hh
index 5292602..d673caa 100644
--- a/src/u8.hh
+++ b/src/u8.hh
@@ -13,7 +13,7 @@ namespace u8 {
template <std::forward_iterator T>
requires std::is_same_v<std::iter_value_t<T>, uint8_t>
-std::expected<uint32_t, u::ReadError> read(T& start, const T& end) {
+std::expected<uint32_t, u::ReadError> read(T& start, T const& end) {
if (start == end)
return std::unexpected(u::ReadError::End);
uint32_t u;
@@ -106,7 +106,7 @@ std::expected<uint32_t, u::ReadError> read(T& start, const T& end) {
template <std::forward_iterator T>
requires std::is_same_v<std::iter_value_t<T>, uint8_t>
std::expected<uint32_t, u::ReadErrorReplace> read_replace(T& start,
- const T& end,
+ T const& end,
bool eof) {
auto const tmp = start;
auto ret = read(start, end);
@@ -128,7 +128,7 @@ std::expected<uint32_t, u::ReadErrorReplace> read_replace(T& start,
template <std::forward_iterator T>
requires std::is_same_v<std::iter_value_t<T>, uint8_t>
-bool write(T& start, const T& end, uint32_t code) {
+bool write(T& start, T const& end, uint32_t code) {
if (code < 0x80) {
if (start == end)
return false;
@@ -164,7 +164,7 @@ bool write(T& start, const T& end, uint32_t code) {
template <std::forward_iterator T>
requires std::is_same_v<std::iter_value_t<T>, uint8_t>
-bool skip(T& start, const T& end) {
+bool skip(T& start, T const& end) {
if (start == end)
return false;
switch (*start >> 4) {