Skip to content

Commit d0e3d20

Browse files
authored
chore(IWYU):Remove redundant includes (#4758)
1 parent 432fda7 commit d0e3d20

4 files changed

Lines changed: 5 additions & 8 deletions

File tree

include/fmt/format-inl.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ extern "C" void __tsan_release(void*);
1818

1919
# include <algorithm>
2020
# include <cerrno> // errno
21-
# include <climits>
22-
# include <cmath>
23-
# include <exception>
24-
# include <new> // std::bad_alloc
21+
# include <new> // std::bad_alloc
2522
#endif
2623

2724
#if defined(_WIN32) && !defined(FMT_USE_WRITE_CONSOLE)

src/os.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "fmt/os.h"
1414

1515
#ifndef FMT_MODULE
16-
# include <climits>
1716

1817
# if FMT_USE_FCNTL
1918
# include <sys/stat.h>
@@ -35,6 +34,8 @@
3534

3635
# ifdef _WIN32
3736
# include <windows.h>
37+
38+
# include <climits> // CHAR_BIT
3839
# endif
3940
#endif
4041

test/format-impl-test.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
#include "fmt/format.h"
1515
#include "gmock/gmock.h"
16-
#include "util.h"
1716

1817
using fmt::detail::bigint;
1918
using fmt::detail::fp;

test/posix-mock-test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@
1515
#include <errno.h>
1616
#include <fcntl.h>
1717

18-
#include <climits>
1918
#include <memory>
2019

2120
#include "../src/os.cc"
2221

2322
#ifdef _WIN32
2423
# include <io.h>
24+
25+
# include <climits> // UINT_MAX
2526
# undef max
2627
#endif
2728

2829
#include "gmock/gmock.h"
2930
#include "gtest-extra.h"
30-
#include "util.h"
3131

3232
using fmt::buffered_file;
3333

0 commit comments

Comments
 (0)