BPackageInfo::StringBuilder: Fix writing non-string lists

Even a list with only one element needs to be enclosed in {...}.
This commit is contained in:
Ingo Weinhold
2013-10-30 02:16:13 +01:00
parent 79d29839bf
commit 690bccd46a
@@ -130,10 +130,6 @@ private:
// encapsulating the stringification via templates seems to result in // encapsulating the stringification via templates seems to result in
// an Internal Compiler Error with gcc 2. // an Internal Compiler Error with gcc 2.
int32 count = value.CountItems();
if (count == 1) {
_WriteListElement(value.ItemAt(0));
} else {
_Write("{\n", 2); _Write("{\n", 2);
int32 count = value.CountItems(); int32 count = value.CountItems();
@@ -145,7 +141,6 @@ private:
_Write('}'); _Write('}');
} }
}
template<typename Value> template<typename Value>
void _WriteListElement(const Value* value) void _WriteListElement(const Value* value)