diff options
Diffstat (limited to 'extern/quadriflow/3rd/lemon-1.3.1/lemon/bits/array_map.h')
-rw-r--r-- | extern/quadriflow/3rd/lemon-1.3.1/lemon/bits/array_map.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/extern/quadriflow/3rd/lemon-1.3.1/lemon/bits/array_map.h b/extern/quadriflow/3rd/lemon-1.3.1/lemon/bits/array_map.h index 355ee008246..a770bbee60c 100644 --- a/extern/quadriflow/3rd/lemon-1.3.1/lemon/bits/array_map.h +++ b/extern/quadriflow/3rd/lemon-1.3.1/lemon/bits/array_map.h @@ -88,7 +88,7 @@ namespace lemon { Item it; for (nf->first(it); it != INVALID; nf->next(it)) { int id = nf->id(it);; - allocator.construct(&(values[id]), Value()); + std::allocator_traits<Allocator>::construct(allocator, &(values[id]), Value()); } } @@ -218,15 +218,15 @@ namespace lemon { for (nf->first(it); it != INVALID; nf->next(it)) { int jd = nf->id(it);; if (id != jd) { - allocator.construct(&(new_values[jd]), values[jd]); - allocator.destroy(&(values[jd])); + std::allocator_traits<Allocator>::construct(allocator, &(new_values[jd]), values[jd]); + std::allocator_traits<Allocator>::destroy(allocator, &(values[jd])); } } if (capacity != 0) allocator.deallocate(values, capacity); values = new_values; capacity = new_capacity; } - allocator.construct(&(values[id]), Value()); + std::allocator_traits<Allocator>::construct(allocator, &(values[id]), Value()); } // \brief Adds more new keys to the map. @@ -260,8 +260,8 @@ namespace lemon { } } if (found) continue; - allocator.construct(&(new_values[id]), values[id]); - allocator.destroy(&(values[id])); + std::allocator_traits<Allocator>::construct(allocator, &(new_values[id]), values[id]); + std::allocator_traits<Allocator>::destroy(allocator, &(values[id])); } if (capacity != 0) allocator.deallocate(values, capacity); values = new_values; @@ -269,7 +269,7 @@ namespace lemon { } for (int i = 0; i < int(keys.size()); ++i) { int id = nf->id(keys[i]); - allocator.construct(&(values[id]), Value()); + std::allocator_traits<Allocator>::construct(allocator, &(values[id]), Value()); } } @@ -279,7 +279,7 @@ namespace lemon { // and it overrides the erase() member function of the observer base. virtual void erase(const Key& key) { int id = Parent::notifier()->id(key); - allocator.destroy(&(values[id])); + std::allocator_traits<Allocator>::destroy(allocator, &(values[id])); } // \brief Erase more keys from the map. @@ -289,7 +289,7 @@ namespace lemon { virtual void erase(const std::vector<Key>& keys) { for (int i = 0; i < int(keys.size()); ++i) { int id = Parent::notifier()->id(keys[i]); - allocator.destroy(&(values[id])); + std::allocator_traits<Allocator>::destroy(allocator, &(values[id])); } } @@ -303,7 +303,7 @@ namespace lemon { Item it; for (nf->first(it); it != INVALID; nf->next(it)) { int id = nf->id(it);; - allocator.construct(&(values[id]), Value()); + std::allocator_traits<Allocator>::construct(allocator, &(values[id]), Value()); } } @@ -317,7 +317,7 @@ namespace lemon { Item it; for (nf->first(it); it != INVALID; nf->next(it)) { int id = nf->id(it); - allocator.destroy(&(values[id])); + std::allocator_traits<Allocator>::destroy(allocator, &(values[id])); } allocator.deallocate(values, capacity); capacity = 0; |