message: More uses of getter
diff: @@ -36,7 +36,7 @@ VectorStream::VectorStream(const std::string& filename) {
  binary.seekg(0, std::ios::beg);
  // reserve capacity
  - this->binary_.resize(this->size_ + 30, 0);
  + this->binary_.resize(this->size() + 30, 0);
  std::copy(
  std::istreambuf_iterator<char>(binary),
  std::istreambuf_iterator<char>(),
  @@ -50,10 +50,10 @@ VectorStream::VectorStream(const std::string& filename) {
  VectorStream::VectorStream(const std::vector<uint8_t>& data) :
  - binary_(data)
  -{
  - this->size_ = data.size();
  -}
  + binary_{data},
  + size_{data.size()}
  +
  +{}
  uint64_t VectorStream::size(void) const {
  @@ -63,15 +63,16 @@ uint64_t VectorStream::size(void) const {
  const void* VectorStream::read(uint64_t offset, uint64_t size) const {
  - if (offset > this->size_ or (offset + size) > this->size_) {
  - LOG(DEBUG) << "Offset: " << std::hex << offset << std::endl;
  - LOG(DEBUG) << "Size: " << std::hex << size << std::endl;
  + if (offset > this->size() or (offset + size) > this->size()) {
  + LOG(DEBUG) << "Offset: " << std::hex << offset;
  + LOG(DEBUG) << "Size: " << std::hex << size;
  + LOG(DEBUG) << "Binary Size: " << std::hex << this->size();
  - if (offset > this->size_) {
  + if (offset > this->size()) {
  throw LIEF::read_out_of_bound(offset);
  }
  - if ((offset + size) > this->size_) {
  + if ((offset + size) > this->size()) {
  throw LIEF::read_out_of_bound(offset, size);
  }
  }
  @@ -82,7 +83,7 @@ const void* VectorStream::read(uint64_t offset, uint64_t size) const {
  const char* VectorStream::read_string(uint64_t offset) const {
  - if (offset > this->size_) {
  + if (offset > this->size()) {
  throw LIEF::read_out_of_bound(offset);
  }
  return reinterpret_cast<const char*>(this->binary_.data() + offset);
  