diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-25 17:35:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-04 10:11:08 +0200 |
commit | 5285beeaa49f6678b471d472868c305c7d9da5f9 (patch) | |
tree | a3dbd28995142ab16b448f28e95821115ef5408f /vcl | |
parent | aeb41c9b9b7559c6d87bf92807acdc0df9e104cc (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 'vcl')
-rw-r--r-- | vcl/source/app/settings.cxx | 20 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 92d28162e354..a5dfdce11d69 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -562,25 +562,25 @@ OUString StyleSettings::ImplSymbolsStyleToName( sal_uLong nStyle ) const sal_uLong StyleSettings::ImplNameToSymbolsStyle( const OUString &rName ) const { - if ( rName == OUString("default") ) + if ( rName == "default" ) return STYLE_SYMBOLS_DEFAULT; - else if ( rName == OUString("hicontrast") ) + else if ( rName == "hicontrast" ) return STYLE_SYMBOLS_HICONTRAST; - else if ( rName == OUString("industrial") ) + else if ( rName == "industrial" ) return STYLE_SYMBOLS_TANGO; // industrial is dead - else if ( rName == OUString("crystal") ) + else if ( rName == "crystal" ) return STYLE_SYMBOLS_CRYSTAL; - else if ( rName == OUString("tango") ) + else if ( rName == "tango" ) return STYLE_SYMBOLS_TANGO; - else if ( rName == OUString("oxygen") ) + else if ( rName == "oxygen" ) return STYLE_SYMBOLS_OXYGEN; - else if ( rName == OUString("classic") ) + else if ( rName == "classic" ) return STYLE_SYMBOLS_CLASSIC; - else if ( rName == OUString("human") ) + else if ( rName == "human" ) return STYLE_SYMBOLS_HUMAN; - else if ( rName == OUString("sifr") ) + else if ( rName == "sifr" ) return STYLE_SYMBOLS_SIFR; - else if ( rName == OUString("tango_testing") ) + else if ( rName == "tango_testing" ) return STYLE_SYMBOLS_TANGO_TESTING; return STYLE_SYMBOLS_AUTO; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 27df84f358c3..91d790650c55 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -7909,7 +7909,7 @@ void Window::SetCursor( Cursor* pCursor ) void Window::SetText( const OUString& rStr ) { - if (rStr == OUString(mpWindowImpl->maText)) + if (rStr == mpWindowImpl->maText) return; DBG_CHKTHIS( Window, ImplDbgCheckWindow ); |