summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-03-14 18:35:17 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-03-14 18:35:17 (GMT)
commita135c6ff4dcded5661a2321512960b14cf8c15c8 (patch)
treeb0017ecfe702304f592b9d4e8b943784cff26fb2 /3rdParty/Boost/src/libs/filesystem/v3/src/path.cpp
parent02d6188ab335e6c62b8341b84579d9549d215118 (diff)
downloadswift-a135c6ff4dcded5661a2321512960b14cf8c15c8.zip
swift-a135c6ff4dcded5661a2321512960b14cf8c15c8.tar.bz2
Updated Boost to 1.46.1.
This should hopefuily fix a hang on shutdown on Mac OS X. Resolves: #782 Release-Notes: Fixed a potential hang on shutdown on Mac OS X.
Diffstat (limited to '3rdParty/Boost/src/libs/filesystem/v3/src/path.cpp')
-rw-r--r--3rdParty/Boost/src/libs/filesystem/v3/src/path.cpp22
1 files changed, 4 insertions, 18 deletions
diff --git a/3rdParty/Boost/src/libs/filesystem/v3/src/path.cpp b/3rdParty/Boost/src/libs/filesystem/v3/src/path.cpp
index 53a4cc6..cc30570 100644
--- a/3rdParty/Boost/src/libs/filesystem/v3/src/path.cpp
+++ b/3rdParty/Boost/src/libs/filesystem/v3/src/path.cpp
@@ -27,6 +27,7 @@
#include <boost/scoped_array.hpp>
#include <boost/system/error_code.hpp>
#include <boost/assert.hpp>
+#include <algorithm>
#include <cstddef>
#include <cstring>
#include <cassert>
@@ -155,27 +156,17 @@ namespace filesystem3
# ifdef BOOST_WINDOWS_API
- void path::m_portable()
- {
- for (string_type::iterator it = m_pathname.begin();
- it != m_pathname.end(); ++it)
- {
- if (*it == L'\\')
- *it = L'/';
- }
- }
-
const std::string path::generic_string(const codecvt_type& cvt) const
{
path tmp(*this);
- tmp.m_portable();
+ tmp.make_preferred();
return tmp.string(cvt);
}
const std::wstring path::generic_wstring() const
{
path tmp(*this);
- tmp.m_portable();
+ tmp.make_preferred();
return tmp.wstring();
}
@@ -216,12 +207,7 @@ namespace filesystem3
# ifdef BOOST_WINDOWS_API
path & path::make_preferred()
{
- for (string_type::iterator it = m_pathname.begin();
- it != m_pathname.end(); ++it)
- {
- if (*it == L'/')
- *it = L'\\';
- }
+ std::replace(m_pathname.begin(), m_pathname.end(), L'\\', L'/');
return *this;
}
# endif