1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

improve code quality

- eliminate rand() calls
- non initialized members/ variables
- unused return values
- missing/useless NULL checks
This commit is contained in:
Alexander Alekhin
2018-05-22 16:31:01 +03:00
parent e1b96b6d82
commit 471c17321f
8 changed files with 25 additions and 19 deletions
+2 -2
View File
@@ -142,7 +142,7 @@ public:
PyGILState_Release(gstate);
if (!res)
CV_Error(Error::StsNotImplemented, "Failed to call \"getMemoryShapes\" method");
pyopencv_to_generic_vec(res, outputs, ArgInfo("", 0));
CV_Assert(pyopencv_to_generic_vec(res, outputs, ArgInfo("", 0)));
return false;
}
@@ -163,7 +163,7 @@ public:
CV_Error(Error::StsNotImplemented, "Failed to call \"forward\" method");
std::vector<Mat> pyOutputs;
pyopencv_to(res, pyOutputs, ArgInfo("", 0));
CV_Assert(pyopencv_to(res, pyOutputs, ArgInfo("", 0)));
CV_Assert(pyOutputs.size() == outputs.size());
for (size_t i = 0; i < outputs.size(); ++i)