mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
io: Fix name lookup for read_exact friend specializations
This commit is contained in:
parent
a2ea3bfd6c
commit
f35de20c72
1 changed files with 46 additions and 42 deletions
|
|
@ -448,7 +448,14 @@ public:
|
|||
return head_;
|
||||
}
|
||||
|
||||
friend void read_exact(SpanStream& stream, tcb::span<std::byte> buffer)
|
||||
friend void read_exact(SpanStream& stream, tcb::span<std::byte> buffer);
|
||||
|
||||
private:
|
||||
tcb::span<std::byte> span_;
|
||||
std::size_t head_ {0};
|
||||
};
|
||||
|
||||
inline void read_exact(SpanStream& stream, tcb::span<std::byte> buffer)
|
||||
{
|
||||
const std::size_t remaining = stream.span_.size() - stream.head_;
|
||||
const std::size_t buffer_size = buffer.size();
|
||||
|
|
@ -470,11 +477,6 @@ public:
|
|||
std::copy(copy_begin, copy_end, buffer.begin());
|
||||
}
|
||||
|
||||
private:
|
||||
tcb::span<std::byte> span_;
|
||||
std::size_t head_ {0};
|
||||
};
|
||||
|
||||
class VecStream {
|
||||
std::vector<std::byte> vec_;
|
||||
std::size_t head_ {0};
|
||||
|
|
@ -543,7 +545,10 @@ public:
|
|||
|
||||
std::vector<std::byte>& vector() { return vec_; }
|
||||
|
||||
friend void read_exact(VecStream& stream, tcb::span<std::byte> buffer)
|
||||
friend void read_exact(VecStream& stream, tcb::span<std::byte> buffer);
|
||||
};
|
||||
|
||||
inline void read_exact(VecStream& stream, tcb::span<std::byte> buffer)
|
||||
{
|
||||
const std::size_t remaining = stream.vec_.size() - stream.head_;
|
||||
const std::size_t buffer_size = buffer.size();
|
||||
|
|
@ -564,7 +569,6 @@ public:
|
|||
|
||||
std::copy(copy_begin, copy_end, buffer.begin());
|
||||
}
|
||||
};
|
||||
|
||||
class ZlibException : public std::exception {
|
||||
int err_ {0};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue