From ac7b4de4ee2cabcef5fa73e35892b36cabd8ca73 Mon Sep 17 00:00:00 2001 From: Benjamin Morgan Date: Mon, 11 Dec 2023 11:22:54 +0100 Subject: [PATCH] vtd: Fix clang-tidy suggestions regarding includes --- optional/vtd/src/osi_ground_truth.cpp | 3 +-- optional/vtd/src/osi_ground_truth.hpp | 6 +++--- optional/vtd/src/osi_omni_sensor.cpp | 2 -- optional/vtd/src/osi_omni_sensor.hpp | 4 ---- optional/vtd/src/osi_transceiver.hpp | 3 --- optional/vtd/src/osi_transceiver_tcp.cpp | 1 - optional/vtd/src/osi_transceiver_tcp.hpp | 1 - optional/vtd/src/osi_utils.hpp | 2 +- optional/vtd/src/rdb_transceiver_tcp.hpp | 1 - optional/vtd/src/rdb_transceiver_tcp_test.cpp | 1 - optional/vtd/src/scp_messages.cpp | 6 ++---- optional/vtd/src/scp_messages.hpp | 6 ++---- optional/vtd/src/vtd_conf.hpp | 3 ++- optional/vtd/src/vtd_osi_test.cpp | 1 - 14 files changed, 11 insertions(+), 29 deletions(-) diff --git a/optional/vtd/src/osi_ground_truth.cpp b/optional/vtd/src/osi_ground_truth.cpp index 2eb51bdef..17eb76ddd 100644 --- a/optional/vtd/src/osi_ground_truth.cpp +++ b/optional/vtd/src/osi_ground_truth.cpp @@ -22,9 +22,8 @@ #include "osi_ground_truth.hpp" // for OsiGroundTruth -#include // for ModelError - #include // for MovingObject +#include // for ModelError namespace osii { diff --git a/optional/vtd/src/osi_ground_truth.hpp b/optional/vtd/src/osi_ground_truth.hpp index 3721f979e..f2dd0798c 100644 --- a/optional/vtd/src/osi_ground_truth.hpp +++ b/optional/vtd/src/osi_ground_truth.hpp @@ -22,13 +22,13 @@ #pragma once -#include // for Vector3d - -#include // for ModelError +#include // for Vector3d #include // for GroundTruth #include // for MovingObject +#include // for ModelError + #include "osi_utils.hpp" // for osi_require, .. namespace osii { diff --git a/optional/vtd/src/osi_omni_sensor.cpp b/optional/vtd/src/osi_omni_sensor.cpp index 61f85317e..d6281a992 100644 --- a/optional/vtd/src/osi_omni_sensor.cpp +++ b/optional/vtd/src/osi_omni_sensor.cpp @@ -23,9 +23,7 @@ #include "osi_omni_sensor.hpp" #include // for atan -#include // for max #include // for assert -#include // for map<> #include // for Isometry3d, Vector3d diff --git a/optional/vtd/src/osi_omni_sensor.hpp b/optional/vtd/src/osi_omni_sensor.hpp index 13c23b665..97a71c992 100644 --- a/optional/vtd/src/osi_omni_sensor.hpp +++ b/optional/vtd/src/osi_omni_sensor.hpp @@ -22,10 +22,7 @@ #pragma once -#include // for map<> #include // for shared_ptr<>, unique_ptr<> -#include // for string -#include // for move #include // for Isometry3d, Vector3d @@ -43,7 +40,6 @@ #include "osi_ground_truth.hpp" // for OsiGroundTruth #include "osi_transceiver.hpp" // for OsiTransceiver -#include "osi_utils.hpp" namespace osii { diff --git a/optional/vtd/src/osi_transceiver.hpp b/optional/vtd/src/osi_transceiver.hpp index 5e228d8a2..c25db53d0 100644 --- a/optional/vtd/src/osi_transceiver.hpp +++ b/optional/vtd/src/osi_transceiver.hpp @@ -22,9 +22,6 @@ #pragma once -#include // for shared_ptr<> -#include // for vector<> - #include // for Json, Error #include // for SensorData diff --git a/optional/vtd/src/osi_transceiver_tcp.cpp b/optional/vtd/src/osi_transceiver_tcp.cpp index 1d9be18d8..f6555c2f9 100644 --- a/optional/vtd/src/osi_transceiver_tcp.cpp +++ b/optional/vtd/src/osi_transceiver_tcp.cpp @@ -21,7 +21,6 @@ #include "osi_transceiver_tcp.hpp" -#include // for assert #include // for malloc, free #include // for shared_ptr<> diff --git a/optional/vtd/src/osi_transceiver_tcp.hpp b/optional/vtd/src/osi_transceiver_tcp.hpp index 4f9ee4292..29fecd29c 100644 --- a/optional/vtd/src/osi_transceiver_tcp.hpp +++ b/optional/vtd/src/osi_transceiver_tcp.hpp @@ -23,7 +23,6 @@ #pragma once #include // for shared_ptr<> -#include // for string #include // for vector<> #include // for streamsize diff --git a/optional/vtd/src/osi_utils.hpp b/optional/vtd/src/osi_utils.hpp index 78cd93932..222062d48 100644 --- a/optional/vtd/src/osi_utils.hpp +++ b/optional/vtd/src/osi_utils.hpp @@ -22,7 +22,7 @@ #pragma once -#include +#include // for string #include // for Isometry3d, Vector3d diff --git a/optional/vtd/src/rdb_transceiver_tcp.hpp b/optional/vtd/src/rdb_transceiver_tcp.hpp index 92e8e989c..d21a2ccc5 100644 --- a/optional/vtd/src/rdb_transceiver_tcp.hpp +++ b/optional/vtd/src/rdb_transceiver_tcp.hpp @@ -24,7 +24,6 @@ #pragma once #include // for shared_ptr<> -#include // for string #include // for vector<> #include // for streamsize diff --git a/optional/vtd/src/rdb_transceiver_tcp_test.cpp b/optional/vtd/src/rdb_transceiver_tcp_test.cpp index 7b8cdc1aa..2981ecaa0 100644 --- a/optional/vtd/src/rdb_transceiver_tcp_test.cpp +++ b/optional/vtd/src/rdb_transceiver_tcp_test.cpp @@ -21,7 +21,6 @@ */ #include // for cout -#include // for vector<> #include // for error_code, endpoint, io_service, ... diff --git a/optional/vtd/src/scp_messages.cpp b/optional/vtd/src/scp_messages.cpp index 4fd479b91..9a27e899d 100644 --- a/optional/vtd/src/scp_messages.cpp +++ b/optional/vtd/src/scp_messages.cpp @@ -24,8 +24,7 @@ #include "scp_messages.hpp" // NOLINT -namespace vtd { -namespace scp { +namespace vtd::scp { // clang-format off const char* Start = ""; @@ -188,5 +187,4 @@ std::string QueryScenario::to_scp() const { } // clang-format on -} // namespace scp -} // namespace vtd +} // namespace vtd::scp diff --git a/optional/vtd/src/scp_messages.hpp b/optional/vtd/src/scp_messages.hpp index 6f796b6f1..3487e7094 100644 --- a/optional/vtd/src/scp_messages.hpp +++ b/optional/vtd/src/scp_messages.hpp @@ -31,8 +31,7 @@ #include "scp_transceiver.hpp" // for ScpMessage -namespace vtd { -namespace scp { +namespace vtd::scp { extern const char* Start; extern const char* Stop; @@ -98,5 +97,4 @@ struct QueryScenario : public ScpMessage { std::string to_scp() const override; }; -} // namespace scp -} // namespace vtd +} // namespace vtd::scp diff --git a/optional/vtd/src/vtd_conf.hpp b/optional/vtd/src/vtd_conf.hpp index 4cf373b7a..342d8f455 100644 --- a/optional/vtd/src/vtd_conf.hpp +++ b/optional/vtd/src/vtd_conf.hpp @@ -28,7 +28,8 @@ #include // for Conf, Schema #include // for TcpTransceiverConfiguration, ... -#include "osi_omni_sensor.hpp" // for SensorMockLevel + +#include "osi_omni_sensor.hpp" // for SensorMockLevel // Connection / Initialization #define VTD_DEFAULT_SCP_PORT 48179 diff --git a/optional/vtd/src/vtd_osi_test.cpp b/optional/vtd/src/vtd_osi_test.cpp index 802cfb41f..e0e25798b 100644 --- a/optional/vtd/src/vtd_osi_test.cpp +++ b/optional/vtd/src/vtd_osi_test.cpp @@ -38,7 +38,6 @@ #include "osi_omni_sensor.hpp" #include "osi_sensor_component.hpp" // for transform_... -#include "osi_transceiver_tcp.hpp" struct VehicleData { uint64_t id;