liquivision import: move notes string

Avoids one copy. Found by Coverity.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-08-14 09:30:58 +02:00 committed by Michael Keller
parent ef9ae5f6d6
commit a3340298b6

View file

@ -199,7 +199,7 @@ static void parse_dives(int log_version, const unsigned char *buf, unsigned int
// Blank notes are better than the default text
std::string notes((char *)buf + ptr, len);
if (!starts_with(notes, "Comment ..."))
dive->notes = notes;
dive->notes = std::move(notes);
ptr += len;
dive->id = array_uint32_le(buf + ptr);