diff options
author | Matthieu Poullet <matthieu.poullet@gmail.com> | 2018-06-15 19:12:37 +0200 |
---|---|---|
committer | Anna Gringauze <annagrin@microsoft.com> | 2018-06-15 10:12:37 -0700 |
commit | a9ef39f14ac2b0e732b22122e5fabb8dae8284db (patch) | |
tree | 3b96bcbb6e6e4358db1670b4864cfb2cc84d8eae /include | |
parent | ffdaf0fb211d3a2920e480c7a8315cff98fe1b19 (diff) | |
download | platform_external_Microsoft-GSL-a9ef39f14ac2b0e732b22122e5fabb8dae8284db.tar.gz platform_external_Microsoft-GSL-a9ef39f14ac2b0e732b22122e5fabb8dae8284db.tar.bz2 platform_external_Microsoft-GSL-a9ef39f14ac2b0e732b22122e5fabb8dae8284db.zip |
Fix GCC8 warnings 'useless cast to type'. (#691)
Diffstat (limited to 'include')
-rw-r--r-- | include/gsl/multi_span | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/gsl/multi_span b/include/gsl/multi_span index f697093..9c0c27b 100644 --- a/include/gsl/multi_span +++ b/include/gsl/multi_span @@ -612,7 +612,7 @@ public: } constexpr static_bounds(std::initializer_list<size_type> il) - : m_ranges(static_cast<const std::ptrdiff_t*>(il.begin())) + : m_ranges(il.begin()) { // Size of the initializer list must match the rank of the array Expects((MyRanges::DynamicNum == 0 && il.size() == 1 && *il.begin() == static_size) || @@ -1686,7 +1686,7 @@ constexpr auto as_multi_span(multi_span<byte, Dimensions...> s) GSL_NOEXCEPT static_assert( std::is_trivial<std::decay_t<U>>::value && (ByteSpan::bounds_type::static_size == dynamic_range || - ByteSpan::bounds_type::static_size % static_cast<std::size_t>(sizeof(U)) == 0), + ByteSpan::bounds_type::static_size % sizeof(U) == 0), "Target type must be a trivial type and its size must match the byte array size"); Expects((s.size_bytes() % sizeof(U)) == 0); |