1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

Feature #1288: Code cleanup

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

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
*

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);
}
}