diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:17:24 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:17:24 +0100 |
commit | acd1696a066b8fa6fb94a0613939565799413769 (patch) | |
tree | 31dac1c3922fe467e1771f514c3cca3d2e552ae3 /sax/qa/cppunit | |
parent | 681783c9adf85bde36348f11c03d3a483bf545be (diff) |
More loplugin:cstylecast: sax
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files
Change-Id: Ide5941d633fb3bf930b790d644154829b77ad117
Diffstat (limited to 'sax/qa/cppunit')
-rw-r--r-- | sax/qa/cppunit/attributes.cxx | 8 | ||||
-rw-r--r-- | sax/qa/cppunit/test_converter.cxx | 4 | ||||
-rw-r--r-- | sax/qa/cppunit/xmlimport.cxx | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sax/qa/cppunit/attributes.cxx b/sax/qa/cppunit/attributes.cxx index 15fdb31293b3..244da02eb535 100644 --- a/sax/qa/cppunit/attributes.cxx +++ b/sax/qa/cppunit/attributes.cxx @@ -55,15 +55,15 @@ void AttributesTest::test() xAttributeList->addUnknown("a", "a"); xAttributeList->addUnknown("b", "b", "b"); xAttributeList->addUnknown("c", "c"); - CPPUNIT_ASSERT_EQUAL( (sal_Int32) 3, xAttributeList->getUnknownAttributes().getLength() ); + CPPUNIT_ASSERT_EQUAL( sal_Int32(3), xAttributeList->getUnknownAttributes().getLength() ); - CPPUNIT_ASSERT_EQUAL( (sal_Int32) 2, xAttributeList->getFastAttributes().getLength() ); + CPPUNIT_ASSERT_EQUAL( sal_Int32(2), xAttributeList->getFastAttributes().getLength() ); xAttributeList->clear(); CPPUNIT_ASSERT( !xAttributeList->hasAttribute(1) ); - CPPUNIT_ASSERT_EQUAL( (sal_Int32) 0, xAttributeList->getFastAttributes().getLength() ); + CPPUNIT_ASSERT_EQUAL( sal_Int32(0), xAttributeList->getFastAttributes().getLength() ); xAttributeList->addUnknown("c", "c"); - CPPUNIT_ASSERT_EQUAL( (sal_Int32) 1, xAttributeList->getUnknownAttributes().getLength() ); + CPPUNIT_ASSERT_EQUAL( sal_Int32(1), xAttributeList->getUnknownAttributes().getLength() ); } CPPUNIT_TEST_SUITE_REGISTRATION( AttributesTest ); diff --git a/sax/qa/cppunit/test_converter.cxx b/sax/qa/cppunit/test_converter.cxx index d1ac259cc33c..1487acbb8607 100644 --- a/sax/qa/cppunit/test_converter.cxx +++ b/sax/qa/cppunit/test_converter.cxx @@ -160,7 +160,7 @@ void doTest(util::DateTime const & rdt, char const*const pis, util::DateTime odt; SAL_INFO("sax.cppunit","about to convert '" << is << "'"); bool bSuccess( Converter::parseDateTime(odt, is) ); - SAL_INFO("sax.cppunit","Y:" << odt.Year << " M:" << odt.Month << " D:" << odt.Day << " H:" << odt.Hours << " M:" << odt.Minutes << " S:" << odt.Seconds << " nS:" << odt.NanoSeconds << " UTC: " << (bool)odt.IsUTC); + SAL_INFO("sax.cppunit","Y:" << odt.Year << " M:" << odt.Month << " D:" << odt.Day << " H:" << odt.Hours << " M:" << odt.Minutes << " S:" << odt.Seconds << " nS:" << odt.NanoSeconds << " UTC: " << static_cast<bool>(odt.IsUTC)); CPPUNIT_ASSERT(bSuccess); CPPUNIT_ASSERT(eqDateTime(rdt, odt)); OUStringBuffer buf; @@ -254,7 +254,7 @@ void doTestTime(util::DateTime const & rdt, char const*const pis, util::DateTime odt; SAL_INFO("sax.cppunit","about to convert '" << is << "'"); bool bSuccess( Converter::parseTimeOrDateTime(odt, is) ); - SAL_INFO("sax.cppunit","Y:" << odt.Year << " M:" << odt.Month << " D:" << odt.Day << " H:" << odt.Hours << " M:" << odt.Minutes << " S:" << odt.Seconds << " nS:" << odt.NanoSeconds << " UTC: " << (bool)odt.IsUTC); + SAL_INFO("sax.cppunit","Y:" << odt.Year << " M:" << odt.Month << " D:" << odt.Day << " H:" << odt.Hours << " M:" << odt.Minutes << " S:" << odt.Seconds << " nS:" << odt.NanoSeconds << " UTC: " << static_cast<bool>(odt.IsUTC)); CPPUNIT_ASSERT(bSuccess); CPPUNIT_ASSERT(eqDateTime(rdt, odt)); OUStringBuffer buf; diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx index efaab5fabbc6..f7ea3ec92c19 100644 --- a/sax/qa/cppunit/xmlimport.cxx +++ b/sax/qa/cppunit/xmlimport.cxx @@ -316,7 +316,7 @@ sal_Int32 DummyTokenHandler::getTokenDirect( const char* pToken, sal_Int32 nLeng for( sal_uInt16 i = 0; i < SAL_N_ELEMENTS(tokens); i++ ) { if ( tokens[i] == sToken ) - return (sal_Int32)i; + return static_cast<sal_Int32>(i); } return FastToken::DONTKNOW; } |