From 082f04818f3af0f21a38f017b89a8a8ace98f316 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Sat, 10 Feb 2018 00:23:05 -0500 Subject: [PATCH] BeesBlockData: fix data type issues Not sure if these cause any problems, but they are theoretically incorrect data types. Signed-off-by: Zygo Blaxell --- src/bees-types.cc | 4 ++-- src/bees.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bees-types.cc b/src/bees-types.cc index cfbec24..3ac37af 100644 --- a/src/bees-types.cc +++ b/src/bees-types.cc @@ -945,9 +945,9 @@ BeesBlockData::data() const BEESTOOLONG("Reading BeesBlockData " << *this); Timer read_timer; - Blob rv(m_length); + Blob rv(size()); pread_or_die(m_fd, rv, m_offset); - THROW_CHECK2(runtime_error, rv.size(), m_length, ranged_cast(rv.size()) == m_length); + THROW_CHECK2(runtime_error, rv.size(), size(), ranged_cast(rv.size()) == size()); m_data = rv; BEESCOUNT(block_read); BEESCOUNTADD(block_bytes, rv.size()); diff --git a/src/bees.h b/src/bees.h index 136884a..8027b59 100644 --- a/src/bees.h +++ b/src/bees.h @@ -596,7 +596,7 @@ private: ostream & operator<<(ostream &os, const BeesHash &bh); class BeesBlockData { - using Blob = vector; + using Blob = vector; mutable Fd m_fd; off_t m_offset;