diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-19 17:06:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-20 10:07:32 +0200 |
commit | 52bbd9cc00b5a1e15e4f96b5c5fa5e75855692c1 (patch) | |
tree | 72d0d1d16806f1c785a4f79ea2c0cdfe54bb8101 /cppu/source/uno | |
parent | 3af99e4d59d89c343965a928681a30f36b1007d2 (diff) |
remove unnecessary RTL_CONSTASCII_STRINGPARAM in appendAscii calls
Convert code like:
aStrBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ln(x)" ));
to:
aStrBuf.append( "ln(x)" );
which compiles down to the same code.
Change-Id: I24c7cb45ceb32fd7cd6ec7ed203c2a5d746f1c5c
Diffstat (limited to 'cppu/source/uno')
-rw-r--r-- | cppu/source/uno/data.cxx | 7 | ||||
-rw-r--r-- | cppu/source/uno/lbenv.cxx | 35 | ||||
-rw-r--r-- | cppu/source/uno/lbmap.cxx | 2 | ||||
-rw-r--r-- | cppu/source/uno/loadmodule.cxx | 4 |
4 files changed, 22 insertions, 26 deletions
diff --git a/cppu/source/uno/data.cxx b/cppu/source/uno/data.cxx index 9619dbf61de1..f6f7b1e013ae 100644 --- a/cppu/source/uno/data.cxx +++ b/cppu/source/uno/data.cxx @@ -97,12 +97,11 @@ void * binuno_queryInterface( void * pUnoI, typelib_TypeDescriptionReference * p { #if OSL_DEBUG_LEVEL > 1 OUStringBuffer buf( 128 ); - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("### exception occurred querying for interface ") ); + buf.append( "### exception occurred querying for interface " ); buf.append( * reinterpret_cast< OUString const * >( &pDestType->pTypeName ) ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(": [") ); + buf.append( ": [" ); buf.append( * reinterpret_cast< OUString const * >( &pExc->pType->pTypeName ) ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("] ") ); + buf.append( "] " ); // Message is very first member buf.append( * reinterpret_cast< OUString const * >( pExc->pData ) ); OString cstr( diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx index 1390e56536eb..04dfa2d056bd 100644 --- a/cppu/source/uno/lbenv.cxx +++ b/cppu/source/uno/lbenv.cxx @@ -718,7 +718,7 @@ extern "C" CPPU_DLLPUBLIC void SAL_CALL uno_dumpEnvironment( { writeLine( stream, "###################################" "###########################################", pFilter ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("environment: ") ); + buf.append( "environment: " ); buf.append( pEnv->pTypeName ); writeLine( stream, buf.makeStringAndClear(), pFilter ); writeLine( stream, "NO INTERFACE INFORMATION AVAILABLE!", pFilter ); @@ -727,7 +727,7 @@ extern "C" CPPU_DLLPUBLIC void SAL_CALL uno_dumpEnvironment( writeLine( stream, "########################################" "######################################", pFilter ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("environment dump: ") ); + buf.append( "environment dump: " ); buf.append( pEnv->pTypeName ); writeLine( stream, buf.makeStringAndClear(), pFilter ); @@ -741,12 +741,12 @@ extern "C" CPPU_DLLPUBLIC void SAL_CALL uno_dumpEnvironment( { ObjectEntry * pOEntry = iPos->second; - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("+ ") ); + buf.append( "+ " ); if (pOEntry->mixedObject) - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("mixed ") ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("object entry: nRef=") ); + buf.append( "mixed " ); + buf.append( "object entry: nRef=" ); buf.append( pOEntry->nRef, 10 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("; oid=\"") ); + buf.append( "; oid=\"" ); buf.append( pOEntry->oid ); buf.append( (sal_Unicode) '\"' ); writeLine( stream, buf.makeStringAndClear(), pFilter ); @@ -756,21 +756,20 @@ extern "C" CPPU_DLLPUBLIC void SAL_CALL uno_dumpEnvironment( { const InterfaceEntry & rIEntry = pOEntry->aInterfaces[nPos]; - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" - ") ); + buf.append( " - " ); buf.append( ((typelib_TypeDescription *) rIEntry.pTypeDescr)->pTypeName ); if (rIEntry.fpFreeProxy) { - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("; proxy free=0x") ); + buf.append( "; proxy free=0x" ); buf.append( reinterpret_cast< sal_IntPtr >(rIEntry.fpFreeProxy), 16 ); } else { - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("; original") ); + buf.append( "; original" ); } - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("; ptr=0x") ); + buf.append( "; ptr=0x" ); buf.append( reinterpret_cast< sal_IntPtr >(rIEntry.pInterface), 16 ); @@ -779,8 +778,7 @@ extern "C" CPPU_DLLPUBLIC void SAL_CALL uno_dumpEnvironment( ::std::size_t erased = ptr2obj.erase( rIEntry.pInterface ); if (erased != 1) { - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( - " (ptr not found in map!)") ); + buf.append( " (ptr not found in map!)" ); } } writeLine( stream, buf.makeStringAndClear(), pFilter ); @@ -808,9 +806,9 @@ extern "C" CPPU_DLLPUBLIC void SAL_CALL uno_dumpEnvironmentByName( else { ::rtl::OUStringBuffer buf( 32 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("environment \"") ); + buf.append( "environment \"" ); buf.append( pEnvDcp ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" does not exist!") ); + buf.append( "\" does not exist!" ); writeLine( stream, buf.makeStringAndClear(), pFilter ); } } @@ -825,7 +823,7 @@ namespace makeOIdPart() { ::rtl::OUStringBuffer aRet( 64 ); - aRet.appendAscii( RTL_CONSTASCII_STRINGPARAM("];") ); + aRet.append( "];" ); // pid oslProcessInfo info; info.Size = sizeof(oslProcessInfo); @@ -836,8 +834,7 @@ namespace } else { - aRet.appendAscii( - RTL_CONSTASCII_STRINGPARAM("unknown process id") ); + aRet.append( "unknown process id" ); } // good guid sal_uInt8 ar[16]; @@ -1130,7 +1127,7 @@ static uno_Environment * initDefaultEnvironment( // late init with some code from matching uno language binding ::rtl::OUStringBuffer aLibName( 16 ); aLibName.append( envTypeName ); - aLibName.appendAscii( RTL_CONSTASCII_STRINGPARAM("_uno" ) ); + aLibName.append( "_uno" ); OUString aStr( aLibName.makeStringAndClear() ); if (!loadEnv(aStr, pEnv)) diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx index 9c6061565061..4f281ba45c23 100644 --- a/cppu/source/uno/lbmap.cxx +++ b/cppu/source/uno/lbmap.cxx @@ -290,7 +290,7 @@ static inline OUString getMappingName( aKey.append( rFrom.getTypeName() ); aKey.append( (sal_Unicode)'[' ); aKey.append( reinterpret_cast< sal_IntPtr >(rFrom.get()), 16 ); - aKey.appendAscii( RTL_CONSTASCII_STRINGPARAM("];") ); + aKey.append( "];" ); aKey.append( rTo.getTypeName() ); aKey.append( (sal_Unicode)'[' ); aKey.append( reinterpret_cast< sal_IntPtr >(rTo.get()), 16 ); diff --git a/cppu/source/uno/loadmodule.cxx b/cppu/source/uno/loadmodule.cxx index 9271a89e9e90..f00936d328d2 100644 --- a/cppu/source/uno/loadmodule.cxx +++ b/cppu/source/uno/loadmodule.cxx @@ -34,10 +34,10 @@ namespace cppu { namespace detail { ::oslModule loadModule(rtl::OUString const & name) { rtl::OUStringBuffer b; #if defined SAL_DLLPREFIX - b.appendAscii(RTL_CONSTASCII_STRINGPARAM(SAL_DLLPREFIX)); + b.append(SAL_DLLPREFIX); #endif b.append(name); - b.appendAscii(RTL_CONSTASCII_STRINGPARAM(SAL_DLLEXTENSION)); + b.append(SAL_DLLEXTENSION); return ::osl_loadModuleRelative( reinterpret_cast< oslGenericFunction >(&loadModule), b.makeStringAndClear().pData, |