Mark expectedSize methods const

This commit is contained in:
sfc-gh-tclinkenbeard 2020-12-26 18:30:44 -04:00
parent afa8e78911
commit 33ec968d5a
2 changed files with 2 additions and 2 deletions

View File

@ -451,7 +451,7 @@ struct ReadHotRangeWithMetrics {
ReadHotRangeWithMetrics(Arena& arena, const ReadHotRangeWithMetrics& rhs)
: keys(arena, rhs.keys), density(rhs.density), readBandwidth(rhs.readBandwidth) {}
int expectedSize() { return keys.expectedSize() + sizeof(density) + sizeof(readBandwidth); }
int expectedSize() const { return keys.expectedSize() + sizeof(density) + sizeof(readBandwidth); }
template <class Ar>
void serialize(Ar& ar) {

View File

@ -279,7 +279,7 @@ private:
StringRef p1, p2;
OpRef() {}
OpRef(Arena& a, OpRef const& o) : op(o.op), p1(a, o.p1), p2(a, o.p2) {}
size_t expectedSize() { return p1.expectedSize() + p2.expectedSize(); }
size_t expectedSize() const { return p1.expectedSize() + p2.expectedSize(); }
};
struct OpHeader {
int op;