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