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,21 +130,16 @@ 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.
|
||||||
|
|
||||||
|
_Write("{\n", 2);
|
||||||
|
|
||||||
int32 count = value.CountItems();
|
int32 count = value.CountItems();
|
||||||
if (count == 1) {
|
for (int32 i = 0; i < count; i++) {
|
||||||
_WriteListElement(value.ItemAt(0));
|
_Write('\t');
|
||||||
} else {
|
_WriteListElement(value.ItemAt(i));
|
||||||
_Write("{\n", 2);
|
_Write('\n');
|
||||||
|
|
||||||
int32 count = value.CountItems();
|
|
||||||
for (int32 i = 0; i < count; i++) {
|
|
||||||
_Write('\t');
|
|
||||||
_WriteListElement(value.ItemAt(i));
|
|
||||||
_Write('\n');
|
|
||||||
}
|
|
||||||
|
|
||||||
_Write('}');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_Write('}');
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Value>
|
template<typename Value>
|
||||||
|
|||||||
Reference in New Issue
Block a user