mirror of
https://github.com/Zygo/bees.git
synced 2025-06-16 17:46:16 +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>
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user