From 83b40131aed964f831bd21cd5d740729ae4862af Mon Sep 17 00:00:00 2001 From: Bingran Hu Date: Fri, 19 Jul 2024 03:16:37 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Lin Zhihao <59785146+LinZhihao-723@users.noreply.github.com> --- components/core/src/clp/regex_utils/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/core/src/clp/regex_utils/README.md b/components/core/src/clp/regex_utils/README.md index e0021115c..9a4f461df 100644 --- a/components/core/src/clp/regex_utils/README.md +++ b/components/core/src/clp/regex_utils/README.md @@ -31,12 +31,12 @@ using clp::regex_utils::regex_to_wildcard; // Other code -auto result = regex_to_wildcard(wildcard_str); +auto result{regex_to_wildcard(wildcard_str)}; if (result.has_error()) { - auto err_code = result.error(); + auto err_code{result.error()}; // Handle error } else { - auto regex_str = result.value(); + auto regex_str{result.value()}; // Do things with the translated string } ``` @@ -47,7 +47,7 @@ if (result.has_error()) { #include RegexToWildcardTranslatorConfig config{true, false, /*...other booleans*/}; -auto result = regex_to_wildcard(wildcard_str, config); +auto result{regex_to_wildcard(wildcard_str, config)}; // Same as above ```