aboutsummaryrefslogtreecommitdiff
path: root/libbutl/path.txx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-06-03 12:55:14 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-06-03 12:55:14 +0300
commit2a7a93bb9e6f828ea0d4b59b400fbb2e16657c9c (patch)
treecbf988364a2daab7e72f7e2f6d23f6442caf347e /libbutl/path.txx
parent57a9066812b06262265594eac7c62c394f51e947 (diff)
Rename traits alias to traits_type for basic_path, basic_url, and string_table class templates
Diffstat (limited to 'libbutl/path.txx')
-rw-r--r--libbutl/path.txx22
1 files changed, 12 insertions, 10 deletions
diff --git a/libbutl/path.txx b/libbutl/path.txx
index bb2ab79..e407a16 100644
--- a/libbutl/path.txx
+++ b/libbutl/path.txx
@@ -158,9 +158,9 @@ LIBBUTL_MODEXPORT namespace butl //@@ MOD Clang needs this for some reason.
{
size_type n (_size ());
- for (size_type b (0), e (traits::find_separator (s, 0, n));
+ for (size_type b (0), e (traits_type::find_separator (s, 0, n));
;
- e = traits::find_separator (s, b, n))
+ e = traits_type::find_separator (s, b, n))
{
ps.push_back (
string_type (s, b, (e == string_type::npos ? n : e) - b));
@@ -172,7 +172,7 @@ LIBBUTL_MODEXPORT namespace butl //@@ MOD Clang needs this for some reason.
// Skip consecutive directory separators.
//
- while (e != n && traits::is_separator (s[e]))
+ while (e != n && traits_type::is_separator (s[e]))
++e;
if (e == n)
@@ -186,7 +186,7 @@ LIBBUTL_MODEXPORT namespace butl //@@ MOD Clang needs this for some reason.
if (!tsep)
{
const string_type& l (ps.back ());
- if (traits::current (l) || traits::parent (l))
+ if (traits_type::current (l) || traits_type::parent (l))
tsep = true;
}
}
@@ -199,12 +199,14 @@ LIBBUTL_MODEXPORT namespace butl //@@ MOD Clang needs this for some reason.
{
string_type& s (*i);
- if (traits::current (s))
+ if (traits_type::current (s))
continue;
// If '..' then pop the last directory from r unless it is '..'.
//
- if (traits::parent (s) && !r.empty () && !traits::parent (r.back ()))
+ if (traits_type::parent (s) &&
+ !r.empty () &&
+ !traits_type::parent (r.back ()))
{
// Cannot go past the root directory.
//
@@ -235,7 +237,7 @@ LIBBUTL_MODEXPORT namespace butl //@@ MOD Clang needs this for some reason.
// what getcwd() returns.
//
p = *i;
- p[0] = traits::toupper (p[0]);
+ p[0] = traits_type::toupper (p[0]);
}
else
{
@@ -251,7 +253,7 @@ LIBBUTL_MODEXPORT namespace butl //@@ MOD Clang needs this for some reason.
p += *i;
if (++i != e)
- p += traits::directory_separator;
+ p += traits_type::directory_separator;
}
if (tsep)
@@ -262,7 +264,7 @@ LIBBUTL_MODEXPORT namespace butl //@@ MOD Clang needs this for some reason.
//
if (abs)
{
- p += traits::directory_separator;
+ p += traits_type::directory_separator;
ts = -1;
}
else if (!cur_empty) // Collapse to canonical current directory.
@@ -292,7 +294,7 @@ LIBBUTL_MODEXPORT namespace butl //@@ MOD Clang needs this for some reason.
if (s.empty ())
throw invalid_basic_path<char> (s);
- traits::current_directory (s);
+ traits_type::current_directory (s);
}
template <typename C>