summaryrefslogtreecommitdiff
path: root/src/lib/case_insensitive_sorter.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-05-03 11:17:34 +0200
committerCarl Hetherington <cth@carlh.net>2021-05-03 20:18:04 +0200
commit689fa55d1529ad88449ca464e9107c4dcc54d1cb (patch)
treeedd1264941263f2fa25a98d61f98c87876c5b667 /src/lib/case_insensitive_sorter.cc
parent0aabe4060ea4bad7c7caac633aef0737fccff8c2 (diff)
C++11 tidying.
Diffstat (limited to 'src/lib/case_insensitive_sorter.cc')
-rw-r--r--src/lib/case_insensitive_sorter.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/case_insensitive_sorter.cc b/src/lib/case_insensitive_sorter.cc
index c26f1e642..4bf3c2d18 100644
--- a/src/lib/case_insensitive_sorter.cc
+++ b/src/lib/case_insensitive_sorter.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2016-2021 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -18,17 +18,19 @@
*/
+
#include "case_insensitive_sorter.h"
#include <boost/filesystem.hpp>
-#include <iostream>
+
using std::string;
+
bool
CaseInsensitiveSorter::operator() (boost::filesystem::path a, boost::filesystem::path b)
{
- string x = a.string ();
- string y = b.string ();
+ auto x = a.string();
+ auto y = b.string();
transform (x.begin(), x.end(), x.begin(), ::tolower);
transform (y.begin(), y.end(), y.begin(), ::tolower);
return x < y;