[space-map] Make the version of inc/dec that take a count the only one.

This commit is contained in:
Joe Thornber
2020-05-26 09:12:45 +01:00
parent cc806a0daa
commit 50f8e792d3
6 changed files with 19 additions and 41 deletions

View File

@@ -106,21 +106,21 @@ namespace {
sm_->commit();
}
virtual void inc(block_address b) {
virtual void inc(block_address b, ref_t count) override {
if (depth_)
add_op(b, block_op(INC, 1));
add_op(b, block_op(INC, count));
else {
recursing_lock lock(*this);
return sm_->inc(b);
return sm_->inc(b, count);
}
}
virtual void dec(block_address b) {
virtual void dec(block_address b, ref_t count) override {
if (depth_)
add_op(b, block_op(INC, -1));
add_op(b, block_op(INC, -count));
else {
recursing_lock lock(*this);
return sm_->dec(b);
return sm_->dec(b, count);
}
}