[era] era_dump should show bool values as 'true' or 'false' rather than 0 or 1

This commit is contained in:
Joe Thornber 2014-09-01 14:45:05 +01:00
parent 8761b6defc
commit 4c04a18b05
1 changed files with 5 additions and 1 deletions

View File

@ -47,7 +47,7 @@ namespace {
void writeset_bit(uint32_t bit, bool value) {
out_.indent();
// FIXME: collect all the bits, then uuencode
out_ << "<bit block=\"" << bit << "\" value=\"" << value << "\"/>" << endl;
out_ << "<bit block=\"" << bit << "\" value=\"" << truth_value(value) << "\"/>" << endl;
}
void end_writeset() {
@ -74,6 +74,10 @@ namespace {
out_ << "</era_array>" << endl;
}
char const *truth_value(bool v) const {
return v ? "true" : "false";
}
private:
indented_stream out_;
};