summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-07-23 12:09:12 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-09-20 09:41:33 +0000
commitab76bfc0366d72d80698e4145130a072aed64d31 (patch)
treeeb9d93e4f934bc1cd900869339f5d87bbb19f676 /sal
parent6bcbf68b29b609cf06dbea0e192533e11eb523c3 (diff)
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@suse.cz> Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'sal')
-rw-r--r--sal/inc/rtl/string.hxx7
-rw-r--r--sal/inc/rtl/ustring.hxx7
2 files changed, 4 insertions, 10 deletions
diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index 4e76b7410303..e70f3ac29f25 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 f3d224ecdb0f..5962752c7af2 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;
}
/**