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


On 02/21/2012 08:57 PM, Thomas Arnhold wrote:
commit 45ad6029e1422c659e627bb30ecda50ccb61060c
Author: Thomas Arnhold<thomas@arnhold.org>
Date:   Tue Feb 21 19:46:36 2012 +0100

     WaE: duplicateBranch and use sal_False

diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 5c4039a..7d98440 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -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).

Stephan

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.