Skip to content

Commit

Permalink
Improve const-correctness for BppTree accessors
Browse files Browse the repository at this point in the history
  • Loading branch information
jeaye authored and jeffplaisance committed Jul 20, 2024
1 parent b383f37 commit 9d8417a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/bpptree/bpptree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,19 @@ class BppTreeDetail {
using IteratorType = IteratorDetail<Value, typename Parent::SelfType, LeafNode, is_const, reverse>;

public:
[[nodiscard]] size_t size() {
[[nodiscard]] size_t size() const {
return tree_size;
}

[[nodiscard]] constexpr size_t max_size() {
[[nodiscard]] constexpr size_t max_size() const {
return max_size_v;
}

[[nodiscard]] size_t depth() {
[[nodiscard]] size_t depth() const {
return std::as_const(this->self()).dispatch([](auto const& root){ return static_cast<size_t>(root->depth); });
}

[[nodiscard]] constexpr size_t max_depth() {
[[nodiscard]] constexpr size_t max_depth() const {
return max_depth_v;
}

Expand Down

0 comments on commit 9d8417a

Please sign in to comment.