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:
parent
8356248782
commit
1d9d1bd7bb
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user