From e4ac5911ae1effc7a49c774c73dbb474041a0f5c Mon Sep 17 00:00:00 2001 From: Ralf Gerlich Date: Fri, 8 Aug 2008 12:31:02 +0200 Subject: [PATCH] Made sure that any #include-instruction comes before the first "using"-declaration, so that we can spot buggy header-files more easily. --- src/Airports/GenAirports/convex_hull.cxx | 6 +++--- src/Airports/GenAirports/main.cxx | 7 +++---- src/Airspace/airspace.cxx | 4 ++-- src/Lib/Polygon/chop-bin.cxx | 5 ++--- src/Lib/Polygon/polygon.cxx | 4 ++-- src/Lib/vpf/table.cxx | 6 +++--- src/Lib/vpf/value.cxx | 6 +++--- src/Lib/vpf/vpf-dump.cxx | 4 ++-- src/Lib/vpf/vpf-summary.cxx | 4 ++-- src/Lib/vpf/vpf-topology.cxx | 4 ++-- src/Prep/E00Lines/main.cxx | 12 ++++++------ src/Prep/Photo/findcorners.cxx | 4 ++-- src/Prep/TGVPF/tgvpf.cxx | 12 ++++++------ 13 files changed, 38 insertions(+), 40 deletions(-) diff --git a/src/Airports/GenAirports/convex_hull.cxx b/src/Airports/GenAirports/convex_hull.cxx index deb607fc..62df7b87 100644 --- a/src/Airports/GenAirports/convex_hull.cxx +++ b/src/Airports/GenAirports/convex_hull.cxx @@ -34,14 +34,14 @@ #include #include -using std::less; -using std::map; - #include #include "convex_hull.hxx" #include "point2d.hxx" +using std::less; +using std::map; + // stl map typedefs typedef map < double, double, less > map_container; diff --git a/src/Airports/GenAirports/main.cxx b/src/Airports/GenAirports/main.cxx index 5af953f0..189542c1 100644 --- a/src/Airports/GenAirports/main.cxx +++ b/src/Airports/GenAirports/main.cxx @@ -35,16 +35,12 @@ #include #include -using std::vector; #include #include #include #include -using std::cout; -using std::endl; - #include #include #include @@ -61,6 +57,9 @@ using std::endl; # include #endif +using std::vector; +using std::cout; +using std::endl; int nudge = 10; diff --git a/src/Airspace/airspace.cxx b/src/Airspace/airspace.cxx index 3f0e75d7..54dc7511 100644 --- a/src/Airspace/airspace.cxx +++ b/src/Airspace/airspace.cxx @@ -90,14 +90,14 @@ #include #include -using std::string; - /******************* simgear ********************************/ #include #include #include /************************************************************/ +using std::string; + // Configure the following for your particular directory structure ... const string dafift_base = "/usr/local/share/DAFIFT"; diff --git a/src/Lib/Polygon/chop-bin.cxx b/src/Lib/Polygon/chop-bin.cxx index 2c3e4d83..a82dba23 100644 --- a/src/Lib/Polygon/chop-bin.cxx +++ b/src/Lib/Polygon/chop-bin.cxx @@ -32,9 +32,6 @@ #include #include -using std::cout; -using std::endl; - #include #include #include @@ -49,6 +46,8 @@ using std::endl; #include "simple_clip.hxx" #include "chop.hxx" +using std::cout; +using std::endl; static void clip_and_write_poly( string root, long int p_index, const string &poly_type, diff --git a/src/Lib/Polygon/polygon.cxx b/src/Lib/Polygon/polygon.cxx index 4d235415..23cdb844 100644 --- a/src/Lib/Polygon/polygon.cxx +++ b/src/Lib/Polygon/polygon.cxx @@ -35,14 +35,14 @@ extern "C" { #include #include -using std::endl; - #include #include #include "polygon.hxx" #include "point2d.hxx" +using std::endl; + // Constructor TGPolygon::TGPolygon( void ) { diff --git a/src/Lib/vpf/table.cxx b/src/Lib/vpf/table.cxx index 513a742b..66dc0023 100644 --- a/src/Lib/vpf/table.cxx +++ b/src/Lib/vpf/table.cxx @@ -10,13 +10,13 @@ #include +#include "vpfbase.hxx" +#include "table.hxx" + using std::string; using std::ifstream; using std::istream; -#include "vpfbase.hxx" -#include "table.hxx" - //////////////////////////////////////////////////////////////////////// diff --git a/src/Lib/vpf/value.cxx b/src/Lib/vpf/value.cxx index 39029300..4c18e02f 100644 --- a/src/Lib/vpf/value.cxx +++ b/src/Lib/vpf/value.cxx @@ -4,12 +4,12 @@ #include #include -using std::ostream; -using std::string; - #include "vpfbase.hxx" #include "value.hxx" +using std::ostream; +using std::string; + VpfValue::VpfValue () : _raw_type('X'), _element_count(0) diff --git a/src/Lib/vpf/vpf-dump.cxx b/src/Lib/vpf/vpf-dump.cxx index c69f399e..73ddc6be 100644 --- a/src/Lib/vpf/vpf-dump.cxx +++ b/src/Lib/vpf/vpf-dump.cxx @@ -17,12 +17,12 @@ #include +#include "vpf.hxx" + using std::cout; using std::cerr; using std::endl; -#include "vpf.hxx" - /** * Get a printable name for a value type. diff --git a/src/Lib/vpf/vpf-summary.cxx b/src/Lib/vpf/vpf-summary.cxx index fc86fd90..3c2b3ba2 100644 --- a/src/Lib/vpf/vpf-summary.cxx +++ b/src/Lib/vpf/vpf-summary.cxx @@ -26,14 +26,14 @@ #include #include +#include "vpf.hxx" + using std::string; using std::cout; using std::cerr; using std::endl; -#include "vpf.hxx" - /** * Get a printable name for a value type. */ diff --git a/src/Lib/vpf/vpf-topology.cxx b/src/Lib/vpf/vpf-topology.cxx index 9798d0dd..93e6e3b5 100644 --- a/src/Lib/vpf/vpf-topology.cxx +++ b/src/Lib/vpf/vpf-topology.cxx @@ -8,14 +8,14 @@ #include +#include "vpf.hxx" + using std::cout; using std::cerr; using std::endl; using std::ostream; using std::string; -#include "vpf.hxx" - ostream & operator<< (ostream &output, const VpfRectangle &rect) diff --git a/src/Prep/E00Lines/main.cxx b/src/Prep/E00Lines/main.cxx index 90ea485d..21ab01f3 100644 --- a/src/Prep/E00Lines/main.cxx +++ b/src/Prep/E00Lines/main.cxx @@ -37,12 +37,6 @@ #include #include -using std::cerr; -using std::cout; -using std::endl; -using std::string; -using std::vector; - #include #include #include @@ -54,6 +48,12 @@ using std::vector; # include #endif +using std::cerr; +using std::cout; +using std::endl; +using std::string; +using std::vector; + //////////////////////////////////////////////////////////////////////// diff --git a/src/Prep/Photo/findcorners.cxx b/src/Prep/Photo/findcorners.cxx index 12e43b98..118b68d8 100644 --- a/src/Prep/Photo/findcorners.cxx +++ b/src/Prep/Photo/findcorners.cxx @@ -8,11 +8,11 @@ #include +#include + using std::cout; using std::endl; -#include - int main( int argc, char **argv ) { if ( argc != 11 ) { diff --git a/src/Prep/TGVPF/tgvpf.cxx b/src/Prep/TGVPF/tgvpf.cxx index 752cae68..f11a9ba1 100644 --- a/src/Prep/TGVPF/tgvpf.cxx +++ b/src/Prep/TGVPF/tgvpf.cxx @@ -38,12 +38,6 @@ #include #include -using std::cerr; -using std::cout; -using std::endl; -using std::string; -using std::vector; - #include #include #include @@ -55,6 +49,12 @@ using std::vector; # include #endif +using std::cerr; +using std::cout; +using std::endl; +using std::string; +using std::vector; + ////////////////////////////////////////////////////////////////////////