Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve const-correctness for BppTree accessors #2

Merged
merged 1 commit into from
Jul 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading