From 116ad04a1f2b72021034c5fe5b44d5488b9e7bf0 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 4 Aug 2016 17:42:41 +1000 Subject: [PATCH] build: use ostream/istream over iostream --- bezier.hpp | 2 +- colour.hpp | 2 +- fixed.hpp | 2 +- geom/aabb.cpp | 2 ++ geom/aabb.hpp | 3 --- geom/iostream.hpp | 10 +++++++++- geom/ray.cpp | 6 ++++-- geom/ray.hpp | 5 +---- json/flat.cpp.rl | 1 + json/flat.hpp | 2 +- json/tree.hpp | 2 +- log.cpp | 6 +++--- log.hpp | 2 +- net/address.hpp | 2 +- range.hpp | 2 +- stats.hpp | 2 +- stream.hpp | 2 +- tools/json-schema.cpp | 5 +++++ version.hpp | 2 +- 19 files changed, 36 insertions(+), 24 deletions(-) diff --git a/bezier.hpp b/bezier.hpp index bafd612c..2253b04e 100644 --- a/bezier.hpp +++ b/bezier.hpp @@ -20,7 +20,7 @@ #include "point.hpp" #include "region.hpp" -#include +#include namespace util { template diff --git a/colour.hpp b/colour.hpp index d0df406e..5cda6a1a 100644 --- a/colour.hpp +++ b/colour.hpp @@ -19,7 +19,7 @@ #include "coord.hpp" -#include +#include namespace util { /// An RGBA colour POD type. diff --git a/fixed.hpp b/fixed.hpp index 9ce3b9c2..5992a43a 100644 --- a/fixed.hpp +++ b/fixed.hpp @@ -20,7 +20,7 @@ #include "types/bits.hpp" #include -#include +#include namespace util { template diff --git a/geom/aabb.cpp b/geom/aabb.cpp index 5145394f..4a1071d2 100644 --- a/geom/aabb.cpp +++ b/geom/aabb.cpp @@ -16,6 +16,8 @@ #include "./aabb.hpp" + +#include "./iostream.hpp" #include "../debug.hpp" using util::geom::AABB; diff --git a/geom/aabb.hpp b/geom/aabb.hpp index 83eb3c4c..bed5e572 100644 --- a/geom/aabb.hpp +++ b/geom/aabb.hpp @@ -65,9 +65,6 @@ namespace util { namespace geom { typedef AABB<3,float> AABB3f; typedef AABB<3,size_t> AABB3u; typedef AABB<3,intmax_t> AABB3i; - - template - std::ostream& operator<< (std::ostream&, AABB); } } #include "aabb.ipp" diff --git a/geom/iostream.hpp b/geom/iostream.hpp index cf533099..c088af94 100644 --- a/geom/iostream.hpp +++ b/geom/iostream.hpp @@ -19,9 +19,17 @@ #include "./fwd.hpp" -#include +#include namespace util { namespace geom { + template + std::ostream& + operator<< (std::ostream&, AABB); + + template + std::ostream& + operator<< (std::ostream&, ray); + template std::ostream& operator<< (std::ostream&, sphere); diff --git a/geom/ray.cpp b/geom/ray.cpp index 5fdf6ae8..84982aab 100644 --- a/geom/ray.cpp +++ b/geom/ray.cpp @@ -14,9 +14,11 @@ * Copyright 2015 Danny Robson */ -#include "ray.hpp" +#include "./ray.hpp" + +#include "./iostream.hpp" +#include "./ops.hpp" -#include "ops.hpp" #include "../debug.hpp" using util::geom::ray; diff --git a/geom/ray.hpp b/geom/ray.hpp index ab00b605..264b1baf 100644 --- a/geom/ray.hpp +++ b/geom/ray.hpp @@ -23,7 +23,7 @@ #include "../vector.hpp" #include "../point.hpp" -#include +#include namespace util { namespace geom { template @@ -50,9 +50,6 @@ namespace util { namespace geom { vector direction; }; - template - std::ostream& operator<< (std::ostream&, ray); - typedef ray<2,float> ray2f; typedef ray<3,float> ray3f; } } diff --git a/json/flat.cpp.rl b/json/flat.cpp.rl index 8394813e..6b78f31a 100644 --- a/json/flat.cpp.rl +++ b/json/flat.cpp.rl @@ -25,6 +25,7 @@ #include "preprocessor.hpp" #include +#include //----------------------------------------------------------------------------- %%{ diff --git a/json/flat.hpp b/json/flat.hpp index b8a58224..5e0bb54a 100644 --- a/json/flat.hpp +++ b/json/flat.hpp @@ -18,7 +18,7 @@ #define __UTIL_JSON_FLAT_HPP #include -#include +#include #include "../view.hpp" diff --git a/json/tree.hpp b/json/tree.hpp index 2170ff0b..e4a99ac7 100644 --- a/json/tree.hpp +++ b/json/tree.hpp @@ -23,7 +23,7 @@ #include "../iterator.hpp" #include "../view.hpp" -#include +#include #include #include #include diff --git a/log.cpp b/log.cpp index 3dc9f6a8..dbd82ae6 100644 --- a/log.cpp +++ b/log.cpp @@ -24,12 +24,12 @@ #include "cast.hpp" #include -#include #include +#include +#include +#include #include #include -#include - /////////////////////////////////////////////////////////////////////////////// static diff --git a/log.hpp b/log.hpp index dd2e588c..7b2e1e4a 100644 --- a/log.hpp +++ b/log.hpp @@ -20,7 +20,7 @@ #include "./nocopy.hpp" #include "./preprocessor.hpp" -#include +#include #include // Windows.h or one of its friends defines a macro 'ERROR'. Screw Microsoft. diff --git a/net/address.hpp b/net/address.hpp index 538ac185..544d9200 100644 --- a/net/address.hpp +++ b/net/address.hpp @@ -24,7 +24,7 @@ #include "ws2tcpip.h" #endif -#include +#include #include diff --git a/range.hpp b/range.hpp index 9b868fc6..d7379884 100644 --- a/range.hpp +++ b/range.hpp @@ -19,7 +19,7 @@ #define __UTIL_RANGE_HPP #include -#include +#include namespace util { /** diff --git a/stats.hpp b/stats.hpp index d9dc8486..9f08f7ab 100644 --- a/stats.hpp +++ b/stats.hpp @@ -17,7 +17,7 @@ #ifndef __UTIL_STATS_HPP #define __UTIL_STATS_HPP -#include +#include namespace util { diff --git a/stream.hpp b/stream.hpp index 3f8ccfbf..4de72a5d 100644 --- a/stream.hpp +++ b/stream.hpp @@ -17,7 +17,7 @@ #ifndef __UTIL_STREAM_HPP #define __UTIL_STREAM_HPP -#include +#include namespace util { namespace stream { diff --git a/tools/json-schema.cpp b/tools/json-schema.cpp index 0fce2853..ebea7d90 100644 --- a/tools/json-schema.cpp +++ b/tools/json-schema.cpp @@ -23,9 +23,13 @@ #include "io.hpp" #include +#include + namespace fs = boost::filesystem; + +/////////////////////////////////////////////////////////////////////////////// enum { ARG_CMD, ARG_SCHEMA, @@ -35,6 +39,7 @@ enum { }; +/////////////////////////////////////////////////////////////////////////////// int main (int argc, char **argv) { if (argc != NUM_ARGS) { diff --git a/version.hpp b/version.hpp index c42749e7..e3097c9c 100644 --- a/version.hpp +++ b/version.hpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include namespace util {