mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
Implementing *= operator. Implementing * in terms of it.
This commit is contained in:
parent
0ffc53bafe
commit
d7a8166720
@ -1311,11 +1311,19 @@ _Tp Size_<_Tp>::area() const
|
|||||||
return width * height;
|
return width * height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename _Tp> static inline
|
||||||
|
Size_<_Tp>& operator *= (Size_<_Tp>& a, _Tp b)
|
||||||
|
{
|
||||||
|
a.width *= b;
|
||||||
|
a.height *= b;
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
template<typename _Tp> static inline
|
template<typename _Tp> static inline
|
||||||
Size_<_Tp> operator * (const Size_<_Tp>& a, _Tp b)
|
Size_<_Tp> operator * (Size_<_Tp> a, _Tp b)
|
||||||
{
|
{
|
||||||
return Size_<_Tp>(a.width * b, a.height * b);
|
a *= b;
|
||||||
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename _Tp> static inline
|
template<typename _Tp> static inline
|
||||||
|
Loading…
Reference in New Issue
Block a user