diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-07-23 12:09:12 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-07-23 12:09:12 +0200 |
commit | 8ee7c47404cdf408bcd3b6ea0267fbe54193c93f (patch) | |
tree | 311565d0cde72c9fc6b8d7828f0966d360088eb4 /sal/inc | |
parent | acf134e19895489991d5fc088f06f69d638c5252 (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
Diffstat (limited to 'sal/inc')
-rw-r--r-- | sal/inc/rtl/string.hxx | 7 | ||||
-rw-r--r-- | sal/inc/rtl/ustring.hxx | 7 |
2 files changed, 4 insertions, 10 deletions
diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx index 8c3757ff85e1..497e4e3a9dc6 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 d70a43cce128..448f6201e773 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; } /** |