Remove [[maybe_unused]] now that there's no anon namespace

This commit is contained in:
2024-01-22 15:52:05 -08:00
parent 623b56db9d
commit 6a52dcc16e

View File

@@ -535,7 +535,7 @@ struct ReferenceImpl {
using Key = ConflictSet::Key;
[[maybe_unused]] Key toKey(Arena &arena, int n) {
Key toKey(Arena &arena, int n) {
constexpr int kMaxLength = 8;
int i = kMaxLength;
uint8_t *itoaBuf = new (arena) uint8_t[kMaxLength];
@@ -547,7 +547,7 @@ using Key = ConflictSet::Key;
return Key{itoaBuf, kMaxLength};
}
[[maybe_unused]] Key toKeyAfter(Arena &arena, int n) {
Key toKeyAfter(Arena &arena, int n) {
constexpr int kMaxLength = 8;
int i = kMaxLength;
uint8_t *itoaBuf = new (arena) uint8_t[kMaxLength + 1];
@@ -723,7 +723,7 @@ void lastLeqMulti(Arena &arena, Node *root, std::span<Key> keys,
// Return a pointer to the node whose key immediately follows `n`'s key (if
// `dir` is false, precedes). Return nullptr if none exists.
[[maybe_unused]] Node *next(Node *n, bool dir) {
Node *next(Node *n, bool dir) {
// Traverse left spine of right child (when moving right, i.e. dir = true)
if (n->child[dir]) {
n = n->child[dir];
@@ -744,7 +744,7 @@ void lastLeqMulti(Arena &arena, Node *root, std::span<Key> keys,
// Return a pointer to the node whose key is greatest among keys in the tree
// rooted at `n` (if dir = false, least). Return nullptr if none exists (i.e.
// `n` is null).
[[maybe_unused]] Node *extrema(Node *n, bool dir) {
Node *extrema(Node *n, bool dir) {
if (n == nullptr) {
return nullptr;
}
@@ -754,7 +754,7 @@ void lastLeqMulti(Arena &arena, Node *root, std::span<Key> keys,
return n;
}
[[maybe_unused]] void debugPrintDot(FILE *file, Node *node) {
void debugPrintDot(FILE *file, Node *node) {
struct DebugDotPrinter {
@@ -810,7 +810,7 @@ void lastLeqMulti(Arena &arena, Node *root, std::span<Key> keys,
fprintf(file, "}\n");
}
[[maybe_unused]] void printLogical(std::string &result, Node *node) {
void printLogical(std::string &result, Node *node) {
for (auto iter = extrema(node, false); iter != nullptr;) {
auto *next = ::next(iter, true);
std::string key;
@@ -887,7 +887,7 @@ void rotate(Node **node, bool dir) {
updateMaxVersion(l);
}
[[maybe_unused]] void checkParentPointers(Node *node, bool &success) {
void checkParentPointers(Node *node, bool &success) {
for (int i = 0; i < 2; ++i) {
if (node->child[i] != nullptr) {
if (node->child[i]->parent != node) {
@@ -901,7 +901,7 @@ void rotate(Node **node, bool dir) {
}
}
[[maybe_unused]] int64_t checkMaxVersion(Node *node, bool &success) {
int64_t checkMaxVersion(Node *node, bool &success) {
int64_t expected = std::max(node->pointVersion, node->rangeVersion);
for (int i = 0; i < 2; ++i) {
if (node->child[i] != nullptr) {