Fix slightly odd #includes of image_filename_sorter.cc
authorCarl Hetherington <cth@carlh.net>
Thu, 7 Jan 2016 15:20:59 +0000 (15:20 +0000)
committerCarl Hetherington <cth@carlh.net>
Thu, 7 Jan 2016 15:20:59 +0000 (15:20 +0000)
src/lib/image_content.cc
src/lib/image_filename_sorter.cc
src/lib/image_filename_sorter.h [new file with mode: 0644]
test/image_filename_sorter_test.cc

index dc1efa965744ca7fcbe238fcce2183e51cda57e0..c415f933dd637c696a57ce07ef23863e233d65c0 100644 (file)
@@ -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;
index 143daed7187d2c720b306de800f6250875e1d164..112077f55fa3d0b43f908e60d7a21452dc2cb4e5 100644 (file)
@@ -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
 
 */
 
-#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 (file)
index 0000000..6784310
--- /dev/null
@@ -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);
+};
index a4762a8c6943713f85c4e6c908beaa07b2066e84..5f5e937192146343ee2fa67478e4dfdf74307581 100644 (file)
 
 */
 
+#include "lib/image_filename_sorter.h"
 #include <boost/test/unit_test.hpp>
 
-#include "lib/image_filename_sorter.cc"
-
 BOOST_AUTO_TEST_CASE (image_filename_sorter_test)
 {
        ImageFilenameSorter x;