From 50348284f5d82ccfd65b0c803ba0ba895912ceff Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Thu, 18 Sep 2025 23:57:56 +0200 Subject: java::uescape: Unicode reader that knows about Java's \uXXXX escapes --- src/umod8.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/umod8.hh') diff --git a/src/umod8.hh b/src/umod8.hh index 4731942..4423f52 100644 --- a/src/umod8.hh +++ b/src/umod8.hh @@ -13,7 +13,7 @@ namespace umod8 { template requires std::is_same_v, uint8_t> -std::expected read(T& start, const T& end) { +std::expected read(T& start, T const& end) { if (start == end) return std::unexpected(u::ReadError::End); uint32_t u; @@ -115,7 +115,7 @@ std::expected read(T& start, const T& end) { template requires std::is_same_v, uint8_t> std::expected read_replace(T& start, - const T& end, + T const& end, bool eof) { auto const tmp = start; auto ret = read(start, end); @@ -137,7 +137,7 @@ std::expected read_replace(T& start, template requires std::is_same_v, uint8_t> -bool write(T& start, const T& end, uint32_t code) { +bool write(T& start, T const& end, uint32_t code) { if (code > 0 && code < 0x80) { if (start == end) return false; -- cgit v1.3