mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
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:
parent
1a3eb2a6d4
commit
3ff6004bc3
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user