diff options
Diffstat (limited to 'src/u16.hh')
| -rw-r--r-- | src/u16.hh | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -13,7 +13,7 @@ namespace u16 { template <std::forward_iterator T> requires std::is_same_v<std::iter_value_t<T>, uint16_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); uint16_t u = *start; @@ -39,7 +39,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>, uint16_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); @@ -61,7 +61,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>, uint16_t> -bool write(T& start, const T& end, uint32_t code) { +bool write(T& start, T const& end, uint32_t code) { if (code < 0x10000) { if (start == end) return false; @@ -80,7 +80,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>, uint16_t> -bool skip(T& start, const T& end) { +bool skip(T& start, T const& end) { if (start == end) return false; if (*start >= 0xd800 && *start <= 0xdbff) { |
