Bugfix: creation of pmap should return false if pmap already exists

This commit is contained in:
Simon Giraudot 2016-09-30 10:35:25 +02:00
parent 7f4044bb2e
commit f80bbf517c
1 changed files with 4 additions and 1 deletions

View File

@ -276,8 +276,11 @@ public:
{ {
std::pair<Property_map<Key, T>, bool> out = get<T>(name, i); std::pair<Property_map<Key, T>, bool> out = get<T>(name, i);
if (out.second) if (out.second)
{
out.second = false;
return out; return out;
} }
}
// otherwise add the property // otherwise add the property
Property_array<T>* p = new Property_array<T>(name, t); Property_array<T>* p = new Property_array<T>(name, t);