diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-03-21 15:45:20 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-03-21 15:46:37 +0900 |
commit | 733b5d5ae2c5d625211e2985ac25728ac3f54883 (patch) | |
tree | a5b214744b256f07e1dc2bd7273035a7808c659f /boost/filesystem/path.hpp | |
parent | 08c1e93fa36a49f49325a07fe91ff92c964c2b6c (diff) | |
download | boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.tar.gz boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.tar.bz2 boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.zip |
Imported Upstream version 1.58.0upstream/1.58.0
Change-Id: If0072143aa26874812e0db6872e1efb10a3e5e94
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/filesystem/path.hpp')
-rw-r--r-- | boost/filesystem/path.hpp | 33 |
1 files changed, 17 insertions, 16 deletions
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<typename std::iterator_traits<InputIterator>::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<typename std::iterator_traits<InputIterator>::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<typename std::iterator_traits<InputIterator>::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<typename std::iterator_traits<InputIterator>::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<typename std::iterator_traits<InputIterator>::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<typename std::iterator_traits<InputIterator>::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<typename std::iterator_traits<InputIterator>::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<typename std::iterator_traits<InputIterator>::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; |