undo: don't use moved-from string

Found by Coverity.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-08-13 23:36:06 +02:00 committed by Michael Keller
parent 1dade48aa6
commit 5c6ca2c1ce

View file

@ -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()));
}