1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

fix: supress GCC13 warnings (#24434)

* fix: supress GCC13 warnings

* fix for review and compile-warning on MacOS
This commit is contained in:
Kumataro
2023-10-26 15:00:58 +09:00
committed by GitHub
parent 38bc519e4a
commit 1911c63826
7 changed files with 42 additions and 10 deletions
+4 -4
View File
@@ -52,12 +52,12 @@ CV_EXPORTS_W Mat readOpticalFlow( const String& path )
Mat_<Point2f> flow;
std::ifstream file(path.c_str(), std::ios_base::binary);
if ( !file.good() )
return std::move(flow); // no file - return empty matrix
return Mat(); // no file - return empty matrix
float tag;
file.read((char*) &tag, sizeof(float));
if ( tag != FLOW_TAG_FLOAT )
return std::move(flow);
return Mat();
int width, height;
@@ -76,14 +76,14 @@ CV_EXPORTS_W Mat readOpticalFlow( const String& path )
if ( !file.good() )
{
flow.release();
return std::move(flow);
return Mat();
}
flow(i, j) = u;
}
}
file.close();
return std::move(flow);
return Mat(flow);
}
CV_EXPORTS_W bool writeOpticalFlow( const String& path, InputArray flow )