From 96eef8388ffe97d60b8b14dadbed9d3f180076e4 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Wed, 26 Sep 2012 12:46:53 -0700 Subject: [PATCH] Remove a line of dead code. Add two convenience functions. --- src/SerializedObject.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SerializedObject.h b/src/SerializedObject.h index 3242802fe0..58914bfb78 100644 --- a/src/SerializedObject.h +++ b/src/SerializedObject.h @@ -87,7 +87,6 @@ public: SerializedType& getField(SField::ref field); const SerializedType* peekAtPField(SField::ref field) const; SerializedType* getPField(SField::ref field); - const SOElement* getFieldType(SField::ref field) const; // these throw if the field type doesn't match, or return default values if the // field is optional but not present @@ -130,6 +129,11 @@ public: static std::auto_ptr makeDeserializedObject(SerializedTypeID id, SField::ref name, SerializerIterator&, int depth); + static std::auto_ptr makeNonPresentObject(SField::ref name) + { return makeDefaultObject(STI_NOTPRESENT, name); } + static std::auto_ptr makeDefaultObject(SField::ref name) + { return makeDefaultObject(name.fieldType, name); } + static void unitTest(); };