summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kettlewell <rjk@greenend.org.uk>2019-11-29 17:25:30 +0000
committerRichard Kettlewell <rjk@greenend.org.uk>2019-11-29 17:25:30 +0000
commitb278ed7108232920a68d13fd065d21c69d3dcfee (patch)
tree5cd46f8de04887938938b7fef4acefe468ba95ae
parentd842c19165336303cb6e158aba32b47409d14a2e (diff)
Move all boost includes above local file includes
re #64. boost uses the identifier 'D' which we use to name a debugging macro.
-rw-r--r--src/Backup.h2
-rw-r--r--src/Color.cc6
-rw-r--r--src/Conf.cc8
-rw-r--r--src/Document.cc7
-rw-r--r--src/MakeBackup.cc20
-rw-r--r--src/Report.cc10
-rw-r--r--src/Volume.h2
7 files changed, 27 insertions, 28 deletions
diff --git a/src/Backup.h b/src/Backup.h
index 2280b0c..fb16a3d 100644
--- a/src/Backup.h
+++ b/src/Backup.h
@@ -19,8 +19,8 @@
* @brief State of a backup
*/
-#include "Date.h"
#include <string>
+#include "Date.h"
class Database;
class Volume;
diff --git a/src/Color.cc b/src/Color.cc
index 5df4cb0..f1fd115 100644
--- a/src/Color.cc
+++ b/src/Color.cc
@@ -13,11 +13,11 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <config.h>
-#include "Color.h"
-#include "Utils.h"
+#include <boost/io/ios_state.hpp>
#include <cmath>
#include <iomanip>
-#include <boost/io/ios_state.hpp>
+#include "Color.h"
+#include "Utils.h"
Color Color::HSV(double h, double s, double v) {
// https://en.wikipedia.org/wiki/HSL_and_HSV#Converting_to_RGB
diff --git a/src/Conf.cc b/src/Conf.cc
index 842bcb2..ba74f58 100644
--- a/src/Conf.cc
+++ b/src/Conf.cc
@@ -13,6 +13,10 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <config.h>
+#include <cerrno>
+#include <regex>
+#include <sstream>
+#include <boost/filesystem.hpp>
#include "rsbackup.h"
#include "Conf.h"
#include "Backup.h"
@@ -29,10 +33,6 @@
#include "Device.h"
#include "Indent.h"
#include "BackupPolicy.h"
-#include <cerrno>
-#include <regex>
-#include <sstream>
-#include <boost/filesystem.hpp>
Conf::Conf() {
std::vector<std::string> args;
diff --git a/src/Document.cc b/src/Document.cc
index 869e640..3bc4f00 100644
--- a/src/Document.cc
+++ b/src/Document.cc
@@ -13,13 +13,12 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <config.h>
-#include "Document.h"
-#include "Utils.h"
-#include <cstdio>
-
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <boost/uuid/uuid_generators.hpp>
+#include <cstdio>
+#include "Document.h"
+#include "Utils.h"
// LinearContainer ------------------------------------------------------------
diff --git a/src/MakeBackup.cc b/src/MakeBackup.cc
index 0e7a461..b30bd75 100644
--- a/src/MakeBackup.cc
+++ b/src/MakeBackup.cc
@@ -13,6 +13,16 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <config.h>
+#include <algorithm>
+#include <cerrno>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <fcntl.h>
+#include <fnmatch.h>
+#include <boost/range/adaptor/reversed.hpp>
+#include <boost/filesystem.hpp>
+#include <sysexits.h>
+#include <thread>
#include "rsbackup.h"
#include "Conf.h"
#include "Device.h"
@@ -27,16 +37,6 @@
#include "Utils.h"
#include "Database.h"
#include "BulkRemove.h"
-#include <algorithm>
-#include <cerrno>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <fcntl.h>
-#include <fnmatch.h>
-#include <boost/range/adaptor/reversed.hpp>
-#include <boost/filesystem.hpp>
-#include <sysexits.h>
-#include <thread>
/** @brief rsync exit status indicating a file vanished during backup */
const int RERR_VANISHED = 24;
diff --git a/src/Report.cc b/src/Report.cc
index a90fa16..47f0a31 100644
--- a/src/Report.cc
+++ b/src/Report.cc
@@ -13,6 +13,11 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <config.h>
+#include <cmath>
+#include <cstdlib>
+#include <stdexcept>
+#include <boost/range/adaptor/reversed.hpp>
+#include <sstream>
#include "rsbackup.h"
#include "Document.h"
#include "Conf.h"
@@ -27,11 +32,6 @@
#include "Utils.h"
#include "Subprocess.h"
#include "Errors.h"
-#include <cmath>
-#include <cstdlib>
-#include <stdexcept>
-#include <boost/range/adaptor/reversed.hpp>
-#include <sstream>
// Split up a color into RGB components
void Report::unpackColor(unsigned color, int rgb[3]) {
diff --git a/src/Volume.h b/src/Volume.h
index 4f24a0c..8ce2457 100644
--- a/src/Volume.h
+++ b/src/Volume.h
@@ -19,10 +19,10 @@
* @brief Configuration and state of a volume
*/
+#include <set>
#include "ConfBase.h"
#include "Date.h"
#include "Backup.h"
-#include <set>
class Host;
class Device;