From 31e46f3f6adf6f9ff854248d83a5b71e12a1d8ac Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 23 Aug 2025 08:26:14 +0300 Subject: [PATCH] improve comment, fix typos --- vlib/v/gen/c/auto_str_methods.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/gen/c/auto_str_methods.v b/vlib/v/gen/c/auto_str_methods.v index af3bc8138d..96b5dd589e 100644 --- a/vlib/v/gen/c/auto_str_methods.v +++ b/vlib/v/gen/c/auto_str_methods.v @@ -379,7 +379,7 @@ fn (mut g Gen) gen_str_for_enum(info ast.Enum, styp string, str_fn_name string) g.auto_str_funcs.writeln('\tret = string__plus(ret, _S("}"));') g.auto_str_funcs.writeln('\treturn ret;') } else if info.uses_exprs { - // This enum values could be C macros, that are expanded later to duplicate values, so we can not use a switch here. + // The enum values could be C macros, expanded later to duplicate values, and we do not know if that is the case, so we can not use a switch here. // Instead we generate multiple if statements, which is slower, but is guaranteed to work in the presence of duplicates. for val in info.vals { g.auto_str_funcs.writeln('\t\tif(it == ${s}__${val}){ return _S("${val}"); }')