Fix Clang-tidy 15 warnings (#1058)

These warnings were found by running clang-tidy 15.
This commit is contained in:
Rose 2022-10-06 12:44:39 -04:00 committed by GitHub
parent 1683d87a3f
commit 849f7ceaf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -19,9 +19,9 @@
#include <gsl/pointers> // for not_null, operator<, operator<=, operator>
#include <algorithm> // for addressof
#include <cstdint> // for uint16_t
#include <memory> // for shared_ptr, make_shared, operator<, opera...
#include <sstream> // for operator<<, ostringstream, basic_ostream:...
#include <stdint.h> // for uint16_t
#include <string> // for basic_string, operator==, string, operator<<
#include <typeinfo> // for type_info

View File

@ -19,11 +19,11 @@
#include <algorithm> // for move
#include <complex>
#include <cstddef> // for std::ptrdiff_t
#include <cstdint> // for uint32_t, int32_t
#include <functional> // for reference_wrapper, _Bind_helper<>::type
#include <gsl/narrow> // for narrow, narrowing_error
#include <gsl/util> // finally, narrow_cast
#include <limits> // for numeric_limits
#include <stdint.h> // for uint32_t, int32_t
#include <type_traits> // for is_same
using namespace gsl;
@ -96,7 +96,7 @@ TEST(utils_tests, finally_function_with_bind)
{
int i = 0;
{
auto _ = finally(std::bind(&f, std::ref(i)));
auto _ = finally([&i] { return f(i); });
EXPECT_TRUE(i == 0);
}
EXPECT_TRUE(i == 1);