added const (#605)

Resolves compiler code analysis warning ...\gsl\include\gsl\string_span(101): warning C26496: The variable 'str_span' is assigned only once, mark it as const (con.4: https://go.microsoft.com/fwlink/p/?LinkID=784969).
This commit is contained in:
beinhaerter 2018-02-11 21:19:10 +01:00 committed by Neil MacIntosh
parent 1a3eb2a6d4
commit 3ff6004bc3

View File

@ -98,7 +98,7 @@ namespace details
{
if (str == nullptr || n <= 0) return 0;
span<const CharT> str_span{str, n};
const span<const CharT> str_span{str, n};
std::ptrdiff_t len = 0;
while (len < n && str_span[len]) len++;