From 62d5e7ca92b389d3dc3390045b503f5bac2881f4 Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Tue, 11 Aug 2015 16:28:46 +1000 Subject: [PATCH] AP_Terrain: standardize inclusion of libaries headers This commit changes the way libraries headers are included in source files: - If the header is in the same directory the source belongs to, so the notation '#include ""' is used with the path relative to the directory containing the source. - If the header is outside the directory containing the source, then we use the notation '#include <>' with the path relative to libraries folder. Some of the advantages of such approach: - Only one search path for libraries headers. - OSs like Windows may have a better lookup time. --- libraries/AP_Terrain/AP_Terrain.cpp | 12 ++++++------ libraries/AP_Terrain/AP_Terrain.h | 14 +++++++------- libraries/AP_Terrain/TerrainGCS.cpp | 10 +++++----- libraries/AP_Terrain/TerrainIO.cpp | 10 +++++----- libraries/AP_Terrain/TerrainMission.cpp | 10 +++++----- libraries/AP_Terrain/TerrainUtil.cpp | 10 +++++----- 6 files changed, 33 insertions(+), 33 deletions(-) diff --git a/libraries/AP_Terrain/AP_Terrain.cpp b/libraries/AP_Terrain/AP_Terrain.cpp index 229469fb21..7159bda9ca 100644 --- a/libraries/AP_Terrain/AP_Terrain.cpp +++ b/libraries/AP_Terrain/AP_Terrain.cpp @@ -14,12 +14,12 @@ along with this program. If not, see . */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "AP_Terrain.h" #if AP_TERRAIN_AVAILABLE diff --git a/libraries/AP_Terrain/AP_Terrain.h b/libraries/AP_Terrain/AP_Terrain.h index cd51014dc6..91e5a48f0a 100644 --- a/libraries/AP_Terrain/AP_Terrain.h +++ b/libraries/AP_Terrain/AP_Terrain.h @@ -17,9 +17,9 @@ #ifndef __AP_TERRAIN_H__ #define __AP_TERRAIN_H__ -#include -#include -#include +#include +#include +#include #if HAL_OS_POSIX_IO && defined(HAL_BOARD_TERRAIN_DIRECTORY) #define AP_TERRAIN_AVAILABLE 1 @@ -29,10 +29,10 @@ #if AP_TERRAIN_AVAILABLE -#include -#include -#include -#include +#include +#include +#include +#include #define TERRAIN_DEBUG 0 diff --git a/libraries/AP_Terrain/TerrainGCS.cpp b/libraries/AP_Terrain/TerrainGCS.cpp index 73e32f7cab..c3361d5c8d 100644 --- a/libraries/AP_Terrain/TerrainGCS.cpp +++ b/libraries/AP_Terrain/TerrainGCS.cpp @@ -17,11 +17,11 @@ handle vehicle <-> GCS communications for terrain library */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "AP_Terrain.h" #if AP_TERRAIN_AVAILABLE diff --git a/libraries/AP_Terrain/TerrainIO.cpp b/libraries/AP_Terrain/TerrainIO.cpp index 7beee1a5c5..5b98f36606 100644 --- a/libraries/AP_Terrain/TerrainIO.cpp +++ b/libraries/AP_Terrain/TerrainIO.cpp @@ -17,11 +17,11 @@ handle disk IO for terrain code */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "AP_Terrain.h" #if AP_TERRAIN_AVAILABLE diff --git a/libraries/AP_Terrain/TerrainMission.cpp b/libraries/AP_Terrain/TerrainMission.cpp index fbb7350c30..006a7f2480 100644 --- a/libraries/AP_Terrain/TerrainMission.cpp +++ b/libraries/AP_Terrain/TerrainMission.cpp @@ -17,11 +17,11 @@ handle checking mission points for terrain data */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "AP_Terrain.h" #if AP_TERRAIN_AVAILABLE diff --git a/libraries/AP_Terrain/TerrainUtil.cpp b/libraries/AP_Terrain/TerrainUtil.cpp index 7e716af50d..96d94751c1 100644 --- a/libraries/AP_Terrain/TerrainUtil.cpp +++ b/libraries/AP_Terrain/TerrainUtil.cpp @@ -17,11 +17,11 @@ handle disk IO for terrain code */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "AP_Terrain.h" #if AP_TERRAIN_AVAILABLE