Skip to content

Commit

Permalink
Merge pull request #175 from Quuxplusone/suggest-override
Browse files Browse the repository at this point in the history
Fix -Wsuggest-override warnings from Clang
  • Loading branch information
danilak-G authored Apr 4, 2024
2 parents 6b2eb70 + 41a3ade commit 23b3286
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions snappy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1888,16 +1888,16 @@ class SnappyIOVecReader : public Source {
if (total_size > 0 && curr_size_remaining_ == 0) Advance();
}

~SnappyIOVecReader() = default;
~SnappyIOVecReader() override = default;

size_t Available() const { return total_size_remaining_; }
size_t Available() const override { return total_size_remaining_; }

const char* Peek(size_t* len) {
const char* Peek(size_t* len) override {
*len = curr_size_remaining_;
return curr_pos_;
}

void Skip(size_t n) {
void Skip(size_t n) override {
while (n >= curr_size_remaining_ && n > 0) {
n -= curr_size_remaining_;
Advance();
Expand Down Expand Up @@ -2535,7 +2535,6 @@ bool SnappyScatteredWriter<Allocator>::SlowAppendFromSelf(size_t offset,
class SnappySinkAllocator {
public:
explicit SnappySinkAllocator(Sink* dest) : dest_(dest) {}
~SnappySinkAllocator() {}

char* Allocate(int size) {
Datablock block(new char[size], size);
Expand Down

0 comments on commit 23b3286

Please sign in to comment.