mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Fix Clang-tidy 15 warnings (#1058)
These warnings were found by running clang-tidy 15.
This commit is contained in:
parent
1683d87a3f
commit
849f7ceaf7
@ -19,9 +19,9 @@
|
|||||||
#include <gsl/pointers> // for not_null, operator<, operator<=, operator>
|
#include <gsl/pointers> // for not_null, operator<, operator<=, operator>
|
||||||
|
|
||||||
#include <algorithm> // for addressof
|
#include <algorithm> // for addressof
|
||||||
|
#include <cstdint> // for uint16_t
|
||||||
#include <memory> // for shared_ptr, make_shared, operator<, opera...
|
#include <memory> // for shared_ptr, make_shared, operator<, opera...
|
||||||
#include <sstream> // for operator<<, ostringstream, basic_ostream:...
|
#include <sstream> // for operator<<, ostringstream, basic_ostream:...
|
||||||
#include <stdint.h> // for uint16_t
|
|
||||||
#include <string> // for basic_string, operator==, string, operator<<
|
#include <string> // for basic_string, operator==, string, operator<<
|
||||||
#include <typeinfo> // for type_info
|
#include <typeinfo> // for type_info
|
||||||
|
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
#include <algorithm> // for move
|
#include <algorithm> // for move
|
||||||
#include <complex>
|
#include <complex>
|
||||||
#include <cstddef> // for std::ptrdiff_t
|
#include <cstddef> // for std::ptrdiff_t
|
||||||
|
#include <cstdint> // for uint32_t, int32_t
|
||||||
#include <functional> // for reference_wrapper, _Bind_helper<>::type
|
#include <functional> // for reference_wrapper, _Bind_helper<>::type
|
||||||
#include <gsl/narrow> // for narrow, narrowing_error
|
#include <gsl/narrow> // for narrow, narrowing_error
|
||||||
#include <gsl/util> // finally, narrow_cast
|
#include <gsl/util> // finally, narrow_cast
|
||||||
#include <limits> // for numeric_limits
|
#include <limits> // for numeric_limits
|
||||||
#include <stdint.h> // for uint32_t, int32_t
|
|
||||||
#include <type_traits> // for is_same
|
#include <type_traits> // for is_same
|
||||||
|
|
||||||
using namespace gsl;
|
using namespace gsl;
|
||||||
@ -96,7 +96,7 @@ TEST(utils_tests, finally_function_with_bind)
|
|||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
{
|
{
|
||||||
auto _ = finally(std::bind(&f, std::ref(i)));
|
auto _ = finally([&i] { return f(i); });
|
||||||
EXPECT_TRUE(i == 0);
|
EXPECT_TRUE(i == 0);
|
||||||
}
|
}
|
||||||
EXPECT_TRUE(i == 1);
|
EXPECT_TRUE(i == 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user