summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-01-07 15:20:59 +0000
committerCarl Hetherington <cth@carlh.net>2016-01-07 15:20:59 +0000
commit0973ea8c5ddc0a7463eaf0e2d0e267c525acbab5 (patch)
tree5ea48123a9b49eed2954e356bc63d67042bd612e /src/lib
parent52b9a5f3edb119c19ce49c6885a7f3733d11f2e8 (diff)
Fix slightly odd #includes of image_filename_sorter.cc
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/image_content.cc3
-rw-r--r--src/lib/image_filename_sorter.cc7
-rw-r--r--src/lib/image_filename_sorter.h29
3 files changed, 33 insertions, 6 deletions
diff --git a/src/lib/image_content.cc b/src/lib/image_content.cc
index dc1efa965..c415f933d 100644
--- a/src/lib/image_content.cc
+++ b/src/lib/image_content.cc
@@ -25,6 +25,7 @@
#include "frame_rate_change.h"
#include "exceptions.h"
#include "safe_stringstream.h"
+#include "image_filename_sorter.h"
#include <libcxml/cxml.h>
#include <libxml++/libxml++.h>
#include <boost/foreach.hpp>
@@ -32,8 +33,6 @@
#include "i18n.h"
-#include "image_filename_sorter.cc"
-
using std::string;
using std::cout;
using boost::shared_ptr;
diff --git a/src/lib/image_filename_sorter.cc b/src/lib/image_filename_sorter.cc
index 143daed71..112077f55 100644
--- a/src/lib/image_filename_sorter.cc
+++ b/src/lib/image_filename_sorter.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2015-2016 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,11 +17,10 @@
*/
-#include <iostream>
+#include "raw_convert.h"
#include <boost/filesystem.hpp>
-#include <boost/optional.hpp>
#include <boost/foreach.hpp>
-#include "raw_convert.h"
+#include <iostream>
class ImageFilenameSorter
{
diff --git a/src/lib/image_filename_sorter.h b/src/lib/image_filename_sorter.h
new file mode 100644
index 000000000..67843109e
--- /dev/null
+++ b/src/lib/image_filename_sorter.h
@@ -0,0 +1,29 @@
+/*
+ Copyright (C) 2015-2016 Carl Hetherington <cth@carlh.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <boost/filesystem.hpp>
+
+class ImageFilenameSorter
+{
+public:
+ bool operator() (boost::filesystem::path a, boost::filesystem::path b);
+
+private:
+ std::list<int> extract_numbers (boost::filesystem::path p);
+};