From 6a52dcc16e6df9172b4c59c648033c1ede9535b7 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Mon, 22 Jan 2024 15:52:05 -0800 Subject: [PATCH] Remove [[maybe_unused]] now that there's no anon namespace --- ConflictSet.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index e9a616c..3f1a897 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -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 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 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 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 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) {