mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
suppress code analysis warning
- suppress " warning C26481: Don't use pointer arithmetic. Use span instead (bounds.1)." - Please note that the suppression in `end()` does not work with MSVC 16.5.4.
This commit is contained in:
parent
9f6a9a5807
commit
fb1243d735
@ -582,12 +582,18 @@ public:
|
|||||||
constexpr iterator begin() const noexcept
|
constexpr iterator begin() const noexcept
|
||||||
{
|
{
|
||||||
const auto data = storage_.data();
|
const auto data = storage_.data();
|
||||||
|
// clang-format off
|
||||||
|
GSL_SUPPRESS(bounds.1) // NO-FORMAT: attribute
|
||||||
|
// clang-format on
|
||||||
return {data, data + size(), data};
|
return {data, data + size(), data};
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr iterator end() const noexcept
|
constexpr iterator end() const noexcept
|
||||||
{
|
{
|
||||||
const auto data = storage_.data();
|
const auto data = storage_.data();
|
||||||
|
// clang-format off
|
||||||
|
GSL_SUPPRESS(bounds.1) // NO-FORMAT: attribute
|
||||||
|
// clang-format on
|
||||||
const auto endData = data + storage_.size();
|
const auto endData = data + storage_.size();
|
||||||
return {data, endData, endData};
|
return {data, endData, endData};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user