Fix CID 1534953 (COPY_INSTEAD_OF_MOVE)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2024-03-05 15:55:27 +01:00
parent 77fc53c579
commit 8dfa2dee86

View File

@ -421,7 +421,7 @@ int TessBaseAPI::Init(const char *data, int data_size, const char *language, Ocr
}
// Update datapath and language requested for the last valid initialization.
datapath_ = datapath;
datapath_ = std::move(datapath);
if (datapath_.empty() && !tesseract_->datadir.empty()) {
datapath_ = tesseract_->datadir;
}