From 5c6ca2c1ce0237d07ce4120835cfc0dae19ec3f4 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 13 Aug 2024 23:36:06 +0200 Subject: [PATCH] undo: don't use moved-from string Found by Coverity. Signed-off-by: Berthold Stoeger --- commands/command_event.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/command_event.cpp b/commands/command_event.cpp index 2a8366b80..c3fc52f49 100644 --- a/commands/command_event.cpp +++ b/commands/command_event.cpp @@ -89,9 +89,9 @@ void AddEventSetpointChange::redoit() std::swap(d->get_dc(dcNr)->divemode, divemode); } -RenameEvent::RenameEvent(struct dive *d, int dcNr, int idx, const std::string name) : EventBase(d, dcNr), +RenameEvent::RenameEvent(struct dive *d, int dcNr, int idx, const std::string nameIn) : EventBase(d, dcNr), idx(idx), - name(std::move(name)) + name(std::move(nameIn)) { setText(Command::Base::tr("Rename bookmark to %1").arg(name.c_str())); }