From c5c0084f0945cd712ff9a83de090d316e11c7fed Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 21 Jan 2018 13:22:37 +0100 Subject: Avoid string copy --- ingen/FilePath.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ingen/FilePath.hpp') 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& sv) : _str(sv) {} + FilePath(const boost::basic_string_view& sv) + : _str(sv.data(), sv.length()) + {} ~FilePath() = default; -- cgit v1.2.1