Skip to content

Commit

Permalink
Avoid std::move to itself in BinlogEventsProcessor
Browse files Browse the repository at this point in the history
  • Loading branch information
arseny30 committed Feb 9, 2023
1 parent cde7413 commit f2ca227
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tddb/td/db/binlog/detail/BinlogEventsProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit f2ca227

Please sign in to comment.