mirror of
https://github.com/Zygo/bees.git
synced 2025-05-18 05:45:45 +02:00
BeesBlockData: fix data type issues
Not sure if these cause any problems, but they are theoretically incorrect data types. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
5bdad7fc93
commit
082f04818f
@ -945,9 +945,9 @@ BeesBlockData::data() const
|
|||||||
BEESTOOLONG("Reading BeesBlockData " << *this);
|
BEESTOOLONG("Reading BeesBlockData " << *this);
|
||||||
Timer read_timer;
|
Timer read_timer;
|
||||||
|
|
||||||
Blob rv(m_length);
|
Blob rv(size());
|
||||||
pread_or_die(m_fd, rv, m_offset);
|
pread_or_die(m_fd, rv, m_offset);
|
||||||
THROW_CHECK2(runtime_error, rv.size(), m_length, ranged_cast<off_t>(rv.size()) == m_length);
|
THROW_CHECK2(runtime_error, rv.size(), size(), ranged_cast<off_t>(rv.size()) == size());
|
||||||
m_data = rv;
|
m_data = rv;
|
||||||
BEESCOUNT(block_read);
|
BEESCOUNT(block_read);
|
||||||
BEESCOUNTADD(block_bytes, rv.size());
|
BEESCOUNTADD(block_bytes, rv.size());
|
||||||
|
@ -596,7 +596,7 @@ private:
|
|||||||
ostream & operator<<(ostream &os, const BeesHash &bh);
|
ostream & operator<<(ostream &os, const BeesHash &bh);
|
||||||
|
|
||||||
class BeesBlockData {
|
class BeesBlockData {
|
||||||
using Blob = vector<char>;
|
using Blob = vector<uint8_t>;
|
||||||
|
|
||||||
mutable Fd m_fd;
|
mutable Fd m_fd;
|
||||||
off_t m_offset;
|
off_t m_offset;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user