Rather than a polymorphic downcast, just fill in the object in place.

This commit is contained in:
JoelKatz
2012-09-27 20:55:10 -07:00
parent febe7a1224
commit b88d6486a6

View File

@@ -718,7 +718,8 @@ STArray* STArray::construct(SerializerIterator& sit, SField::ref field)
if (fn.isInvalid())
throw std::runtime_error("Unknown field");
value.push_back(*STObject::makeDeserializedObject(fn.fieldType, fn, sit, 1));
value.push_back(STObject(fn));
value.rbegin()->set(sit, 1);
}
return new STArray(field, value);