Fix inefficient Assign pattern to use Append instead. b=113188 r=jag sr=jst
This commit is contained in:
@@ -453,8 +453,7 @@ nsLocalFile::AppendRelativePath(const char *fragment)
|
|||||||
if (*fragment == '/')
|
if (*fragment == '/')
|
||||||
return NS_ERROR_FILE_UNRECOGNIZED_PATH;
|
return NS_ERROR_FILE_UNRECOGNIZED_PATH;
|
||||||
|
|
||||||
mPath.Assign(mPath + NS_LITERAL_CSTRING("/") +
|
mPath.Append(NS_LITERAL_CSTRING("/") + nsDependentCString(fragment));
|
||||||
nsDependentCString(fragment));
|
|
||||||
|
|
||||||
if (!mPath.get())
|
if (!mPath.get())
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
|
|||||||
Reference in New Issue
Block a user