aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorArseny Smirnov <arseny30@gmail.com>2023-02-09 22:27:25 +0100
committerArseny Smirnov <arseny30@gmail.com>2023-02-09 22:53:04 +0100
commitf2ca22745a97f7dc5a04ff3997a48add45370faa (patch)
treeae4274f16d92ee8d30569c5c418cb9c4acb7a0f5
parentcde74133a651e879c3d705262a30634765b565d2 (diff)
Avoid std::move to itself in BinlogEventsProcessor
-rw-r--r--tddb/td/db/binlog/detail/BinlogEventsProcessor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tddb/td/db/binlog/detail/BinlogEventsProcessor.cpp b/tddb/td/db/binlog/detail/BinlogEventsProcessor.cpp
index 781423b98..6c07d292e 100644
--- a/tddb/td/db/binlog/detail/BinlogEventsProcessor.cpp
+++ b/tddb/td/db/binlog/detail/BinlogEventsProcessor.cpp
@@ -63,7 +63,10 @@ void BinlogEventsProcessor::compactify() {
for (; event_ids_from != event_ids_.end(); event_ids_from++, events_from++) {
if ((*event_ids_from & 1) == 0) {
*event_ids_to++ = *event_ids_from;
- *events_to++ = std::move(*events_from);
+ if (events_to != events_from) {
+ *events_to = std::move(*events_from);
+ }
+ events_to++;
}
}
event_ids_.erase(event_ids_to, event_ids_.end());