Skip to content

Commit 630e61a

Browse files
Fix clang conversion warnings in string_util::split_string_list (hsutter#1207)
* Fix clang conversion warnings in `string_util::split_string_list` * Keeping fix while keeping signed type How does this look? --------- Co-authored-by: Herb Sutter <[email protected]>
1 parent df3f4ff commit 630e61a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/cpp2util.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ auto split_string_list(std::string_view str)
389389
return std::isalnum(c) || c == '_';
390390
};
391391

392-
auto pos = 0;
392+
auto pos = decltype(std::ssize(str)){ 0 };
393393
while( pos < std::ssize(str) ) {
394394
// Skip non-alnum
395395
while (pos < std::ssize(str) && !is_id_char(str[pos])) {

0 commit comments

Comments
 (0)