Skip to content

Commit a764874

Browse files
author
Daniel Kroening
authored
Merge pull request #499 from mgudemann/fix_init_bool_values_cmdline
specify initial values for Boolean in struct optiont
2 parents 3e40add + c261978 commit a764874

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/util/cmdline.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,19 @@ class cmdlinet
3939
protected:
4040
struct optiont
4141
{
42-
bool isset, hasval, islong;
42+
bool isset;
43+
bool hasval;
44+
bool islong;
4345
char optchar;
4446
std::string optstring;
4547
std::list<std::string> values;
48+
public:
49+
optiont():
50+
isset(false),
51+
hasval(false),
52+
islong(false),
53+
optchar(0)
54+
{}
4655
};
4756

4857
std::vector<optiont> options;

0 commit comments

Comments
 (0)