mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-01-19 09:36:47 +02:00
prettyPrint
-> shouldPrettyPrint
This commit is contained in:
parent
a27651908f
commit
1c5f5d4291
2 changed files with 5 additions and 5 deletions
|
@ -71,7 +71,7 @@ struct PrintOptions
|
|||
/**
|
||||
* True if pretty-printing is enabled.
|
||||
*/
|
||||
inline bool prettyPrint()
|
||||
inline bool shouldPrettyPrint()
|
||||
{
|
||||
return prettyIndent > 0;
|
||||
}
|
||||
|
|
|
@ -168,14 +168,14 @@ private:
|
|||
|
||||
void increaseIndent()
|
||||
{
|
||||
if (options.prettyPrint()) {
|
||||
if (options.shouldPrettyPrint()) {
|
||||
indent.append(options.prettyIndent, ' ');
|
||||
}
|
||||
}
|
||||
|
||||
void decreaseIndent()
|
||||
{
|
||||
if (options.prettyPrint()) {
|
||||
if (options.shouldPrettyPrint()) {
|
||||
assert(indent.size() >= options.prettyIndent);
|
||||
indent.resize(indent.size() - options.prettyIndent);
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ private:
|
|||
|
||||
bool shouldPrettyPrintAttrs(AttrVec & v)
|
||||
{
|
||||
if (!options.prettyPrint() || v.empty()) {
|
||||
if (!options.shouldPrettyPrint() || v.empty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -356,7 +356,7 @@ private:
|
|||
|
||||
bool shouldPrettyPrintList(std::span<Value * const> list)
|
||||
{
|
||||
if (!options.prettyPrint() || list.empty()) {
|
||||
if (!options.shouldPrettyPrint() || list.empty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue