[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sal/inc

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Sep 20 02:41:53 PDT 2012


 sal/inc/rtl/string.hxx  |    7 ++-----
 sal/inc/rtl/ustring.hxx |    7 ++-----
 2 files changed, 4 insertions(+), 10 deletions(-)

New commits:
commit ab76bfc0366d72d80698e4145130a072aed64d31
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jul 23 12:09:12 2012 +0200

    Make rtl::O[U]String::isEmpty return true bool
    
    ...instead of sal_Bool, to work around MSVC warning C4805: unsafe mix of type
    'sal_Bool' and type 'bool'.
    
    Change-Id: Ia3477539ccc23aa9daec49d633f023d414f2b4bf
    (cherry picked from commit 8ee7c47404cdf408bcd3b6ea0267fbe54193c93f)
    Reviewed-on: https://gerrit.libreoffice.org/650
    Reviewed-by: Luboš Luňák <l.lunak at suse.cz>
    Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
    Tested-by: Miklos Vajna <vmiklos at suse.cz>

diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index 4e76b74..e70f3ac 100644
--- a/sal/inc/rtl/string.hxx
+++ b/sal/inc/rtl/string.hxx
@@ -320,12 +320,9 @@ public:
 
       @since LibreOffice 3.4
     */
-    sal_Bool isEmpty() const SAL_THROW(())
+    bool isEmpty() const SAL_THROW(())
     {
-        if ( pData->length )
-            return sal_False;
-        else
-            return sal_True;
+        return pData->length == 0;
     }
 
     /**
diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx
index f3d224e..5962752 100644
--- a/sal/inc/rtl/ustring.hxx
+++ b/sal/inc/rtl/ustring.hxx
@@ -405,12 +405,9 @@ public:
 
       @since LibreOffice 3.4
     */
-    sal_Bool isEmpty() const SAL_THROW(())
+    bool isEmpty() const SAL_THROW(())
     {
-        if ( pData->length )
-            return sal_False;
-        else
-            return sal_True;
+        return pData->length == 0;
     }
 
     /**


More information about the Libreoffice-commits mailing list