diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-23 18:43:53 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-23 18:43:53 +0100 |
commit | e3133ae2371b6e2d4b47daa6a3487ea4f2753315 (patch) | |
tree | f9a000ee6542fb470733bfed28199092a36c26c5 /jvmfwk/source | |
parent | 14f4e2fa22a0a2576808bab08edaf2e12f761cd8 (diff) |
Let C++ inline functions return bool instead of sal_Bool
...to improve diagnosing misuses of boolean expressions in client code (cf.
compilerplugins/clang/implicitboolconversion.cxx). This change should be
transparent to client code.
Missing overloads of insert() for bool have been added to OStringBuffer and
OUStringBuffer (which required dropping one !VALID_CONVERSION check that would
now pick that overload, but would be flagged by
compilerplugins/clang/pointertobool.cxx).
Change-Id: I2d64cd923b8f47bfaa31e753def6515c29a3f8c9
Diffstat (limited to 'jvmfwk/source')
-rw-r--r-- | jvmfwk/source/framework.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index 688864e48819..4b2bbefb10d0 100644 --- a/jvmfwk/source/framework.cxx +++ b/jvmfwk/source/framework.cxx @@ -686,9 +686,9 @@ sal_Bool SAL_CALL jfw_areEqualJavaInfo( OUString sLocation(pInfoA->sLocation); OUString sVersion(pInfoA->sVersion); rtl::ByteSequence sData(pInfoA->arVendorData); - if (sVendor.equals(pInfoB->sVendor) == sal_True - && sLocation.equals(pInfoB->sLocation) == sal_True - && sVersion.equals(pInfoB->sVersion) == sal_True + if (sVendor.equals(pInfoB->sVendor) + && sLocation.equals(pInfoB->sLocation) + && sVersion.equals(pInfoB->sVersion) && pInfoA->nFeatures == pInfoB->nFeatures && pInfoA->nRequirements == pInfoB->nRequirements && sData == pInfoB->arVendorData) @@ -751,7 +751,7 @@ javaFrameworkError SAL_CALL jfw_getSelectedJRE(JavaInfo **ppInfo) // /java/javaInfo/@vendorUpdate != javaSelection/updated (javavendors.xml) OString sUpdated = jfw::getElementUpdated(); - if (sUpdated.equals(settings.getJavaInfoAttrVendorUpdate()) == sal_False) + if (!sUpdated.equals(settings.getJavaInfoAttrVendorUpdate())) return JFW_E_INVALID_SETTINGS; *ppInfo = aInfo.detach(); } |