diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-27 10:45:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-27 10:47:33 +0100 |
commit | e344d2ac328332aeb0e326636a0a2cd61b812b6a (patch) | |
tree | 5563c5639c13810850253186cfd91aaf94488a57 /sal/qa/ByteSequence | |
parent | 65191cda819ee8f4d14f6cdf12568c35e46b5c66 (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.
Change-Id: Ibf43c5ded609b489952e1cc666cac1e72ffa2386
Diffstat (limited to 'sal/qa/ByteSequence')
-rw-r--r-- | sal/qa/ByteSequence/ByteSequence.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sal/qa/ByteSequence/ByteSequence.cxx b/sal/qa/ByteSequence/ByteSequence.cxx index 7ce6e465cff5..c742337748be 100644 --- a/sal/qa/ByteSequence/ByteSequence.cxx +++ b/sal/qa/ByteSequence/ByteSequence.cxx @@ -131,20 +131,20 @@ public: void test_same0() { rtl::ByteSequence s1; rtl::ByteSequence s2; - CPPUNIT_ASSERT_EQUAL(sal_True, s1 == s2); - CPPUNIT_ASSERT_EQUAL(sal_True, s2 == s1); - CPPUNIT_ASSERT_EQUAL(sal_False, s1 != s2); - CPPUNIT_ASSERT_EQUAL(sal_False, s2 != s1); + CPPUNIT_ASSERT_EQUAL(true, s1 == s2); + CPPUNIT_ASSERT_EQUAL(true, s2 == s1); + CPPUNIT_ASSERT_EQUAL(false, s1 != s2); + CPPUNIT_ASSERT_EQUAL(false, s2 != s1); } void test_diffLen() { sal_Int8 const a[5] = { 0, 1, 2, 3, 4 }; rtl::ByteSequence s1(a, 5); rtl::ByteSequence s2(a, 4); - CPPUNIT_ASSERT_EQUAL(sal_False, s1 == s2); - CPPUNIT_ASSERT_EQUAL(sal_False, s2 == s1); - CPPUNIT_ASSERT_EQUAL(sal_True, s1 != s2); - CPPUNIT_ASSERT_EQUAL(sal_True, s2 != s1); + CPPUNIT_ASSERT_EQUAL(false, s1 == s2); + CPPUNIT_ASSERT_EQUAL(false, s2 == s1); + CPPUNIT_ASSERT_EQUAL(true, s1 != s2); + CPPUNIT_ASSERT_EQUAL(true, s2 != s1); } void test_diffElem() { @@ -152,10 +152,10 @@ public: rtl::ByteSequence s1(a1, 5); sal_Int8 const a2[5] = { 0, 1, 10, 3, 4 }; rtl::ByteSequence s2(a2, 5); - CPPUNIT_ASSERT_EQUAL(sal_False, s1 == s2); - CPPUNIT_ASSERT_EQUAL(sal_False, s2 == s1); - CPPUNIT_ASSERT_EQUAL(sal_True, s1 != s2); - CPPUNIT_ASSERT_EQUAL(sal_True, s2 != s1); + CPPUNIT_ASSERT_EQUAL(false, s1 == s2); + CPPUNIT_ASSERT_EQUAL(false, s2 == s1); + CPPUNIT_ASSERT_EQUAL(true, s1 != s2); + CPPUNIT_ASSERT_EQUAL(true, s2 != s1); } CPPUNIT_TEST_SUITE(Test); |