1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-04 06:13:53 +00:00

style: pre-commit.ci fixes

This commit is contained in:
pre-commit-ci[bot] 2025-04-30 15:04:03 +00:00
parent eec2211b0f
commit f29420fb82
2 changed files with 5 additions and 4 deletions

View File

@ -1239,9 +1239,10 @@ class App {
///@return true if matched
CLI11_NODISCARD bool check_name(std::string name_to_check) const;
enum class NameMatch:std::uint8_t{none=0,match=1,prefix=2};
enum class NameMatch : std::uint8_t { none = 0, match = 1, prefix = 2 };
/// Check the name, case-insensitive and underscore insensitive if set
/// @return NameMatch::none if no match, NameMatch::match if exact NameMatch::prefix if prefix is enabled and a prefix matches
/// @return NameMatch::none if no match, NameMatch::match if exact NameMatch::prefix if prefix is enabled and a
/// prefix matches
CLI11_NODISCARD NameMatch check_name_detail(std::string name_to_check) const;
/// Get the groups available directly from this option (in order)

View File

@ -895,8 +895,8 @@ CLI11_NODISCARD CLI11_INLINE std::string App::get_display_name(bool with_aliases
}
CLI11_NODISCARD CLI11_INLINE bool App::check_name(std::string name_to_check) const {
auto result=check_name_detail(std::move(name_to_check));
return (result!=NameMatch::none);
auto result = check_name_detail(std::move(name_to_check));
return (result != NameMatch::none);
}
CLI11_NODISCARD CLI11_INLINE App::NameMatch App::check_name_detail(std::string name_to_check) const {