diff options
author | Eike Rathke <erack@redhat.com> | 2013-10-07 21:51:26 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-10-07 21:53:56 +0200 |
commit | ca576e0804324bbb36b697543cbe992e34d4b951 (patch) | |
tree | 0f457ca564f7c40b3e4eca0836a428d0a364be3b /svtools | |
parent | be0db4421e34df41c610a4b2ab46573969894aeb (diff) |
WaE [-Wstrict-overflow] assuming signed overflow does not occur
... when assuming that (X - c) <= X is always true
... or that (X + c) < X is always false
Change-Id: Ib2313827cd6358ced0141b41cba753896b676e28
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/imivctl1.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 1cd006b49ca0..0685bc3ecf77 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -2710,9 +2710,9 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcFocusRect( SvxIconChoiceCtrlEntry* pEntry Rectangle aFocusRect( aBoundRect.Left(), aBmpRect.Top() - 1, aBoundRect.Right() - 4, aTextRect.Bottom() + 1 ); // the focus rectangle should not touch the text - if( aFocusRect.Left() - 1 >= pEntry->aRect.Left() ) + if( aFocusRect.Left() > ::std::numeric_limits<long>::min() && aFocusRect.Left() - 1 >= pEntry->aRect.Left() ) aFocusRect.Left()--; - if( aFocusRect.Right() + 1 <= pEntry->aRect.Right() ) + if( aFocusRect.Right() < ::std::numeric_limits<long>::max() && aFocusRect.Right() + 1 <= pEntry->aRect.Right() ) aFocusRect.Right()++; return aFocusRect; |