From 733b5d5ae2c5d625211e2985ac25728ac3f54883 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Mon, 21 Mar 2016 15:45:20 +0900 Subject: Imported Upstream version 1.58.0 Change-Id: If0072143aa26874812e0db6872e1efb10a3e5e94 Signed-off-by: DongHun Kwak --- boost/filesystem/path.hpp | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'boost/filesystem/path.hpp') diff --git a/boost/filesystem/path.hpp b/boost/filesystem/path.hpp index 37f39d0a3b..7ae4d2fd0d 100644 --- a/boost/filesystem/path.hpp +++ b/boost/filesystem/path.hpp @@ -158,8 +158,8 @@ namespace filesystem { // convert requires contiguous string, so copy std::basic_string::value_type> - s(begin, end); - path_traits::convert(s.c_str(), s.c_str()+s.size(), m_pathname); + seq(begin, end); + path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname); } } @@ -170,8 +170,8 @@ namespace filesystem { // convert requires contiguous string, so copy std::basic_string::value_type> - s(begin, end); - path_traits::convert(s.c_str(), s.c_str()+s.size(), m_pathname, cvt); + seq(begin, end); + path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt); } } @@ -219,8 +219,8 @@ namespace filesystem if (begin != end) { std::basic_string::value_type> - s(begin, end); - path_traits::convert(s.c_str(), s.c_str()+s.size(), m_pathname); + seq(begin, end); + path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname); } return *this; } @@ -232,8 +232,8 @@ namespace filesystem if (begin != end) { std::basic_string::value_type> - s(begin, end); - path_traits::convert(s.c_str(), s.c_str()+s.size(), m_pathname, cvt); + seq(begin, end); + path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt); } return *this; } @@ -286,8 +286,8 @@ namespace filesystem if (begin == end) return *this; std::basic_string::value_type> - s(begin, end); - path_traits::convert(s.c_str(), s.c_str()+s.size(), m_pathname); + seq(begin, end); + path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname); return *this; } @@ -297,8 +297,8 @@ namespace filesystem if (begin == end) return *this; std::basic_string::value_type> - s(begin, end); - path_traits::convert(s.c_str(), s.c_str()+s.size(), m_pathname, cvt); + seq(begin, end); + path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt); return *this; } @@ -359,6 +359,7 @@ namespace filesystem ; // change slashes to backslashes # endif path& remove_filename(); + path& remove_trailing_separator(); path& replace_extension(const path& new_extension = path()); void swap(path& rhs) { m_pathname.swap(rhs.m_pathname); } @@ -739,8 +740,8 @@ namespace filesystem return *this; string_type::size_type sep_pos(m_append_separator_if_needed()); std::basic_string::value_type> - s(begin, end); - path_traits::convert(s.c_str(), s.c_str()+s.size(), m_pathname); + seq(begin, end); + path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname); if (sep_pos) m_erase_redundant_separator(sep_pos); return *this; @@ -753,8 +754,8 @@ namespace filesystem return *this; string_type::size_type sep_pos(m_append_separator_if_needed()); std::basic_string::value_type> - s(begin, end); - path_traits::convert(s.c_str(), s.c_str()+s.size(), m_pathname, cvt); + seq(begin, end); + path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt); if (sep_pos) m_erase_redundant_separator(sep_pos); return *this; -- cgit v1.2.3