mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
fd: finish deprecating vector<uint8_t> in IO wrapper functions
We can simply remove the template specializations, but if we do that, then existing code might accidentally write out the vector<uint8_t> struct. Prevent regressions by deleting the vector specializations, making any code that uses them fail to build. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
14cd6ed033
commit
55dc98e21a
@ -130,8 +130,8 @@ namespace crucible {
|
|||||||
template<> void pread_or_die<ByteVector>(int fd, ByteVector& str, off_t offset);
|
template<> void pread_or_die<ByteVector>(int fd, ByteVector& str, off_t offset);
|
||||||
template<> void pwrite_or_die<ByteVector>(int fd, const ByteVector& str, off_t offset);
|
template<> void pwrite_or_die<ByteVector>(int fd, const ByteVector& str, off_t offset);
|
||||||
// Deprecated
|
// Deprecated
|
||||||
template<> void pread_or_die<vector<uint8_t>>(int fd, vector<uint8_t>& str, off_t offset);
|
template<> void pread_or_die<vector<uint8_t>>(int fd, vector<uint8_t>& str, off_t offset) = delete;
|
||||||
template<> void pwrite_or_die<vector<uint8_t>>(int fd, const vector<uint8_t>& str, off_t offset);
|
template<> void pwrite_or_die<vector<uint8_t>>(int fd, const vector<uint8_t>& str, off_t offset) = delete;
|
||||||
template<> void pread_or_die<vector<char>>(int fd, vector<char>& str, off_t offset) = delete;
|
template<> void pread_or_die<vector<char>>(int fd, vector<char>& str, off_t offset) = delete;
|
||||||
template<> void pwrite_or_die<vector<char>>(int fd, const vector<char>& str, off_t offset) = delete;
|
template<> void pwrite_or_die<vector<char>>(int fd, const vector<char>& str, off_t offset) = delete;
|
||||||
|
|
||||||
|
14
lib/fd.cc
14
lib/fd.cc
@ -463,20 +463,6 @@ namespace crucible {
|
|||||||
return pread_or_die(fd, text.data(), text.size(), offset);
|
return pread_or_die(fd, text.data(), text.size(), offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
|
||||||
void
|
|
||||||
pread_or_die<vector<uint8_t>>(int fd, vector<uint8_t> &text, off_t offset)
|
|
||||||
{
|
|
||||||
return pread_or_die(fd, text.data(), text.size(), offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<>
|
|
||||||
void
|
|
||||||
pwrite_or_die<vector<uint8_t>>(int fd, const vector<uint8_t> &text, off_t offset)
|
|
||||||
{
|
|
||||||
return pwrite_or_die(fd, text.data(), text.size(), offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void
|
void
|
||||||
pwrite_or_die<ByteVector>(int fd, const ByteVector &text, off_t offset)
|
pwrite_or_die<ByteVector>(int fd, const ByteVector &text, off_t offset)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user