aboutsummaryrefslogtreecommitdiff
path: root/butl/path
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-06-03 15:14:17 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-06-03 15:14:17 +0200
commit08c7238ae6be49d6eb51099107538f5a4522f9dd (patch)
tree8bd8adde8a263cf53c53436f92f54f2bb5b12d14 /butl/path
parentaa8f20ac378e7aa8e3ed71864c5f546c2166c39d (diff)
Remove canonicalization requirement from path_map
Diffstat (limited to 'butl/path')
-rw-r--r--butl/path9
1 files changed, 7 insertions, 2 deletions
diff --git a/butl/path b/butl/path
index df76f99..c2bf682 100644
--- a/butl/path
+++ b/butl/path
@@ -132,8 +132,13 @@ namespace butl
static int
compare (string_type const& l, string_type const& r)
{
- size_type ln (l.size ()), rn (r.size ()), n (ln < rn ? ln : rn);
- for (size_type i (0); i != n; ++i)
+ return compare (l.c_str (), l.size (), r.c_str (), r.size ());
+ }
+
+ static int
+ compare (const C* l, size_type ln, const C* r, size_t rn)
+ {
+ for (size_type i (0), n (ln < rn ? ln : rn); i != n; ++i)
{
#ifdef _WIN32
C lc (tolower (l[i])), rc (tolower (r[i]));