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:
committed by
Michael Meeks
parent
0dde6d4a2d
commit
df645a2bd8
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user