Skip to content

Commit

Permalink
[pal] Clean up header includes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 29, 2015
1 parent e0b9f53 commit dcc25fe
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 51 deletions.
6 changes: 2 additions & 4 deletions src/core/pal/costcalculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@
#include <cstring>
#include <cfloat>

#include <pal/layer.h>
#include <pal/pal.h>

#include "layer.h"
#include "pal.h"
#include "feature.h"
#include "geomfunction.h"
#include "labelposition.h"
#include "util.h"

#include "costcalculator.h"

namespace pal
Expand Down
5 changes: 2 additions & 3 deletions src/core/pal/feature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@
#include <cstring>
#include <cfloat>

#include <pal/pal.h>
#include <pal/layer.h>

#include "pal.h"
#include "layer.h"
#include "linkedlist.hpp"
#include "feature.h"
#include "geomfunction.h"
Expand Down
3 changes: 1 addition & 2 deletions src/core/pal/feature.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@

#include <geos_c.h>

#include <pal/palgeometry.h>

#include "palgeometry.h"
#include "pointset.h"
#include "util.h"
#include "labelposition.h"
Expand Down
3 changes: 0 additions & 3 deletions src/core/pal/geomfunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
*/

#include "geomfunction.h"

//#include <pal/Layer.h>

#include "feature.h"
#include "util.h"

Expand Down
5 changes: 2 additions & 3 deletions src/core/pal/labelposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@
#include <cstring>
#include <cfloat>

#include <pal/layer.h>
#include <pal/pal.h>

#include "layer.h"
#include "pal.h"
#include "costcalculator.h"
#include "feature.h"
#include "geomfunction.h"
Expand Down
10 changes: 4 additions & 6 deletions src/core/pal/layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@
#include <cmath>
#include <vector>

#include <pal/pal.h>
#include <pal/layer.h>
#include <pal/palexception.h>
#include <pal/internalexception.h>

#include "pal.h"
#include "layer.h"
#include "palexception.h"
#include "internalexception.h"
#include "linkedlist.hpp"
#include "hashtable.hpp"

#include "feature.h"
#include "geomfunction.h"
#include "util.h"
Expand Down
4 changes: 2 additions & 2 deletions src/core/pal/layer.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

#include <fstream>

#include <pal/pal.h>
#include <pal/palgeometry.h>
#include "pal.h"
#include "palgeometry.h"
#include <QMutex>

namespace pal
Expand Down
10 changes: 4 additions & 6 deletions src/core/pal/pal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,12 @@
//#include <geos/geom/Geometry.h>
#include <geos_c.h>

#include <pal/pal.h>
#include <pal/layer.h>
#include <pal/palexception.h>
#include <pal/palstat.h>

#include "pal.h"
#include "layer.h"
#include "palexception.h"
#include "palstat.h"
#include "linkedlist.hpp"
#include "rtree.hpp"

#include "costcalculator.h"
#include "feature.h"
#include "geomfunction.h"
Expand Down
2 changes: 1 addition & 1 deletion src/core/pal/palstat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/

#include <iostream>
#include <pal/palstat.h>
#include "palstat.h"

namespace pal
{
Expand Down
5 changes: 1 addition & 4 deletions src/core/pal/pointset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@

#include "pointset.h"
#include "util.h"

#include <pal/pal.h>


#include "pal.h"
#include "geomfunction.h"

namespace pal
Expand Down
7 changes: 3 additions & 4 deletions src/core/pal/problem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@
#include <list>
#include <limits.h> //for INT_MAX

#include <pal/pal.h>
#include <pal/palstat.h>
#include <pal/layer.h>

#include "pal.h"
#include "palstat.h"
#include "layer.h"
#include "linkedlist.hpp"
#include "rtree.hpp"
#include "feature.h"
Expand Down
2 changes: 1 addition & 1 deletion src/core/pal/problem.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#define _PROBLEM_H

#include <list>
#include <pal/pal.h>
#include "pal.h"
#include "rtree.hpp"

namespace pal
Expand Down
11 changes: 3 additions & 8 deletions src/core/pal/rtree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,9 @@
#include <cmath>
#include <cassert>
#include <cstdlib>
#include <QtGlobal>

#define ASSERT assert // RTree uses ASSERT( condition )
#ifndef Min
#define Min(a,b) (a<b?a:b)
#endif //Min
#ifndef Max
#define Max(a,b) (a>b?a:b)
#endif //Max

//
// RTree.h
Expand Down Expand Up @@ -1084,8 +1079,8 @@ namespace pal

for ( int index = 0; index < NUMDIMS; ++index )
{
newRect.m_min[index] = Min( a_rectA->m_min[index], a_rectB->m_min[index] );
newRect.m_max[index] = Max( a_rectA->m_max[index], a_rectB->m_max[index] );
newRect.m_min[index] = qMin( a_rectA->m_min[index], a_rectB->m_min[index] );
newRect.m_max[index] = qMax( a_rectA->m_max[index], a_rectB->m_max[index] );
}

return newRect;
Expand Down
3 changes: 1 addition & 2 deletions src/core/pal/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
#include <cstdarg>
#include <ctime>

#include <pal/layer.h>

#include "layer.h"
#include "internalexception.h"
#include "util.h"
#include "labelposition.h"
Expand Down
3 changes: 1 addition & 2 deletions src/core/pal/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
#include <stddef.h>
#include <geos_c.h>

#include <pal/pal.h>

#include "pal.h"
#include "rtree.hpp"
#include "pointset.h"

Expand Down

0 comments on commit dcc25fe

Please sign in to comment.