diff options
Diffstat (limited to 'sax/qa')
-rw-r--r-- | sax/qa/cppunit/parser.cxx | 2 | ||||
-rw-r--r-- | sax/qa/cppunit/xmlimport.cxx | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/sax/qa/cppunit/parser.cxx b/sax/qa/cppunit/parser.cxx index 670c1afa9277..288a91eefda0 100644 --- a/sax/qa/cppunit/parser.cxx +++ b/sax/qa/cppunit/parser.cxx @@ -37,7 +37,7 @@ public: CPPUNIT_ASSERT_MESSAGE( "getUTF8Identifier: unexpected call", false ); return uno::Sequence<sal_Int8>(); } - virtual sal_Int32 getTokenDirect( const char * /* pToken */, sal_Int32 /* nLength */ ) const override + virtual sal_Int32 getTokenDirect(std::string_view /* token */) const override { return -1; } diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx index 963fa97f6893..18f8c9a21112 100644 --- a/sax/qa/cppunit/xmlimport.cxx +++ b/sax/qa/cppunit/xmlimport.cxx @@ -262,7 +262,7 @@ public: virtual Sequence< sal_Int8 > SAL_CALL getUTF8Identifier( sal_Int32 nToken ) override; virtual sal_Int32 SAL_CALL getTokenFromUTF8( const css::uno::Sequence< sal_Int8 >& Identifier ) override; //FastTokenHandlerBase - virtual sal_Int32 getTokenDirect( const char *pToken, sal_Int32 nLength ) const override; + virtual sal_Int32 getTokenDirect(std::string_view sToken) const override; }; const std::string_view DummyTokenHandler::tokens[] = { @@ -304,13 +304,12 @@ Sequence< sal_Int8 > DummyTokenHandler::getUTF8Identifier( sal_Int32 nToken ) sal_Int32 DummyTokenHandler::getTokenFromUTF8( const uno::Sequence< sal_Int8 >& rIdentifier ) { - return getTokenDirect( reinterpret_cast< const char* >( - rIdentifier.getConstArray() ), rIdentifier.getLength() ); + return getTokenDirect(std::string_view( + reinterpret_cast<const char*>(rIdentifier.getConstArray()), rIdentifier.getLength())); } -sal_Int32 DummyTokenHandler::getTokenDirect( const char* pToken, sal_Int32 nLength ) const +sal_Int32 DummyTokenHandler::getTokenDirect(std::string_view sToken) const { - std::string_view sToken( pToken, nLength ); for( size_t i = 0; i < std::size(tokens); i++ ) { if ( tokens[i] == sToken ) |