perf. use const& or std::move()

This commit is contained in:
lhhxxxxx
2022-06-06 20:02:51 +08:00
parent f5be7340c0
commit 649131b4da
36 changed files with 78 additions and 64 deletions

View File

@@ -18,7 +18,7 @@ namespace asst
public:
using AbstractImageAnalyzer::AbstractImageAnalyzer;
ProcessTaskImageAnalyzer(const cv::Mat image, const Rect& roi) = delete;
ProcessTaskImageAnalyzer(const cv::Mat image, std::vector<std::string> tasks_name);
ProcessTaskImageAnalyzer(const cv::Mat& image, std::vector<std::string> tasks_name);
virtual ~ProcessTaskImageAnalyzer();
virtual bool analyze() override;
@@ -49,8 +49,8 @@ namespace asst
{
AbstractImageAnalyzer::set_image(image, roi);
}
bool match_analyze(std::shared_ptr<TaskInfo> task_ptr);
bool ocr_analyze(std::shared_ptr<TaskInfo> task_ptr);
bool match_analyze(const std::shared_ptr<TaskInfo>& task_ptr);
bool ocr_analyze(const std::shared_ptr<TaskInfo>& task_ptr);
void reset() noexcept;
std::unique_ptr<OcrImageAnalyzer> m_ocr_analyzer;