Fix lots of places I used 'empty' instead of 'clear'. This is why I like 'isEmpty'.

This commit is contained in:
JoelKatz
2012-10-11 05:06:24 -07:00
parent 4f1ebc2884
commit c43934ab6f
4 changed files with 7 additions and 7 deletions

View File

@@ -120,8 +120,8 @@ std::auto_ptr<SerializedType> STObject::makeDeserializedObject(SerializedTypeID
void STObject::set(const std::vector<SOElement::ptr>& type)
{
mData.empty();
mType.empty();
mData.clear();
mType.clear();
BOOST_FOREACH(const SOElement::ptr& elem, type)
{
@@ -138,7 +138,7 @@ bool STObject::setType(const std::vector<SOElement::ptr> &type)
boost::ptr_vector<SerializedType> newData;
bool valid = true;
mType.empty();
mType.clear();
BOOST_FOREACH(const SOElement::ptr& elem, type)
{
bool match = false;
@@ -204,7 +204,7 @@ bool STObject::isFieldAllowed(SField::ref field)
bool STObject::set(SerializerIterator& sit, int depth)
{ // return true = terminated with end-of-object
mData.empty();
mData.clear();
while (!sit.empty())
{
int type, field;