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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user