fix error unqualified call to 'std::move' (#15347)

This commit is contained in:
Thuy Dao 2023-04-06 13:40:30 +10:00 committed by GitHub
parent 962d8d2b19
commit 6e1e808ec8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -23,14 +23,14 @@ pair<vector<vector<float>>, vector<vector<float>>> NormalizeData(const vector<Im
normalized_image[j] = 1.0f;
}
}
normalized_images.emplace_back(move(normalized_image));
normalized_images.emplace_back(std::move(normalized_image));
}
vector<vector<float>> one_hot_labels;
for (size_t i = 0; i < labels.size(); i++) {
vector<float> one_hot_label(10, 0.0f);
one_hot_label[labels[i]] = 1.0f; //one hot
one_hot_labels.emplace_back(move(one_hot_label));
one_hot_labels.emplace_back(std::move(one_hot_label));
}
return make_pair(normalized_images, one_hot_labels);
}

View file

@ -36,7 +36,7 @@ common::Status DataSet::AddData(DataSet::SampleType&& single_sample) {
return ORT_MAKE_STATUS(ONNXRUNTIME, FAIL, "DataSet::AddData failed");
}
data_.emplace_back(move(single_sample));
data_.emplace_back(std::move(single_sample));
return Status::OK();
}
@ -59,7 +59,7 @@ common::Status DataSet::AddData(const vector<ONNX_NAMESPACE::TensorProto>& featu
ortvalue_buffers_.emplace_back(std::move(buffer));
}
data_.emplace_back(move(sample));
data_.emplace_back(std::move(sample));
return Status::OK();
}