diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2012-08-06 10:40:32 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-08-06 12:22:10 +0100 |
commit | cf239da5c403164e75c369173fe6bed747de9e09 (patch) | |
tree | 38999901baaf3091692d7649c7804f224b661a99 /svl | |
parent | chart2: merge component files for new chartcore library (diff) | |
download | core-cf239da5c403164e75c369173fe6bed747de9e09.tar.gz core-cf239da5c403164e75c369173fe6bed747de9e09.zip |
There is not need to allocate memory just for getting the 'indexOf'
a literal within a OUString.
Change-Id: Icc8e22c43f6ddca25cb284a3d45ab39680ad6d1f
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/passwordcontainer/passwordcontainer.cxx | 2 | ||||
-rw-r--r-- | svl/source/passwordcontainer/syscreds.cxx | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 7e1177f9287e..0a86600acebb 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -134,7 +134,7 @@ static vector< ::rtl::OUString > getInfoFromInd( ::rtl::OUString aInd ) static sal_Bool shorterUrl( ::rtl::OUString& aURL ) { sal_Int32 aInd = aURL.lastIndexOf( sal_Unicode( '/' ) ); - if( aInd > 0 && aURL.indexOf( ::rtl::OUString("://") ) != aInd-2 ) + if( aInd > 0 && aURL.indexOf( "://" ) != aInd-2 ) { aURL = aURL.copy( 0, aInd ); return sal_True; diff --git a/svl/source/passwordcontainer/syscreds.cxx b/svl/source/passwordcontainer/syscreds.cxx index ce0f0e42abe4..f9cb5303dc97 100644 --- a/svl/source/passwordcontainer/syscreds.cxx +++ b/svl/source/passwordcontainer/syscreds.cxx @@ -110,8 +110,7 @@ namespace if( aInd > 0 ) { sal_Int32 aPrevInd = aURL.lastIndexOf( sal_Unicode( '/' ), aInd ); - if ( aURL.indexOf( ::rtl::OUString("://") ) - != aPrevInd - 2 || + if ( aURL.indexOf( "://" ) != aPrevInd - 2 || aInd != aURL.getLength() - 1 ) { aURL = aURL.copy( 0, aInd ); |