[Libreoffice-commits] .: sal/inc
Stephan Bergmann
sbergmann at kemper.freedesktop.org
Mon Jul 23 03:10:29 PDT 2012
sal/inc/rtl/string.hxx | 7 ++-----
sal/inc/rtl/ustring.hxx | 7 ++-----
2 files changed, 4 insertions(+), 10 deletions(-)
New commits:
commit 8ee7c47404cdf408bcd3b6ea0267fbe54193c93f
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
diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index 8c3757f..497e4e3 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 d70a43c..448f620 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