From 1730df0127ff230cf6c89f4815f5b59c8603fa2b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 20 Nov 2013 10:05:20 +0200 Subject: remove unnecessary RTL_CONSTASCII_STRINGPARAM in OString::append Convert code like: aOStringBuf.append( RTL_CONSTASCII_STRINGPARAM( " is missing )") ); to: aOStringBuf.append( " is missing )" ); which compiles down to the same code. Change-Id: I3d8ed0cbf96a881686524a167412d5f303c06b71 --- .../source/drivers/postgresql/pq_statement.cxx | 42 +++++++++------------- 1 file changed, 17 insertions(+), 25 deletions(-) (limited to 'connectivity/source/drivers/postgresql') diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx index 47697d1990f5..91272046b727 100644 --- a/connectivity/source/drivers/postgresql/pq_statement.cxx +++ b/connectivity/source/drivers/postgresql/pq_statement.cxx @@ -564,50 +564,42 @@ bool executePostgresCommand( const OString & cmd, struct CommandData *data ) else if( ! table.getLength() ) { OStringBuffer buf( 128 ); - buf.append( - RTL_CONSTASCII_STRINGPARAM( - "can't support updateable resultset, because a single table in the " - "WHERE part of the statement could not be identified (" ) ); + buf.append( "can't support updateable resultset, because a single table in the " + "WHERE part of the statement could not be identified (" ); buf.append( cmd ); - buf.append( RTL_CONSTASCII_STRINGPARAM( "." ) ); + buf.append( "." ); aReason = buf.makeStringAndClear(); } else if( sourceTableKeys.getLength() ) { OStringBuffer buf( 128 ); - buf.append( - RTL_CONSTASCII_STRINGPARAM( - "can't support updateable resultset for table " ) ); + buf.append( "can't support updateable resultset for table " ); buf.append( OUStringToOString( schema, pSettings->encoding ) ); - buf.append( RTL_CONSTASCII_STRINGPARAM( "." ) ); + buf.append( "." ); buf.append( OUStringToOString( table, pSettings->encoding ) ); - buf.append( RTL_CONSTASCII_STRINGPARAM( ", because resultset does not contain a part of the primary key ( column " ) ); + buf.append( ", because resultset does not contain a part of the primary key ( column " ); buf.append( OUStringToOString( sourceTableKeys[i], pSettings->encoding ) ); - buf.append( RTL_CONSTASCII_STRINGPARAM( " is missing )") ); + buf.append( " is missing )" ); aReason = buf.makeStringAndClear(); } else { OStringBuffer buf( 128 ); - buf.append( - RTL_CONSTASCII_STRINGPARAM( - "can't support updateable resultset for table " ) ); + buf.append( "can't support updateable resultset for table " ); buf.append( OUStringToOString( schema, pSettings->encoding ) ); - buf.append( RTL_CONSTASCII_STRINGPARAM( "." ) ); + buf.append( "." ); buf.append( OUStringToOString( table, pSettings->encoding ) ); - buf.append( RTL_CONSTASCII_STRINGPARAM( ", because resultset table does not have a primary key " ) ); + buf.append( ", because resultset table does not have a primary key " ); aReason = buf.makeStringAndClear(); } } else { OStringBuffer buf( 128 ); - buf.append( - RTL_CONSTASCII_STRINGPARAM( - "can't support updateable result for selects with multiple tables (" ) ); + buf.append( "can't support updateable result for selects with multiple tables (" ); buf.append( cmd ); - buf.append( RTL_CONSTASCII_STRINGPARAM( ")" ) ); + buf.append( ")" ); log( pSettings, LogLevel::SQL, buf.makeStringAndClear().getStr() ); } if( ! (*(data->pLastResultset)).is() ) @@ -644,14 +636,14 @@ bool executePostgresCommand( const OString & cmd, struct CommandData *data ) if( isLog( pSettings, LogLevel::SQL ) ) { OStringBuffer buf( 128 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("executed query '") ); + buf.append( "executed query '" ); buf.append( cmd ); - buf.append( RTL_CONSTASCII_STRINGPARAM("' successfully") ); - buf.append( RTL_CONSTASCII_STRINGPARAM(", duration=") ); + buf.append( "' successfully" ); + buf.append( ", duration=" ); buf.append( duration ); - buf.append( RTL_CONSTASCII_STRINGPARAM("ms, returnedRows=") ); + buf.append( "ms, returnedRows=" ); buf.append( returnedRows ); - buf.append( RTL_CONSTASCII_STRINGPARAM("." ) ); + buf.append( "." ); log( pSettings, LogLevel::SQL, buf.makeStringAndClear().getStr() ); } break; -- cgit