From 73baa84fbd48403ac9735190feedb05902be32db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Thu, 21 Jun 2012 18:30:13 +0200 Subject: [PATCH] Feature #1288: Code cleanup --- include/Quota.h | 12 ------------ src/um/Quota.cc | 4 +++- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/include/Quota.h b/include/Quota.h index c5a2ec5f40..4363cf3e44 100644 --- a/include/Quota.h +++ b/include/Quota.h @@ -147,18 +147,6 @@ protected: VectorAttribute **va, map::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::iterator& it) - { - Attribute * attr = it->second; - delete attr; - - attributes.erase(it); - } - /** * Checks if a quota has 0 limit and usage, and deletes it * diff --git a/src/um/Quota.cc b/src/um/Quota.cc index 6b54658af9..03fc1435b2 100644 --- a/src/um/Quota.cc +++ b/src/um/Quota.cc @@ -343,7 +343,9 @@ void Quota::cleanup_quota(const string& qid) if ( limit == 0 && usage == 0 ) { - del(q_it); + delete static_cast(q_it->second); + + attributes.erase(q_it); } }