From 0973ea8c5ddc0a7463eaf0e2d0e267c525acbab5 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 7 Jan 2016 15:20:59 +0000 Subject: [PATCH] Fix slightly odd #includes of image_filename_sorter.cc --- src/lib/image_content.cc | 3 +-- src/lib/image_filename_sorter.cc | 7 +++---- src/lib/image_filename_sorter.h | 29 +++++++++++++++++++++++++++++ test/image_filename_sorter_test.cc | 3 +-- 4 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 src/lib/image_filename_sorter.h 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 #include #include @@ -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 + Copyright (C) 2015-2016 Carl Hetherington 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 +#include "raw_convert.h" #include -#include #include -#include "raw_convert.h" +#include 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 + + 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 + +class ImageFilenameSorter +{ +public: + bool operator() (boost::filesystem::path a, boost::filesystem::path b); + +private: + std::list extract_numbers (boost::filesystem::path p); +}; diff --git a/test/image_filename_sorter_test.cc b/test/image_filename_sorter_test.cc index a4762a8c6..5f5e93719 100644 --- a/test/image_filename_sorter_test.cc +++ b/test/image_filename_sorter_test.cc @@ -17,10 +17,9 @@ */ +#include "lib/image_filename_sorter.h" #include -#include "lib/image_filename_sorter.cc" - BOOST_AUTO_TEST_CASE (image_filename_sorter_test) { ImageFilenameSorter x; -- 2.30.2