From ce1dc87711e06d1b04e444e3215ad8d35f191abd Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 29 Jun 2024 14:01:10 +0200 Subject: [PATCH] Refactor: rename ValuePrinter::totalAttrsPrinted Make it more distinct from the attrs printed of any specific attrset. --- src/libexpr/print.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libexpr/print.cc b/src/libexpr/print.cc index 4e44fa721..5f6a08cfe 100644 --- a/src/libexpr/print.cc +++ b/src/libexpr/print.cc @@ -163,7 +163,7 @@ private: EvalState & state; PrintOptions options; std::optional seen; - size_t attrsPrinted = 0; + size_t totalAttrsPrinted = 0; size_t listItemsPrinted = 0; std::string indent; @@ -350,7 +350,7 @@ private: for (auto & i : sorted) { printSpace(prettyPrint); - if (attrsPrinted >= options.maxAttrs) { + if (totalAttrsPrinted >= options.maxAttrs) { printElided(sorted.size() - currentAttrsPrinted, "attribute", "attributes"); break; } @@ -359,7 +359,7 @@ private: output << " = "; print(*i.second, depth + 1); output << ";"; - attrsPrinted++; + totalAttrsPrinted++; currentAttrsPrinted++; } @@ -591,7 +591,7 @@ public: void print(Value & v) { - attrsPrinted = 0; + totalAttrsPrinted = 0; listItemsPrinted = 0; indent.clear();