storage/nfs: use string::append() instead of string::insert()
Swap the order of adding the URI and the slash, because appending is cheaper than inserting.
This commit is contained in:
parent
142d1951d2
commit
540317ea2b
@ -82,10 +82,9 @@ public:
|
|||||||
static std::string
|
static std::string
|
||||||
UriToNfsPath(const char *uri_utf8)
|
UriToNfsPath(const char *uri_utf8)
|
||||||
{
|
{
|
||||||
std::string path(uri_utf8);
|
|
||||||
|
|
||||||
/* libnfs paths must begin with a slash */
|
/* libnfs paths must begin with a slash */
|
||||||
path.insert(path.begin(), '/');
|
std::string path("/");
|
||||||
|
path.append(uri_utf8);
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user