From 96ec9db5d64356b290545ec98f6396dc41f780a6 Mon Sep 17 00:00:00 2001 From: Simon Richter Date: Sat, 28 May 2016 12:46:29 -0400 Subject: [PATCH] Add missing C++ stdlib headers The GCC standard library headers often include other headers, which makes some code compile that forgets to include several headers. --- common/gal/graphics_abstraction_layer.cpp | 2 ++ common/grid_tricks.cpp | 2 ++ common/selcolor.cpp | 2 ++ common/tool/action_manager.cpp | 1 + eeschema/class_library.h | 2 ++ eeschema/dialogs/dialog_lib_edit_pin_table.cpp | 2 ++ eeschema/sch_sheet_path.h | 2 ++ gerbview/class_gerber_file_image.cpp | 1 + gerbview/class_gerber_file_image_list.cpp | 2 ++ include/tool/tool_event.h | 1 + include/tool/tool_manager.h | 1 + pcb_calculator/transline/transline.cpp | 1 + pcbnew/layer_widget.cpp | 3 +++ pcbnew/ratsnest_data.h | 2 ++ pcbnew/router/pns_diff_pair.cpp | 1 + pcbnew/router/pns_optimizer.cpp | 2 ++ pcbnew/router/pns_utils.cpp | 2 ++ pcbnew/tools/conditional_menu.h | 1 + pcbnew/tools/edit_points.h | 3 +++ polygon/math_for_graphics.cpp | 1 + utils/idftools/idf_common.cpp | 1 + 21 files changed, 35 insertions(+) diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index b77ad4f83e..b5847fc707 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -29,6 +29,8 @@ #include #include +#include + using namespace KIGFX; diff --git a/common/grid_tricks.cpp b/common/grid_tricks.cpp index c854411ae6..37827863e1 100644 --- a/common/grid_tricks.cpp +++ b/common/grid_tricks.cpp @@ -29,6 +29,8 @@ #include #include +#include + // It works for table data on clipboard for an Excell spreadsheet, // why not us too for now. diff --git a/common/selcolor.cpp b/common/selcolor.cpp index 0f5d229799..fb96bccd96 100644 --- a/common/selcolor.cpp +++ b/common/selcolor.cpp @@ -32,6 +32,8 @@ #include +#include + enum colors_id { ID_COLOR_BLACK = 2000 // colors_id = ID_COLOR_BLACK a ID_COLOR_BLACK + NBCOLORS-1 diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index ddc3cead0b..fcf2006efb 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include ACTION_MANAGER::ACTION_MANAGER( TOOL_MANAGER* aToolManager ) : diff --git a/eeschema/class_library.h b/eeschema/class_library.h index 37bf0ddd41..355cab0c11 100644 --- a/eeschema/class_library.h +++ b/eeschema/class_library.h @@ -37,6 +37,8 @@ #include +#include + class LINE_READER; class OUTPUTFORMATTER; diff --git a/eeschema/dialogs/dialog_lib_edit_pin_table.cpp b/eeschema/dialogs/dialog_lib_edit_pin_table.cpp index 047f737fa9..c652bd76d0 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin_table.cpp +++ b/eeschema/dialogs/dialog_lib_edit_pin_table.cpp @@ -27,6 +27,8 @@ #include #include +#include +#include /* Avoid wxWidgets bug #16906 -- http://trac.wxwidgets.org/ticket/16906 * diff --git a/eeschema/sch_sheet_path.h b/eeschema/sch_sheet_path.h index 3e9f9b99e0..a7427a5c94 100644 --- a/eeschema/sch_sheet_path.h +++ b/eeschema/sch_sheet_path.h @@ -33,6 +33,8 @@ #include +#include + /** Info about complex hierarchies handling: * A hierarchical schematic uses sheets (hierarchical sheets) included in a diff --git a/gerbview/class_gerber_file_image.cpp b/gerbview/class_gerber_file_image.cpp index 48b795037b..a196006dbc 100644 --- a/gerbview/class_gerber_file_image.cpp +++ b/gerbview/class_gerber_file_image.cpp @@ -38,6 +38,7 @@ #include #include +#include /** diff --git a/gerbview/class_gerber_file_image_list.cpp b/gerbview/class_gerber_file_image_list.cpp index df129b99b0..fb68710449 100644 --- a/gerbview/class_gerber_file_image_list.cpp +++ b/gerbview/class_gerber_file_image_list.cpp @@ -35,6 +35,8 @@ #include #include +#include + // GERBER_FILE_IMAGE_LIST is a helper class to handle a list of GERBER_FILE_IMAGE files GERBER_FILE_IMAGE_LIST::GERBER_FILE_IMAGE_LIST() diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 4def191f8a..cd64c674cd 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -27,6 +27,7 @@ #include #include +#include #include #include diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 76127ffc12..4703f635ce 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -29,6 +29,7 @@ #include #include #include +#include #include diff --git a/pcb_calculator/transline/transline.cpp b/pcb_calculator/transline/transline.cpp index 69f6ea425f..3d4c823d29 100644 --- a/pcb_calculator/transline/transline.cpp +++ b/pcb_calculator/transline/transline.cpp @@ -21,6 +21,7 @@ * */ +#include #include #include #include diff --git a/pcbnew/layer_widget.cpp b/pcbnew/layer_widget.cpp index 37bffa80bc..da861fcd83 100644 --- a/pcbnew/layer_widget.cpp +++ b/pcbnew/layer_widget.cpp @@ -40,6 +40,9 @@ #include #include +#include + + #define BUTT_SIZE_X 20 #define BUTT_SIZE_Y 18 #define BUTT_VOID 4 diff --git a/pcbnew/ratsnest_data.h b/pcbnew/ratsnest_data.h index 72e0530be3..ec996baf4f 100644 --- a/pcbnew/ratsnest_data.h +++ b/pcbnew/ratsnest_data.h @@ -39,6 +39,8 @@ #include #include +#include + class BOARD; class BOARD_ITEM; class BOARD_CONNECTED_ITEM; diff --git a/pcbnew/router/pns_diff_pair.cpp b/pcbnew/router/pns_diff_pair.cpp index 771928bbc3..9265430210 100644 --- a/pcbnew/router/pns_diff_pair.cpp +++ b/pcbnew/router/pns_diff_pair.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include diff --git a/pcbnew/router/pns_optimizer.cpp b/pcbnew/router/pns_optimizer.cpp index 57b8a0e8d0..2e3d7d51a8 100644 --- a/pcbnew/router/pns_optimizer.cpp +++ b/pcbnew/router/pns_optimizer.cpp @@ -24,6 +24,8 @@ #include #include +#include + #include "pns_line.h" #include "pns_diff_pair.h" #include "pns_node.h" diff --git a/pcbnew/router/pns_utils.cpp b/pcbnew/router/pns_utils.cpp index 31eb78d094..f7871bea27 100644 --- a/pcbnew/router/pns_utils.cpp +++ b/pcbnew/router/pns_utils.cpp @@ -25,6 +25,8 @@ #include +#include + const SHAPE_LINE_CHAIN OctagonalHull( const VECTOR2I& aP0, const VECTOR2I& aSize, int aClearance, int aChamfer ) { diff --git a/pcbnew/tools/conditional_menu.h b/pcbnew/tools/conditional_menu.h index af9ef2f1ce..70e0e147fc 100644 --- a/pcbnew/tools/conditional_menu.h +++ b/pcbnew/tools/conditional_menu.h @@ -27,6 +27,7 @@ #include "selection_conditions.h" #include +#include #include class SELECTION_TOOL; diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h index c939ecac95..ca9e373073 100644 --- a/pcbnew/tools/edit_points.h +++ b/pcbnew/tools/edit_points.h @@ -30,6 +30,9 @@ #include #include +#include +#include + #include "edit_constraints.h" /** diff --git a/polygon/math_for_graphics.cpp b/polygon/math_for_graphics.cpp index 5d1152afee..d88e43458a 100644 --- a/polygon/math_for_graphics.cpp +++ b/polygon/math_for_graphics.cpp @@ -7,6 +7,7 @@ #include #include #include // for abs function on ints +#include #include static bool InRange( double x, double xi, double xf ); diff --git a/utils/idftools/idf_common.cpp b/utils/idftools/idf_common.cpp index 8eedfa635f..45542e086b 100644 --- a/utils/idftools/idf_common.cpp +++ b/utils/idftools/idf_common.cpp @@ -24,6 +24,7 @@ */ +#include #include #include #include