From b24065f7e9aa313114db0ba6af6c57e0faac3ff3 Mon Sep 17 00:00:00 2001 From: Alexander Lopez Date: Thu, 15 Aug 2024 18:16:32 -0700 Subject: [PATCH] fix comment --- str_view/str_view.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/str_view/str_view.h b/str_view/str_view.h index 2d00acb..f055442 100644 --- a/str_view/str_view.h +++ b/str_view/str_view.h @@ -39,7 +39,6 @@ # define ATTRIB_PURE /**/ # define ATTRIB_CONST /**/ # define ATTRIB_NULLTERM(...) /**/ - /* MSVC does not allow strong enforcement of string literals to the SV str_view constructor. This is a dummy wrapper for compatibility. */ # define STR_LITERAL(str) str @@ -94,9 +93,9 @@ typedef enum One can even use this in code when string literals are used rather than saved constants to avoid errors in str_view constructions. - for (str_view cur = sv_begin_tok(ref, SV(" ")); - !sv_end_tok(ref_view, cur); - cur = sv_next_tok(ref_view, cur, SV(" ")) + for (str_view cur = sv_begin_tok(src, SV(" ")); + !sv_end_tok(src, cur); + cur = sv_next_tok(src, cur, SV(" ")) {} However saving the str_view in a constant may be more convenient. */