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/utf16.cc | |
| parent | fc4547b412e28164af1bf8981234c6af959ccc0b (diff) | |
WIP
Diffstat (limited to 'utf/src/utf16.cc')
| -rw-r--r-- | utf/src/utf16.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utf/src/utf16.cc b/utf/src/utf16.cc index 43595bf..623c1be 100644 --- a/utf/src/utf16.cc +++ b/utf/src/utf16.cc @@ -16,7 +16,7 @@ inline bool is_low_surrogate(uint16_t c) { } // namespace -uint32_t read16be(std::string_view data, std::size_t& offset) { +uint32_t read16be(std::span<uint8_t const> data, std::size_t& offset) { if (offset > data.size() || data.size() - offset < 2) return NEED_MORE; uint16_t c = static_cast<uint16_t>(data[offset]) << 8 @@ -40,7 +40,7 @@ uint32_t read16be(std::string_view data, std::size_t& offset) { return c; } -uint32_t read16le(std::string_view data, std::size_t& offset) { +uint32_t read16le(std::span<uint8_t const> data, std::size_t& offset) { if (offset > data.size() || data.size() - offset < 2) return NEED_MORE; uint16_t c = static_cast<uint16_t>(data[offset + 1]) << 8 |
