Fix CID 1534956 (COPY_INSTEAD_OF_MOVE)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2024-03-09 10:06:15 +01:00
parent ddd2ec24a8
commit d172f9b802

View File

@ -268,7 +268,7 @@ bool UNICHARSET::encode_string(const char *str, bool give_up_on_failure,
}
}
if (lengths != nullptr) {
*lengths = best_lengths;
*lengths = std::move(best_lengths);
}
if (encoded_length != nullptr) {
*encoded_length = str_pos;