Include-what-you-use rtc_base/numerics/

Bug: webrtc:42226242
Change-Id: Ib59078d67af20fa44d79d1a9338b1a3ca6e4c6d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354463
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42492}
This commit is contained in:
Björn Terelius 2024-06-12 10:07:50 +02:00 committed by WebRTC LUCI CQ
parent 08b649b6b7
commit 72302cc5e4
23 changed files with 43 additions and 4 deletions

View File

@ -818,6 +818,7 @@ rtc_library("rtc_stats_counters") {
"numerics/sample_stats.h", "numerics/sample_stats.h",
] ]
deps = [ deps = [
":checks",
"../api/numerics", "../api/numerics",
"../api/units:data_rate", "../api/units:data_rate",
"../api/units:time_delta", "../api/units:time_delta",
@ -2078,11 +2079,13 @@ if (rtc_include_tests) {
"numerics/sequence_number_util_unittest.cc", "numerics/sequence_number_util_unittest.cc",
] ]
deps = [ deps = [
":mod_ops",
":rtc_numerics", ":rtc_numerics",
":timeutils", ":timeutils",
"../test:test_main", "../test:test_main",
"../test:test_support", "../test:test_support",
"//third_party/abseil-cpp/absl/algorithm:container", "//third_party/abseil-cpp/absl/algorithm:container",
"//third_party/abseil-cpp/absl/types:optional",
] ]
} }

View File

@ -10,7 +10,9 @@
#include "rtc_base/numerics/divide_round.h" #include "rtc_base/numerics/divide_round.h"
#include <cstdint>
#include <limits> #include <limits>
#include <type_traits>
#include "test/gtest.h" #include "test/gtest.h"

View File

@ -11,6 +11,8 @@
#include "rtc_base/numerics/event_based_exponential_moving_average.h" #include "rtc_base/numerics/event_based_exponential_moving_average.h"
#include <cmath> #include <cmath>
#include <cstdint>
#include <limits>
#include "rtc_base/checks.h" #include "rtc_base/checks.h"

View File

@ -11,6 +11,8 @@
#include "rtc_base/numerics/event_based_exponential_moving_average.h" #include "rtc_base/numerics/event_based_exponential_moving_average.h"
#include <cmath> #include <cmath>
#include <cstdint>
#include <limits>
#include "test/gtest.h" #include "test/gtest.h"

View File

