1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-26 09:57:23 +03:00

bug #847: Fix constness for erase method in PoolObjectSQL. Better check in template erase

This commit is contained in:
Ruben S. Montero 2011-10-11 15:46:58 +02:00
parent 8356248782
commit 1d9d1bd7bb
2 changed files with 6 additions and 1 deletions

View File

@ -216,7 +216,7 @@ public:
*/
int erase_template_attribute(
const char * name,
string& value) const
string& value)
{
obj_template->get(name,value);
return obj_template->erase(name);

View File

@ -215,6 +215,11 @@ int Template::erase(const string& name)
index = attributes.equal_range(name);
if (index.first == index.second )
{
return 0;
}
for ( i = index.first,j=0 ; i != index.second ; i++,j++ )
{
Attribute * attr = i->second;