1
0
Mirror von https://github.com/tkuschel/bees.git synchronisiert 2026-06-19 06:57:54 +02:00

fd: start deprecating vector<uint8_t> for p{read,write}_or_die

Add support for pread and pwrite of ByteVector objects alongside
vector<uint8_t>.  A later commit will delete the template specializations
for vector<uint8_t>, but existing users have to be updated to use
ByteVector first.

Nothing currently uses vector<char>, so we can delete that immediately.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
Dieser Commit ist enthalten in:
Zygo Blaxell
2021-10-12 12:12:14 -04:00
Ursprung bba6f4f183
Commit 99709d889f
2 geänderte Dateien mit 9 neuen und 5 gelöschten Zeilen
+2 -2
Datei anzeigen
@@ -458,7 +458,7 @@ namespace crucible {
template<>
void
pread_or_die<vector<char>>(int fd, vector<char> &text, off_t offset)
pread_or_die<ByteVector>(int fd, ByteVector &text, off_t offset)
{
return pread_or_die(fd, text.data(), text.size(), offset);
}
@@ -479,7 +479,7 @@ namespace crucible {
template<>
void
pwrite_or_die<vector<char>>(int fd, const vector<char> &text, off_t offset)
pwrite_or_die<ByteVector>(int fd, const ByteVector &text, off_t offset)
{
return pwrite_or_die(fd, text.data(), text.size(), offset);
}