mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-03 15:17:29 +00:00
Refactor JSON::writeClose
This commit is contained in:
parent
cb4debe75f
commit
dfa7d414f5
@ -32,11 +32,13 @@ JSON::JSON(std::shared_ptr<JSON_value> value) :
|
||||
void
|
||||
JSON::writeClose(Pipeline* p, bool first, size_t depth, char const* delimiter)
|
||||
{
|
||||
if (!first) {
|
||||
*p << "\n";
|
||||
writeIndent(p, depth);
|
||||
if (first) {
|
||||
*p << delimiter;
|
||||
} else {
|
||||
std::string s{"\n"};
|
||||
s.append(2 * depth, ' ');
|
||||
*p << s + delimiter;
|
||||
}
|
||||
*p << delimiter;
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user