mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
Reverting pass-by-value changes to arithmetic operators.
This commit is contained in:
parent
8fc1848918
commit
703921e2fd
@ -1320,10 +1320,11 @@ Size_<_Tp>& operator *= (Size_<_Tp>& a, _Tp b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename _Tp> static inline
|
template<typename _Tp> static inline
|
||||||
Size_<_Tp> operator * (Size_<_Tp> a, _Tp b)
|
Size_<_Tp> operator * (const Size_<_Tp>& a, _Tp b)
|
||||||
{
|
{
|
||||||
a *= b;
|
Size_<_Tp> tmp;
|
||||||
return a;
|
tmp *= b;
|
||||||
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename _Tp> static inline
|
template<typename _Tp> static inline
|
||||||
@ -1335,10 +1336,11 @@ Size_<_Tp>& operator /= (Size_<_Tp>& a, _Tp b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename _Tp> static inline
|
template<typename _Tp> static inline
|
||||||
Size_<_Tp> operator / (Size_<_Tp> a, _Tp b)
|
Size_<_Tp> operator / (const Size_<_Tp>& a, _Tp b)
|
||||||
{
|
{
|
||||||
a /= b;
|
Size_<_Tp> tmp;
|
||||||
return a;
|
tmp /= b;
|
||||||
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename _Tp> static inline
|
template<typename _Tp> static inline
|
||||||
@ -1350,10 +1352,11 @@ Size_<_Tp>& operator += (Size_<_Tp>& a, const Size_<_Tp>& b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename _Tp> static inline
|
template<typename _Tp> static inline
|
||||||
Size_<_Tp> operator + (Size_<_Tp> a, const Size_<_Tp>& b)
|
Size_<_Tp> operator + (const Size_<_Tp>& a, const Size_<_Tp>& b)
|
||||||
{
|
{
|
||||||
a += b;
|
Size_<_Tp> tmp;
|
||||||
return a;
|
tmp += b;
|
||||||
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename _Tp> static inline
|
template<typename _Tp> static inline
|
||||||
@ -1365,10 +1368,11 @@ Size_<_Tp>& operator -= (Size_<_Tp>& a, const Size_<_Tp>& b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename _Tp> static inline
|
template<typename _Tp> static inline
|
||||||
Size_<_Tp> operator - (Size_<_Tp> a, const Size_<_Tp>& b)
|
Size_<_Tp> operator - (const Size_<_Tp>& a, const Size_<_Tp>& b)
|
||||||
{
|
{
|
||||||
a -= b;
|
Size_<_Tp> tmp;
|
||||||
return a;
|
tmp -= b;
|
||||||
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename _Tp> static inline
|
template<typename _Tp> static inline
|
||||||
|
Loading…
Reference in New Issue
Block a user