Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/GSL.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRose <83477269+AtariDreams@users.noreply.github.com>2022-10-06 19:44:39 +0300
committerGitHub <noreply@github.com>2022-10-06 19:44:39 +0300
commit849f7ceaf7876286aa663b4f0157b4542090fe90 (patch)
tree663d58b50ec6d9cc0d4abe9b11fa015bf40f8e22
parent1683d87a3f45dff1817e858dbaf006e5ff84e784 (diff)
Fix Clang-tidy 15 warnings (#1058)
These warnings were found by running clang-tidy 15.
-rw-r--r--tests/notnull_tests.cpp2
-rw-r--r--tests/utils_tests.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/notnull_tests.cpp b/tests/notnull_tests.cpp
index db22c72..ccb652a 100644
--- a/tests/notnull_tests.cpp
+++ b/tests/notnull_tests.cpp
@@ -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
diff --git a/tests/utils_tests.cpp b/tests/utils_tests.cpp
index 715073f..0658263 100644
--- a/tests/utils_tests.cpp
+++ b/tests/utils_tests.cpp
@@ -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);