From a7573d7deb2eb8db2de5deaa29605bf2e94d3aa5 Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Sat, 16 Apr 2022 13:37:11 +0200 Subject: [PATCH] Refactored option inherit mode enum --- src/config/config.h | 2 +- src/config/option.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/config/config.h b/src/config/config.h index ce744e86..8ba0693d 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -106,7 +106,7 @@ struct inheritable_diagram_options { "include_relations_also_as_members", true}; option include{"include"}; option exclude{"exclude"}; - option puml{"plantuml", option_inherit_mode::append}; + option puml{"plantuml", option_inherit_mode::kAppend}; option generate_method_arguments{ "generate_method_arguments", method_arguments::full}; option generate_packages{"generate_packages", false}; diff --git a/src/config/option.h b/src/config/option.h index e106cdae..52ad9ffb 100644 --- a/src/config/option.h +++ b/src/config/option.h @@ -22,17 +22,17 @@ namespace config { template void append_value(T &l, const T &r) { l = r; } -enum class option_inherit_mode { override, append }; +enum class option_inherit_mode { kOverride, kAppend }; template struct option { option(const std::string &name_, - option_inherit_mode im = option_inherit_mode::override) + option_inherit_mode im = option_inherit_mode::kOverride) : name{name_} , value{} { } option(const std::string &name_, const T &initial_value, - option_inherit_mode im = option_inherit_mode::override) + option_inherit_mode im = option_inherit_mode::kOverride) : name{name_} , value{initial_value} , has_value{true} @@ -49,7 +49,7 @@ template struct option { void override(const option &o) { if (!is_declared && o.is_declared) { - if (inheritance_mode == option_inherit_mode::append) + if (inheritance_mode == option_inherit_mode::kAppend) append_value(value, o.value); else value = o.value;