mirror of
https://github.com/microsoft/GSL.git
synced 2025-11-17 07:49:36 +01:00
Fix some corechecker warnings (#470)
* Improve const correctness in string_span * Improve const correctness in bounds_tests.cpp and byte_tests.cpp * Improve const correctness in span_tests.cpp * Improve const correctness in utils_tests.cpp * Use gsl::owner for dynamically allocated memory in string_span_tests.cpp * Improve const correctness in string_span_tests.cpp * Improve const correctness for strided_span_tests.cpp
This commit is contained in:
@@ -45,7 +45,7 @@ SUITE(bounds_test)
|
||||
TEST(bounds_basic)
|
||||
{
|
||||
static_bounds<3, 4, 5> b;
|
||||
auto a = b.slice();
|
||||
const auto a = b.slice();
|
||||
(void)a;
|
||||
static_bounds<4, dynamic_range, 2> x{ 4 };
|
||||
x.slice().slice();
|
||||
@@ -55,7 +55,7 @@ SUITE(bounds_test)
|
||||
{
|
||||
static_bounds<4, dynamic_range, 2> bounds{ 3 };
|
||||
|
||||
auto itr = bounds.begin();
|
||||
const auto itr = bounds.begin();
|
||||
(void)itr;
|
||||
#ifdef CONFIRM_COMPILATION_ERRORS
|
||||
multi_span<int, 4, dynamic_range, 2> av(nullptr, bounds);
|
||||
|
||||
Reference in New Issue
Block a user