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::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::construct(allocator, &(new_values[jd]), values[jd]); + std::allocator_traits::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::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::construct(allocator, &(new_values[id]), values[id]); + std::allocator_traits::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::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::destroy(allocator, &(values[id])); } // \brief Erase more keys from the map. @@ -289,7 +289,7 @@ namespace lemon { virtual void erase(const std::vector& keys) { for (int i = 0; i < int(keys.size()); ++i) { int id = Parent::notifier()->id(keys[i]); - allocator.destroy(&(values[id])); + std::allocator_traits::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::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::destroy(allocator, &(values[id])); } allocator.deallocate(values, capacity); capacity = 0; diff --git a/extern/quadriflow/patches/blender.patch b/extern/quadriflow/patches/blender.patch index 6405a47e262..9e694a2d616 100644 --- a/extern/quadriflow/patches/blender.patch +++ b/extern/quadriflow/patches/blender.patch @@ -143,3 +143,91 @@ index 8de74ede8a9..f9861f39169 100644 num = length - shift; while (num--) { +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::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::construct(allocator, &(new_values[jd]), values[jd]); ++ std::allocator_traits::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::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::construct(allocator, &(new_values[id]), values[id]); ++ std::allocator_traits::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::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::destroy(allocator, &(values[id])); + } + + // \brief Erase more keys from the map. +@@ -289,7 +289,7 @@ namespace lemon { + virtual void erase(const std::vector& keys) { + for (int i = 0; i < int(keys.size()); ++i) { + int id = Parent::notifier()->id(keys[i]); +- allocator.destroy(&(values[id])); ++ std::allocator_traits::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::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::destroy(allocator, &(values[id])); + } + allocator.deallocate(values, capacity); + capacity = 0;