On Sun, Nov 20, 2016 at 03:33:24PM +0900, Akihiro Sagawa wrote:
@@ -73,6 +73,17 @@ static HRESULT BaseControlVideoImpl_CheckSourceRect(BaseControlVideo *This, RECT return S_OK; }
+static HRESULT BaseControlVideoImpl_CheckTargetRect(BaseControlVideo *This, RECT *pTargetRect) +{
- if (pTargetRect->top >= pTargetRect->bottom ||
pTargetRect->left >= pTargetRect->right ||
(pTargetRect->bottom - pTargetRect->top) <= 0 ||
(pTargetRect->right - pTargetRect->left) <= 0)
return E_INVALIDARG;
The third and fourth conditions seem redundant with the first and second. You could use IsRectEmpty() here as well.
Andrew