diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-05 11:32:52 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-11 12:58:12 +0200 |
commit | ef90021abe3735fba57145598fd7c3d359d2718e (patch) | |
tree | 9da3ef32700774f56e0225ea28f3bc4ceaffe80c /vcl | |
parent | 0a9ef5a18e148c7a5c9a088e153a7873d1564841 (diff) |
convert OUString !compareToAscii to equalsAscii
Convert code like
if( ! aStr.compareToAscii("XXX") )
to
if( aStr.equalsAscii("XXX") )
which is both clearer and faster.
Change-Id: I267511bccab52f5225b291acbfa4e388b5a5302b
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/fontmanager/fontmanager.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx index 945899763f21..57307c26a51d 100644 --- a/vcl/generic/fontmanager/fontmanager.cxx +++ b/vcl/generic/fontmanager/fontmanager.cxx @@ -405,8 +405,8 @@ bool PrintFontManager::PrintFont::readAfmMetrics( MultiAtomProvider* pProvider, // try to parse the font name and decide whether it might be a // japanese font. Who invented this PITA ? OUString aPSNameLastToken( aPSName.copy( aPSName.lastIndexOf( '-' )+1 ) ); - if( ! aPSNameLastToken.compareToAscii( "H" ) || - ! aPSNameLastToken.compareToAscii( "V" ) ) + if( aPSNameLastToken.equalsAscii( "H" ) || + aPSNameLastToken.equalsAscii( "V" ) ) { static const char* pEncs[] = { @@ -430,7 +430,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( MultiAtomProvider* pProvider, if( nIndex == -1 ) break; nOffset = 0; - if( ! aToken.compareToAscii( pEncs[enc] ) ) + if( aToken.equalsAscii( pEncs[enc] ) ) { m_aEncoding = aEncs[ enc ]; m_bFontEncodingOnly = true; diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index 90a25bb4da9a..487ebc67d42e 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -1895,7 +1895,7 @@ GtkFileFilter* SalGtkFilePicker::implAddFilter( const OUString& rFilter, const O static const OUString aStarDot( "*." ); OUString aTokens; - bool bAllGlob = !rType.compareToAscii( "*.*" ) || !rType.compareToAscii( "*" ); + bool bAllGlob = rType.equalsAscii( "*.*" ) || rType.equalsAscii( "*" ); if (bAllGlob) gtk_file_filter_add_pattern( filter, "*" ); else |