Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Thanks for fixing it :)

On 02/22/2012 02:43 PM, Lubos Lunak wrote:
On Tuesday 21 of February 2012, Stephan Bergmann wrote:
On 02/21/2012 08:57 PM, Thomas Arnhold wrote:
commit 45ad6029e1422c659e627bb30ecda50ccb61060c
...
@@ -174,12 +174,7 @@ static sal_Bool lcl_IsLess( const ScDPDataMember*
pDataMember1, const ScDPDataMe sal_Bool bError1 = pAgg1&&
pAgg1->HasError();
       sal_Bool bError2 = pAgg2&&   pAgg2->HasError();
       if ( bError1 )
-    {
-        if ( bError2 )
-            return false;       // equal
-        else
-            return false;       // errors are always sorted at the end
-    }
+        return sal_False;       // equal

Just FYI, there should ~never be a need to go back from "false" to
"sal_False" (we generally want to move any uses of the latter to become
uses of the former; so if you seek consistency across a function, it
might be better to replace other occurrences of sal_True/False than to
do the opposite).

  Moreover, although the change technically keeps the code the same, it
slightly breaks the semantics - 'if( bError1 )' alone does not mean the two
are equal, so now it is misleading. I'll put the proper comment back.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.