mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-19 22:05:42 +00:00
Further fixes to make minireflect compatible with old behavior.
Change-Id: I92c257ec4ab4a0cf4676bd98523b766ce25bf4f6
This commit is contained in:
@@ -360,17 +360,21 @@ struct ToStringVisitor : public IterationVisitor {
|
|||||||
void Unknown(const uint8_t *) { s += "(?)"; }
|
void Unknown(const uint8_t *) { s += "(?)"; }
|
||||||
void StartVector() {
|
void StartVector() {
|
||||||
s += "[";
|
s += "[";
|
||||||
s += d;
|
|
||||||
if (vector_delimited) {
|
if (vector_delimited) {
|
||||||
|
s += d;
|
||||||
indent_level++;
|
indent_level++;
|
||||||
append_indent();
|
append_indent();
|
||||||
|
} else {
|
||||||
|
s += " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void EndVector() {
|
void EndVector() {
|
||||||
s += d;
|
|
||||||
if (vector_delimited) {
|
if (vector_delimited) {
|
||||||
|
s += d;
|
||||||
indent_level--;
|
indent_level--;
|
||||||
append_indent();
|
append_indent();
|
||||||
|
} else {
|
||||||
|
s += " ";
|
||||||
}
|
}
|
||||||
s += "]";
|
s += "]";
|
||||||
}
|
}
|
||||||
@@ -378,9 +382,11 @@ struct ToStringVisitor : public IterationVisitor {
|
|||||||
const TypeTable * /*type_table*/, const uint8_t * /*val*/) {
|
const TypeTable * /*type_table*/, const uint8_t * /*val*/) {
|
||||||
if (i) {
|
if (i) {
|
||||||
s += ",";
|
s += ",";
|
||||||
s += d;
|
|
||||||
if (vector_delimited) {
|
if (vector_delimited) {
|
||||||
|
s += d;
|
||||||
append_indent();
|
append_indent();
|
||||||
|
} else {
|
||||||
|
s += " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user