refactor: Remove unused and add missing includes (#5293)

The codebase is filled with includes that are unused, and which thus can be removed. At the same time, the files often do not include all headers that contain the definitions used in those files. This change uses clang-format and clang-tidy to clean up the includes, with minor manual intervention to ensure the code compiles on all platforms.
This commit is contained in:
Bart
2025-03-11 14:16:45 -04:00
committed by GitHub
parent 2216e5a13f
commit 2406b28e64
767 changed files with 1465 additions and 1083 deletions

View File

@@ -9,6 +9,7 @@
#define BEAST_UNIT_TEST_MATCH_HPP
#include <xrpl/beast/unit_test/suite_info.h>
#include <string>
namespace beast {

View File

@@ -10,8 +10,10 @@
#include <xrpl/beast/unit_test/amount.h>
#include <xrpl/beast/unit_test/recorder.h>
#include <boost/lexical_cast.hpp>
#include <boost/optional.hpp>
#include <algorithm>
#include <chrono>
#include <functional>

View File

@@ -9,7 +9,9 @@
#define BEAST_UNIT_TEST_RUNNER_H_INCLUDED
#include <xrpl/beast/unit_test/suite_info.h>
#include <boost/assert.hpp>
#include <mutex>
#include <ostream>
#include <string>

View File

@@ -9,9 +9,11 @@
#define BEAST_UNIT_TEST_SUITE_HPP
#include <xrpl/beast/unit_test/runner.h>
#include <boost/filesystem.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/throw_exception.hpp>
#include <ostream>
#include <sstream>
#include <string>

View File

@@ -10,7 +10,9 @@
#include <xrpl/beast/unit_test/detail/const_container.h>
#include <xrpl/beast/unit_test/suite_info.h>
#include <boost/assert.hpp>
#include <set>
#include <typeindex>
#include <unordered_set>

View File

@@ -9,6 +9,7 @@
#define BEAST_UNIT_TEST_THREAD_HPP
#include <xrpl/beast/unit_test/suite.h>
#include <functional>
#include <thread>
#include <utility>