/*
- 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.
*/
+
#include "case_insensitive_sorter.h"
#include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
-#include <iostream>
+#include <algorithm>
+
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;