About commit "cppcheck: some cleanings"

Michael Stahl mstahl at redhat.com
Mon Sep 30 08:16:57 PDT 2013


On 30/09/13 11:21, julien2412 wrote:
> Hello,
> 
> About commit 30e72a9a36750b7326803fa8fa1b8d40648e7e89 and, in particular,
> to:
> 
> - sal_Int32 nWindowWidth = ::std::max( nMinWidth, nBrowserWidth );
> - nWindowWidth = ::std::min( nMaxWidth, nBrowserWidth );
> + sal_Int32 nWindowWidth = ::std::min( nMaxWidth, nBrowserWidth );
> 
> Matteo Casalin thought (and I agree) that if my changes surely keep the
> previous behaviour, the original code might be wrong.
> Indeed, it seemed that its aim was to bound nWindowWidth between the maximum
> and minimum possible values, but it didn't.
> So perhaps it should be:
> 
>   sal_Int32 nWindowWidth = ::std::max( nMinWidth, nBrowserWidth );
>   nWindowWidth = ::std::min( nMaxWidth, nWindowWidth );

that looks more sensible than the original; although i don't know
anything about this Chart code...




More information about the LibreOffice mailing list