From d32c41b7c8132abce060ab429787b4e2f6adc850 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Tue, 30 Aug 2022 16:15:50 -0700 Subject: [PATCH] Clean up library.hh headers (#479) * Clean up library.hh headers Signed-off-by: Louise Poubel * sort Signed-off-by: Louise Poubel * fix pragmas Signed-off-by: Louise Poubel Signed-off-by: Louise Poubel --- include/gz/gui/Conversions.hh | 7 +----- include/gz/gui/PlottingInterface.hh | 3 ++- src/PlottingInterface_TEST.cc | 18 +++++++------- src/plugins/camera_tracking/CameraTracking.cc | 16 +++---------- src/plugins/grid_config/GridConfig.cc | 4 +++- src/plugins/grid_config/GridConfig.hh | 1 - src/plugins/image_display/ImageDisplay.cc | 3 +++ src/plugins/image_display/ImageDisplay.hh | 6 ----- .../InteractiveViewControl.cc | 3 +++ src/plugins/key_publisher/KeyPublisher.cc | 6 ----- src/plugins/marker_manager/MarkerManager.cc | 14 +++++------ src/plugins/minimal_scene/MinimalScene.cc | 11 --------- src/plugins/navsat_map/NavSatMap.hh | 7 +----- src/plugins/point_cloud/PointCloud.hh | 6 ----- src/plugins/publisher/Publisher.cc | 8 +------ src/plugins/publisher/Publisher_TEST.cc | 7 +----- src/plugins/screenshot/Screenshot.cc | 8 ------- src/plugins/screenshot/Screenshot.hh | 6 ----- src/plugins/screenshot/Screenshot_TEST.cc | 8 +------ .../shutdown_button/ShutdownButton_TEST.cc | 3 +++ src/plugins/teleop/Teleop.cc | 10 ++------ src/plugins/teleop/Teleop_TEST.cc | 8 ++----- src/plugins/topic_echo/TopicEcho.hh | 3 ++- src/plugins/topic_echo/TopicEcho_TEST.cc | 6 ----- src/plugins/topic_viewer/TopicViewer.cc | 6 ++--- src/plugins/topic_viewer/TopicViewer_TEST.cc | 3 +++ .../TransportSceneManager.cc | 24 +++++++++---------- src/plugins/world_control/WorldControl.cc | 5 ++++ src/plugins/world_control/WorldControl.hh | 9 +------ .../world_control/WorldControl_TEST.cc | 3 +++ src/plugins/world_stats/WorldStats.cc | 4 ++++ src/plugins/world_stats/WorldStats.hh | 9 +------ test/integration/camera_tracking.cc | 14 +++++------ test/integration/marker_manager.cc | 17 +++++++------ test/integration/transport_scene_manager.cc | 1 + 35 files changed, 89 insertions(+), 178 deletions(-) diff --git a/include/gz/gui/Conversions.hh b/include/gz/gui/Conversions.hh index 399b9c81b..ae2740486 100644 --- a/include/gz/gui/Conversions.hh +++ b/include/gz/gui/Conversions.hh @@ -18,13 +18,8 @@ #ifndef GZ_GUI_CONVERSIONS_HH_ #define GZ_GUI_CONVERSIONS_HH_ -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif #include -#ifdef _MSC_VER -#pragma warning(pop) -#endif + #include #include #include diff --git a/include/gz/gui/PlottingInterface.hh b/include/gz/gui/PlottingInterface.hh index d00b9d67f..6d7976b8d 100644 --- a/include/gz/gui/PlottingInterface.hh +++ b/include/gz/gui/PlottingInterface.hh @@ -22,7 +22,8 @@ #include #include #ifdef _MSC_VER -#pragma warning(push, 0) +#pragma warning(push) +#pragma warning(disable: 4251) #endif #include #include diff --git a/src/PlottingInterface_TEST.cc b/src/PlottingInterface_TEST.cc index eddf414cd..b8ad73ea5 100644 --- a/src/PlottingInterface_TEST.cc +++ b/src/PlottingInterface_TEST.cc @@ -16,17 +16,17 @@ */ #include -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - -#include +#include +#include +#include +#include +#include +#include + #include +#include #include + #include "test_config.hh" // NOLINT(build/include) #include "gz/gui/Enums.hh" #include "gz/gui/PlottingInterface.hh" diff --git a/src/plugins/camera_tracking/CameraTracking.cc b/src/plugins/camera_tracking/CameraTracking.cc index e4ebe0da4..17931b93d 100644 --- a/src/plugins/camera_tracking/CameraTracking.cc +++ b/src/plugins/camera_tracking/CameraTracking.cc @@ -18,27 +18,17 @@ #include #include +#include + #include #include -#include - -// TODO(anyone) Remove these pragmas once gz-rendering and gz-msgs -// are disabling the warnings -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif -#include #include - +#include #include #include #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - #include "gz/gui/Application.hh" #include "gz/gui/Conversions.hh" #include "gz/gui/GuiEvents.hh" diff --git a/src/plugins/grid_config/GridConfig.cc b/src/plugins/grid_config/GridConfig.cc index a48ab67cc..acaa75cd0 100644 --- a/src/plugins/grid_config/GridConfig.cc +++ b/src/plugins/grid_config/GridConfig.cc @@ -26,7 +26,9 @@ #include #include #include -#include +#include +#include +#include #include "GridConfig.hh" diff --git a/src/plugins/grid_config/GridConfig.hh b/src/plugins/grid_config/GridConfig.hh index dbc24c86a..aa951f1c9 100644 --- a/src/plugins/grid_config/GridConfig.hh +++ b/src/plugins/grid_config/GridConfig.hh @@ -21,7 +21,6 @@ #include #include -#include namespace gz { diff --git a/src/plugins/image_display/ImageDisplay.cc b/src/plugins/image_display/ImageDisplay.cc index 95491f133..e1de14070 100644 --- a/src/plugins/image_display/ImageDisplay.cc +++ b/src/plugins/image_display/ImageDisplay.cc @@ -15,6 +15,8 @@ * */ +#include + #include "ImageDisplay.hh" #include @@ -27,6 +29,7 @@ #include #include +#include #include #include diff --git a/src/plugins/image_display/ImageDisplay.hh b/src/plugins/image_display/ImageDisplay.hh index 30e4f8fda..b5185b7cf 100644 --- a/src/plugins/image_display/ImageDisplay.hh +++ b/src/plugins/image_display/ImageDisplay.hh @@ -19,13 +19,7 @@ #define GZ_GUI_PLUGINS_IMAGEDISPLAY_HH_ #include -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif #include -#ifdef _MSC_VER -#pragma warning(pop) -#endif #include "gz/gui/Plugin.hh" diff --git a/src/plugins/interactive_view_control/InteractiveViewControl.cc b/src/plugins/interactive_view_control/InteractiveViewControl.cc index 2f1de67cd..cb3c2c5fd 100644 --- a/src/plugins/interactive_view_control/InteractiveViewControl.cc +++ b/src/plugins/interactive_view_control/InteractiveViewControl.cc @@ -15,6 +15,9 @@ * */ +#include +#include + #include #include diff --git a/src/plugins/key_publisher/KeyPublisher.cc b/src/plugins/key_publisher/KeyPublisher.cc index 3694941fe..16e3d03ed 100644 --- a/src/plugins/key_publisher/KeyPublisher.cc +++ b/src/plugins/key_publisher/KeyPublisher.cc @@ -15,13 +15,7 @@ * */ -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif #include -#ifdef _MSC_VER -#pragma warning(pop) -#endif #include diff --git a/src/plugins/marker_manager/MarkerManager.cc b/src/plugins/marker_manager/MarkerManager.cc index 8c1e19602..94e3cc854 100644 --- a/src/plugins/marker_manager/MarkerManager.cc +++ b/src/plugins/marker_manager/MarkerManager.cc @@ -22,26 +22,24 @@ #include +#include +#include +#include +#include + #include #include #include #include -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - #include #include "gz/rendering/Marker.hh" #include #include +#include #include #include "gz/gui/Application.hh" diff --git a/src/plugins/minimal_scene/MinimalScene.cc b/src/plugins/minimal_scene/MinimalScene.cc index eb426cb4c..f42d37233 100644 --- a/src/plugins/minimal_scene/MinimalScene.cc +++ b/src/plugins/minimal_scene/MinimalScene.cc @@ -32,13 +32,6 @@ #include #include #include - -// TODO(louise) Remove these pragmas once gz-rendering -// is disabling the warnings -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif - #include #include #include @@ -46,10 +39,6 @@ #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - #include "gz/gui/Application.hh" #include "gz/gui/Conversions.hh" #include "gz/gui/GuiEvents.hh" diff --git a/src/plugins/navsat_map/NavSatMap.hh b/src/plugins/navsat_map/NavSatMap.hh index a07871d54..91e924172 100644 --- a/src/plugins/navsat_map/NavSatMap.hh +++ b/src/plugins/navsat_map/NavSatMap.hh @@ -19,13 +19,8 @@ #define GZ_GUI_PLUGINS_IMAGEDISPLAY_HH_ #include -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif + #include -#ifdef _MSC_VER -#pragma warning(pop) -#endif #include "gz/gui/Plugin.hh" diff --git a/src/plugins/point_cloud/PointCloud.hh b/src/plugins/point_cloud/PointCloud.hh index 1c1865d86..0cb2f2dea 100644 --- a/src/plugins/point_cloud/PointCloud.hh +++ b/src/plugins/point_cloud/PointCloud.hh @@ -20,14 +20,8 @@ #include -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#endif #include "gz/gui/Plugin.hh" diff --git a/src/plugins/publisher/Publisher.cc b/src/plugins/publisher/Publisher.cc index 2de7ecb98..17f4939d0 100644 --- a/src/plugins/publisher/Publisher.cc +++ b/src/plugins/publisher/Publisher.cc @@ -16,14 +16,8 @@ */ #include -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif #include +#include #include #include diff --git a/src/plugins/publisher/Publisher_TEST.cc b/src/plugins/publisher/Publisher_TEST.cc index 11c1952e6..de42a1d14 100644 --- a/src/plugins/publisher/Publisher_TEST.cc +++ b/src/plugins/publisher/Publisher_TEST.cc @@ -16,13 +16,8 @@ */ #include -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif #include -#ifdef _MSC_VER -#pragma warning(pop) -#endif + #include #include diff --git a/src/plugins/screenshot/Screenshot.cc b/src/plugins/screenshot/Screenshot.cc index 76258df8f..e2e2b919c 100644 --- a/src/plugins/screenshot/Screenshot.cc +++ b/src/plugins/screenshot/Screenshot.cc @@ -22,18 +22,10 @@ #include #include #include - -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif #include #include #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - #include #include "gz/gui/Application.hh" diff --git a/src/plugins/screenshot/Screenshot.hh b/src/plugins/screenshot/Screenshot.hh index 9921b3944..a055b87c3 100644 --- a/src/plugins/screenshot/Screenshot.hh +++ b/src/plugins/screenshot/Screenshot.hh @@ -17,14 +17,8 @@ #ifndef GZ_GUI_PLUGINS_SCREENSHOT_HH_ #define GZ_GUI_PLUGINS_SCREENSHOT_HH_ -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#endif #include diff --git a/src/plugins/screenshot/Screenshot_TEST.cc b/src/plugins/screenshot/Screenshot_TEST.cc index 310b2e965..47dde2052 100644 --- a/src/plugins/screenshot/Screenshot_TEST.cc +++ b/src/plugins/screenshot/Screenshot_TEST.cc @@ -14,15 +14,9 @@ * limitations under the License. * */ -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif + #include #include -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif #include #include diff --git a/src/plugins/shutdown_button/ShutdownButton_TEST.cc b/src/plugins/shutdown_button/ShutdownButton_TEST.cc index 1eb0c7178..786ef0f80 100644 --- a/src/plugins/shutdown_button/ShutdownButton_TEST.cc +++ b/src/plugins/shutdown_button/ShutdownButton_TEST.cc @@ -17,6 +17,9 @@ #include +#include +#include + #include #include #include diff --git a/src/plugins/teleop/Teleop.cc b/src/plugins/teleop/Teleop.cc index 26ddf64ac..a41e6bce0 100644 --- a/src/plugins/teleop/Teleop.cc +++ b/src/plugins/teleop/Teleop.cc @@ -16,18 +16,12 @@ */ #include -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif +#include + #include -#ifdef _MSC_VER -#pragma warning(pop) -#endif #include "Teleop.hh" -#include - #include #include diff --git a/src/plugins/teleop/Teleop_TEST.cc b/src/plugins/teleop/Teleop_TEST.cc index 85619a9c0..d71ffebd2 100644 --- a/src/plugins/teleop/Teleop_TEST.cc +++ b/src/plugins/teleop/Teleop_TEST.cc @@ -16,13 +16,9 @@ */ #include -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif + #include -#ifdef _MSC_VER -#pragma warning(pop) -#endif +#include #include diff --git a/src/plugins/topic_echo/TopicEcho.hh b/src/plugins/topic_echo/TopicEcho.hh index ec37a2014..c711a08b4 100644 --- a/src/plugins/topic_echo/TopicEcho.hh +++ b/src/plugins/topic_echo/TopicEcho.hh @@ -19,7 +19,8 @@ #define GZ_GUI_PLUGINS_TOPICECHO_HH_ #ifdef _MSC_VER -#pragma warning(push, 0) +#pragma warning(push) +#pragma warning(disable: 4251) #endif #include #ifdef _MSC_VER diff --git a/src/plugins/topic_echo/TopicEcho_TEST.cc b/src/plugins/topic_echo/TopicEcho_TEST.cc index f1f3aea3d..d91249bdd 100644 --- a/src/plugins/topic_echo/TopicEcho_TEST.cc +++ b/src/plugins/topic_echo/TopicEcho_TEST.cc @@ -18,13 +18,7 @@ #include #include -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif #include -#ifdef _MSC_VER -#pragma warning(pop) -#endif #include #include diff --git a/src/plugins/topic_viewer/TopicViewer.cc b/src/plugins/topic_viewer/TopicViewer.cc index 23ab375d5..971abab35 100644 --- a/src/plugins/topic_viewer/TopicViewer.cc +++ b/src/plugins/topic_viewer/TopicViewer.cc @@ -24,14 +24,14 @@ #include #include +#include #include - +#include +#include #include #include #include -#include -#include #include "TopicViewer.hh" #define NAME_KEY "name" diff --git a/src/plugins/topic_viewer/TopicViewer_TEST.cc b/src/plugins/topic_viewer/TopicViewer_TEST.cc index b4b7f7a15..2a74b25ba 100644 --- a/src/plugins/topic_viewer/TopicViewer_TEST.cc +++ b/src/plugins/topic_viewer/TopicViewer_TEST.cc @@ -16,6 +16,9 @@ */ #include +#include +#include + #include #include #include diff --git a/src/plugins/transport_scene_manager/TransportSceneManager.cc b/src/plugins/transport_scene_manager/TransportSceneManager.cc index 315c3ada0..2229fda0a 100644 --- a/src/plugins/transport_scene_manager/TransportSceneManager.cc +++ b/src/plugins/transport_scene_manager/TransportSceneManager.cc @@ -24,28 +24,26 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include #include +#include #include - -// TODO(louise) Remove these pragmas once gz-rendering and gz-msgs -// are disabling the warnings -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif -#include - #include #include #include #include - -#ifdef _MSC_VER -#pragma warning(pop) -#endif - #include #include diff --git a/src/plugins/world_control/WorldControl.cc b/src/plugins/world_control/WorldControl.cc index 9e549190f..f81ce1c7e 100644 --- a/src/plugins/world_control/WorldControl.cc +++ b/src/plugins/world_control/WorldControl.cc @@ -19,9 +19,14 @@ #include +#include +#include +#include + #include #include #include +#include #include "gz/gui/Application.hh" #include "gz/gui/Helpers.hh" diff --git a/src/plugins/world_control/WorldControl.hh b/src/plugins/world_control/WorldControl.hh index 22dab4567..e93e8806b 100644 --- a/src/plugins/world_control/WorldControl.hh +++ b/src/plugins/world_control/WorldControl.hh @@ -20,14 +20,7 @@ #include -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif -#include +#include #include "gz/gui/Plugin.hh" diff --git a/src/plugins/world_control/WorldControl_TEST.cc b/src/plugins/world_control/WorldControl_TEST.cc index 708224386..202c02bae 100644 --- a/src/plugins/world_control/WorldControl_TEST.cc +++ b/src/plugins/world_control/WorldControl_TEST.cc @@ -17,6 +17,9 @@ #include +#include +#include + #include #include #include diff --git a/src/plugins/world_stats/WorldStats.cc b/src/plugins/world_stats/WorldStats.cc index cc2327434..09e89b1e3 100644 --- a/src/plugins/world_stats/WorldStats.cc +++ b/src/plugins/world_stats/WorldStats.cc @@ -19,9 +19,13 @@ #include +#include + #include #include +#include #include +#include #include "gz/gui/Helpers.hh" diff --git a/src/plugins/world_stats/WorldStats.hh b/src/plugins/world_stats/WorldStats.hh index 6eb15da81..958f855b3 100644 --- a/src/plugins/world_stats/WorldStats.hh +++ b/src/plugins/world_stats/WorldStats.hh @@ -20,14 +20,7 @@ #include -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif -#include +#include #include "gz/gui/Export.hh" #include "gz/gui/Plugin.hh" diff --git a/test/integration/camera_tracking.cc b/test/integration/camera_tracking.cc index 51489a091..e9e7af7b2 100644 --- a/test/integration/camera_tracking.cc +++ b/test/integration/camera_tracking.cc @@ -17,17 +17,15 @@ #include +#include +#include +#include +#include + #include #include -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - +#include #include #include #include diff --git a/test/integration/marker_manager.cc b/test/integration/marker_manager.cc index d7437ccf1..f6f620534 100644 --- a/test/integration/marker_manager.cc +++ b/test/integration/marker_manager.cc @@ -15,20 +15,19 @@ * */ -#ifdef _MSC_VER -#pragma warning(push, 0) -#endif -#include -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - #include #include +#include +#include +#include + #include #include +#include +#include +#include +#include #include #include diff --git a/test/integration/transport_scene_manager.cc b/test/integration/transport_scene_manager.cc index 189816105..fa35aa3b9 100644 --- a/test/integration/transport_scene_manager.cc +++ b/test/integration/transport_scene_manager.cc @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include