Remove a line of dead code. Add two convenience functions.

This commit is contained in:
JoelKatz
2012-09-26 12:46:53 -07:00
parent fbb0baaca0
commit 96eef8388f

View File

@@ -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<SerializedType> makeDeserializedObject(SerializedTypeID id, SField::ref name,
SerializerIterator&, int depth);
static std::auto_ptr<SerializedType> makeNonPresentObject(SField::ref name)
{ return makeDefaultObject(STI_NOTPRESENT, name); }
static std::auto_ptr<SerializedType> makeDefaultObject(SField::ref name)
{ return makeDefaultObject(name.fieldType, name); }
static void unitTest();
};