diff options
author | Max Kellermann <max@duempel.org> | 2014-09-28 18:25:51 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-09-28 18:25:51 +0200 |
commit | 540317ea2ba6a36f041364fb68ec6b8b43395d98 (patch) | |
tree | f8c24d6194e04ea540bd1d9c892f28a3324b1f9b | |
parent | 142d1951d25329c4ca6881d04e2f4ab82d05ac11 (diff) | |
download | mpd-540317ea2ba6a36f041364fb68ec6b8b43395d98.tar.gz mpd-540317ea2ba6a36f041364fb68ec6b8b43395d98.tar.xz mpd-540317ea2ba6a36f041364fb68ec6b8b43395d98.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/storage/plugins/NfsStorage.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/storage/plugins/NfsStorage.cxx b/src/storage/plugins/NfsStorage.cxx index e8ac23ec0..2c331dde6 100644 --- a/src/storage/plugins/NfsStorage.cxx +++ b/src/storage/plugins/NfsStorage.cxx @@ -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; } |