BPackageInfo::StringBuilder: Fix writing non-string lists
Even a list with only one element needs to be enclosed in {...}.
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user