Skip to content

Commit 396e350

Browse files
committed
add initialization for member variables
1 parent cd380ed commit 396e350

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/CLI/ConfigFwd.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class ConfigBase : public Config {
9898
/// Specify the configuration index to use for arrayed sections
9999
int16_t configIndex{-1};
100100
/// Specify the configuration section that should be used
101-
std::string configSection;
101+
std::string configSection{};
102102

103103
public:
104104
std::string
@@ -145,15 +145,15 @@ class ConfigBase : public Config {
145145
/// get a reference to the configuration section
146146
std::string &sectionRef() { return configSection; }
147147
/// get the section
148-
const std::string& section() const { return configSection; }
148+
const std::string &section() const { return configSection; }
149149
/// specify a particular section of the configuration file to use
150150
ConfigBase *section(const std::string &sectionName) {
151151
configSection = sectionName;
152152
return this;
153153
}
154154

155155
/// get a reference to the configuration index
156-
int16_t& indexRef() { return configIndex; }
156+
int16_t &indexRef() { return configIndex; }
157157
/// get the section index
158158
int16_t index() const { return configIndex; }
159159
/// specify a particular index in the section to use (-1) for all sections to use

0 commit comments

Comments
 (0)