diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2024-01-21 12:31:30 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2024-01-21 12:31:30 +0100 |
| commit | 7dd49c6293172b494c78918507242cdb55d35137 (patch) | |
| tree | 9c8ab822ab9501a5ea2f937e609144e00ea091c4 /utf/src/utf32.cc | |
| parent | fc4547b412e28164af1bf8981234c6af959ccc0b (diff) | |
WIP
Diffstat (limited to 'utf/src/utf32.cc')
| -rw-r--r-- | utf/src/utf32.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utf/src/utf32.cc b/utf/src/utf32.cc index cfa29b6..e33b0b4 100644 --- a/utf/src/utf32.cc +++ b/utf/src/utf32.cc @@ -12,7 +12,7 @@ inline bool valid_codepoint(uint32_t c) { } // namespace -uint32_t read32be(std::string_view data, std::size_t& offset) { +uint32_t read32be(std::span<uint8_t const> data, std::size_t& offset) { if (offset > data.size() || data.size() - offset < 4) return NEED_MORE; uint32_t c = static_cast<uint32_t>(data[offset]) << 24 @@ -26,7 +26,7 @@ uint32_t read32be(std::string_view data, std::size_t& offset) { return INVALID; } -uint32_t read32le(std::string_view data, std::size_t& offset) { +uint32_t read32le(std::span<uint8_t const> data, std::size_t& offset) { if (offset > data.size() || data.size() - offset < 4) return NEED_MORE; uint32_t c = static_cast<uint32_t>(data[offset + 3]) << 24 |
