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

Fixed several issues found by static analysis in core module

This commit is contained in:
Maksim Shabunin
2017-05-17 17:36:48 +03:00
parent c5e9d1adae
commit b04ed5956e
13 changed files with 139 additions and 94 deletions
@@ -872,7 +872,7 @@ size_t Mat::step1(int i) const
inline
bool Mat::empty() const
{
return data == 0 || total() == 0;
return data == 0 || total() == 0 || dims == 0;
}
inline
@@ -3730,7 +3730,7 @@ size_t UMat::step1(int i) const
inline
bool UMat::empty() const
{
return u == 0 || total() == 0;
return u == 0 || total() == 0 || dims == 0;
}
inline
+2 -1
View File
@@ -1040,7 +1040,8 @@ Complex<_Tp> operator / (const Complex<_Tp>& a, const Complex<_Tp>& b)
template<typename _Tp> static inline
Complex<_Tp>& operator /= (Complex<_Tp>& a, const Complex<_Tp>& b)
{
return (a = a / b);
a = a / b;
return a;
}
template<typename _Tp> static inline