io/FileDescriptor: pass std::span to ReadAt()
This commit is contained in:
parent
ebfc83dac5
commit
59199b5620
|
@ -236,9 +236,8 @@ public:
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
ssize_t ReadAt(off_t offset,
|
ssize_t ReadAt(off_t offset, std::span<std::byte> dest) const noexcept {
|
||||||
void *buffer, std::size_t length) const noexcept {
|
return ::pread(fd, dest.data(), dest.size(), offset);
|
||||||
return ::pread(fd, buffer, length, offset);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue