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:
Max Kellermann 2014-09-28 18:25:51 +02:00
parent 142d1951d2
commit 540317ea2b

View File

@ -82,10 +82,9 @@ public:
static std::string
UriToNfsPath(const char *uri_utf8)
{
std::string path(uri_utf8);
/* libnfs paths must begin with a slash */
path.insert(path.begin(), '/');
std::string path("/");
path.append(uri_utf8);
return path;
}