diff --git a/src/api/baseapi.cpp b/src/api/baseapi.cpp index 42a1badb..c87d6eb6 100644 --- a/src/api/baseapi.cpp +++ b/src/api/baseapi.cpp @@ -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; }