Mark expectedSize methods const
This commit is contained in:
parent
afa8e78911
commit
33ec968d5a
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue