Skip to content

Commit

Permalink
fix the JSONFormatter flush & close_section
Browse files Browse the repository at this point in the history
  • Loading branch information
Aran85 committed Jul 31, 2015
1 parent 5c6075f commit b1c6d22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/Formatter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ void JSONFormatter::flush(std::ostream& os)
{
finish_pending_string();
os << m_ss.str();
if (m_pretty)
os << "\n";
m_ss.clear();
m_ss.str("");
}
Expand Down Expand Up @@ -238,6 +236,8 @@ void JSONFormatter::close_section()
}
m_ss << (entry.is_array ? ']' : '}');
m_stack.pop_back();
if (m_pretty && (!m_stack.size()))
m_ss << "\n";
}

void JSONFormatter::finish_pending_string()
Expand Down

0 comments on commit b1c6d22

Please sign in to comment.