Skip to content

Commit 849f7ce

Browse files
authored
Fix Clang-tidy 15 warnings (#1058)
These warnings were found by running clang-tidy 15.
1 parent 1683d87 commit 849f7ce

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/notnull_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
#include <gsl/pointers> // for not_null, operator<, operator<=, operator>
2020

2121
#include <algorithm> // for addressof
22+
#include <cstdint> // for uint16_t
2223
#include <memory> // for shared_ptr, make_shared, operator<, opera...
2324
#include <sstream> // for operator<<, ostringstream, basic_ostream:...
24-
#include <stdint.h> // for uint16_t
2525
#include <string> // for basic_string, operator==, string, operator<<
2626
#include <typeinfo> // for type_info
2727

tests/utils_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
#include <algorithm> // for move
2020
#include <complex>
2121
#include <cstddef> // for std::ptrdiff_t
22+
#include <cstdint> // for uint32_t, int32_t
2223
#include <functional> // for reference_wrapper, _Bind_helper<>::type
2324
#include <gsl/narrow> // for narrow, narrowing_error
2425
#include <gsl/util> // finally, narrow_cast
2526
#include <limits> // for numeric_limits
26-
#include <stdint.h> // for uint32_t, int32_t
2727
#include <type_traits> // for is_same
2828

2929
using namespace gsl;
@@ -96,7 +96,7 @@ TEST(utils_tests, finally_function_with_bind)
9696
{
9797
int i = 0;
9898
{
99-
auto _ = finally(std::bind(&f, std::ref(i)));
99+
auto _ = finally([&i] { return f(i); });
100100
EXPECT_TRUE(i == 0);
101101
}
102102
EXPECT_TRUE(i == 1);

0 commit comments

Comments
 (0)