fix.修复一些编译warning

This commit is contained in:
MistEO
2021-10-17 04:27:43 +08:00
parent 04c1d90a51
commit 73559816c3
3 changed files with 4 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ bool AbstractTask::sleep(unsigned millisecond)
return true;
}
auto start = std::chrono::system_clock::now();
unsigned duration = 0;
long long duration = 0;
json::value callback_json;
callback_json["time"] = millisecond;

View File

@@ -54,7 +54,7 @@ bool asst::MultiMatchImageAnalyzer::multi_match_templ(const cv::Mat& templ)
cv::matchTemplate(image_roi, templ, matched, cv::TM_CCOEFF_NORMED, mask);
}
int mini_distance = (std::min)(templ.cols, templ.rows) * 0.5;
int mini_distance = (std::min)(templ.cols, templ.rows) / 2;
for (int i = 0; i != matched.rows; ++i) {
for (int j = 0; j != matched.cols; ++j) {
auto value = matched.at<float>(i, j);

View File

@@ -63,8 +63,8 @@ bool RecruitTask::run()
// 识别到的5个Tags全组合排列
std::vector<std::vector<std::string>> all_combs;
int len = all_tags.size();
int count = std::pow(2, len);
size_t len = all_tags.size();
int count = (std::pow)(2, len);
for (int i = 0; i < count; ++i) {
std::vector<std::string> temp;
for (int j = 0, mask = 1; j < len; ++j) {