summaryrefslogtreecommitdiffstats
path: root/vcl/source/control/imp_listbox.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/control/imp_listbox.cxx')
-rw-r--r--vcl/source/control/imp_listbox.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index 98c88b674cd7..a6ca96f0a79a 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -289,7 +289,7 @@ sal_Int32 ImplEntryList::FindEntry( const void* pData ) const
long ImplEntryList::GetAddedHeight( sal_Int32 i_nEndIndex, sal_Int32 i_nBeginIndex ) const
{
long nHeight = 0;
- sal_Int32 nStart = i_nEndIndex > i_nBeginIndex ? i_nBeginIndex : i_nEndIndex;
+ sal_Int32 nStart = std::min(i_nEndIndex, i_nBeginIndex);
sal_Int32 nStop = std::max(i_nEndIndex, i_nBeginIndex);
sal_Int32 nEntryCount = GetEntryCount();
if( 0 <= nStop && nStop != LISTBOX_ENTRY_NOTFOUND && nEntryCount != 0 )
@@ -1995,7 +1995,7 @@ void ImplListBoxWindow::ScrollHorz( long n )
if( mnLeft )
{
long nAbs = -n;
- nDiff = - ( ( mnLeft > nAbs ) ? nAbs : mnLeft );
+ nDiff = - std::min( mnLeft, nAbs );
}
}