summaryrefslogtreecommitdiff
path: root/pal-statistics-fix_swap_error.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-03-08 15:38:48 +0000
committerCoprDistGit <infra@openeuler.org>2025-03-08 15:38:48 +0000
commit30c348283022c4544be1e259b5a3960b50d1b028 (patch)
treefa8a0b0ba5315e085cbf9270cfaffa4d202f5a07 /pal-statistics-fix_swap_error.patch
parent1148ef4ea808230e20e63792f0834673f493c604 (diff)
automatic import of ros-humble-pal-statisticsopeneuler24.03_LTS
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();