summaryrefslogtreecommitdiff
path: root/dtrans
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-25 17:35:42 +0200
committerNoel Grandin <noel@peralex.com>2013-11-04 10:11:08 +0200
commit5285beeaa49f6678b471d472868c305c7d9da5f9 (patch)
treea3dbd28995142ab16b448f28e95821115ef5408f /dtrans
parentaeb41c9b9b7559c6d87bf92807acdc0df9e104cc (diff)
remove redundant calls to OUString constructor in if expression
Convert code like: if( aStr == OUString("xxxx") ) to this: if( aStr == "xxxx" ) Change-Id: I8d201f048477731eff590fb988259ef0935c080c
Diffstat (limited to 'dtrans')
-rw-r--r--dtrans/source/cnttype/mcnttype.cxx10
-rw-r--r--dtrans/source/test/test_dtrans.cxx2
2 files changed, 6 insertions, 6 deletions
diff --git a/dtrans/source/cnttype/mcnttype.cxx b/dtrans/source/cnttype/mcnttype.cxx
index 129370196fd3..89eea11beda4 100644
--- a/dtrans/source/cnttype/mcnttype.cxx
+++ b/dtrans/source/cnttype/mcnttype.cxx
@@ -246,13 +246,13 @@ void SAL_CALL CMimeContentType::trailer( void )
OUString sToken(TOKEN);
while( !m_nxtSym.isEmpty( ) )
{
- if ( m_nxtSym == OUString("(") )
+ if ( m_nxtSym == "(" )
{
getSym( );
comment( );
acceptSym( OUString(")") );
}
- else if ( m_nxtSym == OUString(";") )
+ else if ( m_nxtSym == ";" )
{
// get the parameter name
getSym( );
@@ -315,7 +315,7 @@ OUString SAL_CALL CMimeContentType::pValue( )
OUString sToken(TOKEN);
// quoted pvalue
- if ( m_nxtSym == OUString( "\"" ) )
+ if ( m_nxtSym == "\"" )
{
getSym( );
pvalue = quotedPValue( );
@@ -362,7 +362,7 @@ OUString SAL_CALL CMimeContentType::quotedPValue( )
else if ( isInRange( m_nxtSym, OUString(TOKEN) + OUString(TSPECIALS) + OUString(SPACE) ) )
{
pvalue += m_nxtSym;
- if ( m_nxtSym == OUString( "\"" ) )
+ if ( m_nxtSym == "\"" )
bAfterQuoteSign = sal_True;
else
bAfterQuoteSign = sal_False;
@@ -408,7 +408,7 @@ void SAL_CALL CMimeContentType::comment( void )
{
if ( isInRange( m_nxtSym, OUString(TOKEN) + OUString(SPACE) ) )
getSym( );
- else if ( m_nxtSym == OUString(")") )
+ else if ( m_nxtSym == ")" )
break;
else
throw IllegalArgumentException( );
diff --git a/dtrans/source/test/test_dtrans.cxx b/dtrans/source/test/test_dtrans.cxx
index b0226c83f1a4..e0bdf950c23b 100644
--- a/dtrans/source/test/test_dtrans.cxx
+++ b/dtrans/source/test/test_dtrans.cxx
@@ -434,7 +434,7 @@ int SAL_CALL main( int argc, const char* argv[] )
TEST( "initial number of clipboards (0): ", xClipboardManager->listClipboardNames().getLength() == 0 );
PERFORM( "insertion of generic clipboard: ", xClipboardManager->addClipboard( xClipboard ) );
TEST( "number of inserted clipboards (1): ", xClipboardManager->listClipboardNames().getLength() == 1 );
- TEST( "name of inserted clipboard (generic): ", xClipboardManager->listClipboardNames()[0] == OUString("generic") );
+ TEST( "name of inserted clipboard (generic): ", xClipboardManager->listClipboardNames()[0] == "generic" );
TEST( "inserted clipboard instance: ", xClipboardManager->getClipboard( OUString("generic") ) == xClipboard );
PERFORM( "removal of generic clipboard: ", xClipboardManager->removeClipboard( OUString("generic") ) );
TEST( "number of inserted clipboards (0): ", xClipboardManager->listClipboardNames().getLength() == 0 );