summaryrefslogtreecommitdiff
path: root/pal-statistics-fix_swap_error.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pal-statistics-fix_swap_error.patch')
-rw-r--r--pal-statistics-fix_swap_error.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/pal-statistics-fix_swap_error.patch b/pal-statistics-fix_swap_error.patch
new file mode 100644
index 0000000..4cc6bd0
--- /dev/null
+++ b/pal-statistics-fix_swap_error.patch
@@ -0,0 +1,16 @@
+diff -Naur ros-humble-pal-statistics-2.1.5_org/src/registration_list.cpp ros-humble-pal-statistics-2.1.5/src/registration_list.cpp
+--- ros-humble-pal-statistics-2.1.5_org/src/registration_list.cpp 2023-04-14 18:36:05.000000000 +0800
++++ ros-humble-pal-statistics-2.1.5/src/registration_list.cpp 2023-10-21 17:16:46.000000000 +0800
+@@ -207,7 +207,11 @@
+ ids_.resize(ids_.size() - 1);
+ std::swap(references_[index], references_.back());
+ references_.resize(references_.size() - 1);
+- std::swap(enabled_[index], enabled_.back());
++ //std::swap(enabled_[index], std::move(enabled_.back()));
++ bool temp = enabled_[index];
++ enabled_[index] = enabled_.back();
++ enabled_.back() = temp;
++
+ enabled_.resize(enabled_.size() - 1);
+
+ registrationsChanged();