Fix passing temporary to Reflector::push()
This commit is contained in:
parent
104e362762
commit
0520341411
|
@ -182,7 +182,8 @@ void JsonReflectorTests::testSerializePrimitives()
|
|||
Document::Array array(doc.GetArray());
|
||||
|
||||
// string
|
||||
Reflector::push<string>("foo"s, array, alloc);
|
||||
const string foo("foo"); // musn't be destroyed until JSON is actually written
|
||||
Reflector::push<string>(foo, array, alloc);
|
||||
Reflector::push<const char *>("bar", array, alloc);
|
||||
// number
|
||||
Reflector::push<int>(25, array, alloc);
|
||||
|
|
Loading…
Reference in New Issue