From: Simon Marchi Date: Mon, 12 Feb 2024 19:29:15 +0000 (-0500) Subject: cpp-common: remove unused include X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=7c9d996f00a4172ab5ce40ae7f1d8506a469c03a cpp-common: remove unused include Remove some unused (according to clangd) includes. Add one IWYU pragma to tell it to keep `fmt/format.h`, which is needed to make the `format_as` function defined in that file work. Change-Id: I9c4d716975e46bbfad0372aa7ede5f449868848f Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/11782 Reviewed-by: Philippe Proulx Tested-by: jenkins --- diff --git a/src/cpp-common/bt2/clock-class.hpp b/src/cpp-common/bt2/clock-class.hpp index 9e66cbf4..f8fc17e0 100644 --- a/src/cpp-common/bt2/clock-class.hpp +++ b/src/cpp-common/bt2/clock-class.hpp @@ -8,7 +8,6 @@ #define BABELTRACE_CPP_COMMON_BT2_CLOCK_CLASS_HPP #include -#include #include #include diff --git a/src/cpp-common/bt2/component-port.hpp b/src/cpp-common/bt2/component-port.hpp index 110c9b62..c533da0e 100644 --- a/src/cpp-common/bt2/component-port.hpp +++ b/src/cpp-common/bt2/component-port.hpp @@ -8,7 +8,6 @@ #define BABELTRACE_CPP_COMMON_BT2_COMPONENT_PORT_HPP #include -#include #include diff --git a/src/cpp-common/bt2/raw-value-proxy.hpp b/src/cpp-common/bt2/raw-value-proxy.hpp index 0c2543bd..89f1a6a7 100644 --- a/src/cpp-common/bt2/raw-value-proxy.hpp +++ b/src/cpp-common/bt2/raw-value-proxy.hpp @@ -7,10 +7,6 @@ #ifndef BABELTRACE_CPP_COMMON_BT2_RAW_VALUE_PROXY_HPP #define BABELTRACE_CPP_COMMON_BT2_RAW_VALUE_PROXY_HPP -#include - -#include "cpp-common/bt2c/c-string-view.hpp" - namespace bt2 { template diff --git a/src/cpp-common/bt2/self-component-port.hpp b/src/cpp-common/bt2/self-component-port.hpp index 0f5a2ec8..e41dd09c 100644 --- a/src/cpp-common/bt2/self-component-port.hpp +++ b/src/cpp-common/bt2/self-component-port.hpp @@ -8,7 +8,6 @@ #define BABELTRACE_CPP_COMMON_BT2_SELF_COMPONENT_PORT_HPP #include -#include #include diff --git a/src/cpp-common/bt2c/c-string-view.hpp b/src/cpp-common/bt2c/c-string-view.hpp index 54c87de9..939c8a16 100644 --- a/src/cpp-common/bt2c/c-string-view.hpp +++ b/src/cpp-common/bt2c/c-string-view.hpp @@ -13,7 +13,7 @@ #include "common/assert.h" #include "cpp-common/bt2s/string-view.hpp" -#include "cpp-common/vendor/fmt/format.h" +#include "cpp-common/vendor/fmt/format.h" /* IWYU pragma: keep */ #include "type-traits.hpp"