Feature #1288: Code cleanup

This commit is contained in:
Carlos Martín committed 2012-06-21 18:30:13 +02:00
1 parent 06581af467
commit 73baa84fbd
2 files changed
+3 -13

No files matched your search

-12
View File
@@ -147,18 +147,6 @@ protected:
VectorAttribute **va,
map<string, Attribute *>::iterator& it);
/**
* Deletes a quota from the index. The quota pointer is freed.
* @param it The quota iterator, as returned by Quota::get_quota
*/
virtual void del(map<string, Attribute *>::iterator& it)
{
Attribute * attr = it->second;
delete attr;
attributes.erase(it);
}
/**
* Checks if a quota has 0 limit and usage, and deletes it
*
+3 -1
View File
@@ -343,7 +343,9 @@ void Quota::cleanup_quota(const string& qid)
if ( limit == 0 && usage == 0 )
{
del(q_it);
delete static_cast<Attribute *>(q_it->second);
attributes.erase(q_it);
}
}