There is not need to allocate memory just for getting the 'indexOf'

a literal within a OUString.

Change-Id: I01ca30c68228f81b3d313dfca5b975448f3c4fc7
This commit is contained in:
Christophe JAILLET
2012-07-14 18:00:06 +02:00
committed by Michael Meeks
parent 0dde6d4a2d
commit df645a2bd8
31 changed files with 73 additions and 75 deletions

View File

@@ -74,7 +74,7 @@ OUString replacePrefix(OUString const & url, OUString const & prefix) {
sal_Bool isFileUrl(const OUString& fileName)
{
if (fileName.indexOf(OUString(RTL_CONSTASCII_USTRINGPARAM("file://"))) == 0 )
if (fileName.indexOf("file://") == 0 )
return sal_True;
return sal_False;
}

View File

@@ -85,7 +85,7 @@ namespace unoexe
static sal_Bool isFileUrl(const OUString& fileName)
{
if (fileName.indexOf(OUString(RTL_CONSTASCII_USTRINGPARAM("file://"))) == 0 )
if (fileName.indexOf("file://") == 0 )
return sal_True;
return sal_False;
}