diff options
author | David Robillard <d@drobilla.net> | 2018-01-21 13:22:37 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-01-21 13:22:37 +0100 |
commit | c5c0084f0945cd712ff9a83de090d316e11c7fed (patch) | |
tree | ec29387748bebee6188d3eb624d6adbcbb30477c /ingen | |
parent | 93a646cacbbf5b96ec711fc2fe5681e21d1caca3 (diff) | |
download | ingen-c5c0084f0945cd712ff9a83de090d316e11c7fed.tar.gz ingen-c5c0084f0945cd712ff9a83de090d316e11c7fed.tar.bz2 ingen-c5c0084f0945cd712ff9a83de090d316e11c7fed.zip |
Avoid string copy
Diffstat (limited to 'ingen')
-rw-r--r-- | ingen/FilePath.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ingen/FilePath.hpp b/ingen/FilePath.hpp index 7ad341e0..f81e59c0 100644 --- a/ingen/FilePath.hpp +++ b/ingen/FilePath.hpp @@ -60,7 +60,9 @@ public: FilePath(string_type&& str) : _str(std::move(str)) {} FilePath(const string_type& str) : _str(str) {} FilePath(const value_type* str) : _str(str) {} - FilePath(const boost::basic_string_view<value_type>& sv) : _str(sv) {} + FilePath(const boost::basic_string_view<value_type>& sv) + : _str(sv.data(), sv.length()) + {} ~FilePath() = default; |