mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Fixed several issues found by static analysis
This commit is contained in:
@@ -80,9 +80,11 @@ NNIndex<Distance>* load_saved_index(const Matrix<typename Distance::ElementType>
|
||||
}
|
||||
IndexHeader header = load_header(fin);
|
||||
if (header.data_type != Datatype<ElementType>::type()) {
|
||||
fclose(fin);
|
||||
throw FLANNException("Datatype of saved index is different than of the one to be created.");
|
||||
}
|
||||
if ((size_t(header.rows) != dataset.rows)||(size_t(header.cols) != dataset.cols)) {
|
||||
fclose(fin);
|
||||
throw FLANNException("The index saved belongs to a different dataset");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user