Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Lin Zhihao <[email protected]>
  • Loading branch information
Bill-hbrhbr and LinZhihao-723 authored Jul 19, 2024
1 parent 506c7c7 commit 83b4013
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/core/src/clp/regex_utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
```
Expand All @@ -47,7 +47,7 @@ if (result.has_error()) {
#include <regex_utils/RegexToWildcardTranslatorConfig.hpp>

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
```
Expand Down

0 comments on commit 83b4013

Please sign in to comment.