@ -10,6 +10,10 @@
#include "rtc_base/numerics/event_rate_counter.h" #include "rtc_base/numerics/event_rate_counter.h"
#include <algorithm> #include <algorithm>
#include <cmath>
#include "api/units/time_delta.h"
#include "api/units/timestamp.h"
namespace webrtc { namespace webrtc {

View File

@ -10,6 +10,10 @@
#ifndef RTC_BASE_NUMERICS_EVENT_RATE_COUNTER_H_ #ifndef RTC_BASE_NUMERICS_EVENT_RATE_COUNTER_H_
#define RTC_BASE_NUMERICS_EVENT_RATE_COUNTER_H_ #define RTC_BASE_NUMERICS_EVENT_RATE_COUNTER_H_
#include <cstdint>
#include "api/units/time_delta.h"
#include "api/units/timestamp.h"
#include "rtc_base/numerics/sample_stats.h" #include "rtc_base/numerics/sample_stats.h"
namespace webrtc { namespace webrtc {

View File

@ -12,7 +12,10 @@
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
#include <cstddef>
#include <cstdint>
#include "absl/types/optional.h"
#include "rtc_base/checks.h" #include "rtc_base/checks.h"
namespace rtc { namespace rtc {

View File

@ -11,7 +11,10 @@
#include "rtc_base/numerics/moving_average.h" #include "rtc_base/numerics/moving_average.h"
#include <algorithm> #include <algorithm>
#include <cstddef>
#include <cstdint>
#include "absl/types/optional.h"
#include "rtc_base/checks.h" #include "rtc_base/checks.h"
namespace rtc { namespace rtc {

View File

@ -10,6 +10,7 @@
#include "rtc_base/numerics/moving_average.h" #include "rtc_base/numerics/moving_average.h"
#include "absl/types/optional.h"
#include "test/gtest.h" #include "test/gtest.h"
namespace test { namespace test {

View File

@ -13,6 +13,7 @@
#include <stdint.h> #include <stdint.h>
#include <algorithm> #include <algorithm>
#include <cstddef>
#include "test/gtest.h" #include "test/gtest.h"

View File

@ -13,7 +13,7 @@
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
#include <limits> #include <cstdint>
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include "rtc_base/checks.h" #include "rtc_base/checks.h"

View File

@ -35,7 +35,6 @@
#include <stdint.h> #include <stdint.h>
#include <type_traits> #include <type_traits>
#include <utility>
#include "rtc_base/type_traits.h" #include "rtc_base/type_traits.h"

View File

@ -10,7 +10,9 @@
#include "rtc_base/numerics/safe_compare.h" #include "rtc_base/numerics/safe_compare.h"
#include <cstdint>
#include <limits> #include <limits>
#include <utility>
#include "test/gtest.h" #include "test/gtest.h"

View File

@ -76,6 +76,7 @@
#ifndef RTC_BASE_NUMERICS_SAFE_MINMAX_H_ #ifndef RTC_BASE_NUMERICS_SAFE_MINMAX_H_
#define RTC_BASE_NUMERICS_SAFE_MINMAX_H_ #define RTC_BASE_NUMERICS_SAFE_MINMAX_H_
#include <cstdint>
#include <limits> #include <limits>
#include <type_traits> #include <type_traits>

View File

@ -11,7 +11,9 @@
#include "rtc_base/numerics/safe_minmax.h" #include "rtc_base/numerics/safe_minmax.h"
#include <algorithm> #include <algorithm>
#include <cstdint>
#include <limits> #include <limits>
#include <type_traits>
#include "test/gtest.h" #include "test/gtest.h"

View File

@ -10,8 +10,10 @@
#include "rtc_base/numerics/sample_counter.h" #include "rtc_base/numerics/sample_counter.h"
#include <cstdint>
#include <limits> #include <limits>
#include "absl/types/optional.h"
#include "rtc_base/checks.h" #include "rtc_base/checks.h"
#include "rtc_base/numerics/safe_conversions.h" #include "rtc_base/numerics/safe_conversions.h"

View File

@ -12,6 +12,7 @@
#include <initializer_list> #include <initializer_list>
#include "absl/types/optional.h"
#include "test/gmock.h" #include "test/gmock.h"
#include "test/gtest.h" #include "test/gtest.h"

View File

@ -9,6 +9,12 @@
*/ */
#include "rtc_base/numerics/sample_stats.h" #include "rtc_base/numerics/sample_stats.h"
#include <cmath>
#include "api/units/data_rate.h"
#include "api/units/time_delta.h"
#include "rtc_base/checks.h"
namespace webrtc { namespace webrtc {
double SampleStats<double>::Max() { double SampleStats<double>::Max() {

View File

@ -13,7 +13,6 @@
#include "api/numerics/samples_stats_counter.h" #include "api/numerics/samples_stats_counter.h"
#include "api/units/data_rate.h" #include "api/units/data_rate.h"
#include "api/units/time_delta.h" #include "api/units/time_delta.h"
#include "api/units/timestamp.h"
namespace webrtc { namespace webrtc {
template <typename T> template <typename T>

View File

@ -14,6 +14,7 @@
#include <stdint.h> #include <stdint.h>
#include <limits> #include <limits>
#include <type_traits>
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include "rtc_base/numerics/sequence_number_util.h" #include "rtc_base/numerics/sequence_number_util.h"

View File

@ -11,6 +11,7 @@
#include "rtc_base/numerics/sequence_number_unwrapper.h" #include "rtc_base/numerics/sequence_number_unwrapper.h"
#include <cstdint> #include <cstdint>
#include <limits>
#include "test/gtest.h" #include "test/gtest.h"

View File

@ -11,7 +11,6 @@
#ifndef RTC_BASE_NUMERICS_SEQUENCE_NUMBER_UTIL_H_ #ifndef RTC_BASE_NUMERICS_SEQUENCE_NUMBER_UTIL_H_
#define RTC_BASE_NUMERICS_SEQUENCE_NUMBER_UTIL_H_ #define RTC_BASE_NUMERICS_SEQUENCE_NUMBER_UTIL_H_
#include <stdint.h>
#include <limits> #include <limits>
#include <type_traits> #include <type_traits>

View File

@ -14,6 +14,7 @@
#include <iterator> #include <iterator>
#include <set> #include <set>
#include "rtc_base/numerics/mod_ops.h"
#include "test/gtest.h" #include "test/gtest.h"
namespace webrtc { namespace webrtc {