diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:22:34 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:35 +0100 |
commit | 60c40af090e420a8619b5236bde1ff4ef79100c6 (patch) | |
tree | ec8f50b4325045bec03708e14dcd996631c6c828 /sax/qa | |
parent | de63cac20fba1e7661687a4f1c1ce91182f4dfa0 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I54bf272b404d2302cafbde73ec5061ea2cd966ab
Diffstat (limited to 'sax/qa')
-rw-r--r-- | sax/qa/cppunit/attributes.cxx | 2 | ||||
-rw-r--r-- | sax/qa/cppunit/test_converter.cxx | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/sax/qa/cppunit/attributes.cxx b/sax/qa/cppunit/attributes.cxx index c76fd6556bf4..716b7b2c2389 100644 --- a/sax/qa/cppunit/attributes.cxx +++ b/sax/qa/cppunit/attributes.cxx @@ -34,7 +34,7 @@ public: void AttributesTest::test() { - uno::Reference<sax_fastparser::FastAttributeList> xAttributeList( new sax_fastparser::FastAttributeList(NULL) ); + uno::Reference<sax_fastparser::FastAttributeList> xAttributeList( new sax_fastparser::FastAttributeList(nullptr) ); xAttributeList->add(1, "1"); xAttributeList->add(2, OString("2")); diff --git a/sax/qa/cppunit/test_converter.cxx b/sax/qa/cppunit/test_converter.cxx index 1e3061e8090f..ecaa92e9c9b1 100644 --- a/sax/qa/cppunit/test_converter.cxx +++ b/sax/qa/cppunit/test_converter.cxx @@ -87,7 +87,7 @@ void ConverterTest::tearDown() } static void doTest(util::Duration const & rid, char const*const pis, - char const*const i_pos = 0) + char const*const i_pos = nullptr) { char const*const pos((i_pos) ? i_pos : pis); util::Duration od; @@ -163,18 +163,18 @@ static bool eqDateTime(const util::DateTime& a, const util::DateTime& b) { } static void doTest(util::DateTime const & rdt, char const*const pis, - char const*const i_pos = 0) + char const*const i_pos = nullptr) { char const*const pos((i_pos) ? i_pos : pis); OUString is(OUString::createFromAscii(pis)); util::DateTime odt; SAL_INFO("sax.cppunit","about to convert '" << is << "'"); - bool bSuccess( Converter::parseDateTime(odt, 0, is) ); + bool bSuccess( Converter::parseDateTime(odt, nullptr, 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); CPPUNIT_ASSERT(bSuccess); CPPUNIT_ASSERT(eqDateTime(rdt, odt)); OUStringBuffer buf; - Converter::convertDateTime(buf, odt, 0, true); + Converter::convertDateTime(buf, odt, nullptr, true); SAL_INFO("sax.cppunit","" << buf.toString()); CPPUNIT_ASSERT_EQUAL(OUString::createFromAscii(pos), buf.makeStringAndClear()); @@ -183,7 +183,7 @@ static void doTest(util::DateTime const & rdt, char const*const pis, static void doTestDateTimeF(char const*const pis) { util::DateTime odt; - bool bSuccess = Converter::parseDateTime(odt, 0, + bool bSuccess = Converter::parseDateTime(odt, nullptr, OUString::createFromAscii(pis)); SAL_INFO("sax.cppunit","Y:" << odt.Year << " M:" << odt.Month << " D:" << odt.Day << " H:" << odt.Hours << "H M:" << odt.Minutes << " S:" << odt.Seconds << " nS:" << odt.NanoSeconds); CPPUNIT_ASSERT(!bSuccess); @@ -258,18 +258,18 @@ void ConverterTest::testDateTime() } static void doTestTime(util::DateTime const & rdt, char const*const pis, - char const*const i_pos = 0) + char const*const i_pos = nullptr) { char const*const pos((i_pos) ? i_pos : pis); OUString is(OUString::createFromAscii(pis)); util::DateTime odt; SAL_INFO("sax.cppunit","about to convert '" << is << "'"); - bool bSuccess( Converter::parseTimeOrDateTime(odt, 0, is) ); + bool bSuccess( Converter::parseTimeOrDateTime(odt, nullptr, 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); CPPUNIT_ASSERT(bSuccess); CPPUNIT_ASSERT(eqDateTime(rdt, odt)); OUStringBuffer buf; - Converter::convertTimeOrDateTime(buf, odt, 0); + Converter::convertTimeOrDateTime(buf, odt, nullptr); SAL_INFO("sax.cppunit","" << buf.toString()); CPPUNIT_ASSERT_EQUAL(OUString::createFromAscii(pos), buf.makeStringAndClear()); @@ -278,7 +278,7 @@ static void doTestTime(util::DateTime const & rdt, char const*const pis, static void doTestTimeF(char const*const pis) { util::DateTime odt; - bool bSuccess = Converter::parseTimeOrDateTime(odt, 0, + bool bSuccess = Converter::parseTimeOrDateTime(odt, nullptr, OUString::createFromAscii(pis)); SAL_INFO("sax.cppunit","Y:" << odt.Year << " M:" << odt.Month << " D:" << odt.Day << " H:" << odt.Hours << "H M:" << odt.Minutes << " S:" << odt.Seconds << " nS:" << odt.NanoSeconds); CPPUNIT_ASSERT_MESSAGE(pis, !bSuccess); |