Skip to content

Commit d328830

Browse files
Remove comment made unecessary
Now the log field gets initialized before parse_options_baset is constructed so there is no danger as described in the comment.
1 parent 87d0a5a commit d328830

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/util/parse_options.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,6 @@ parse_options_baset::parse_options_baset(
3333
{
3434
std::string optstring=std::string("?h(help)")+_optstring;
3535
parse_result=cmdline.parse(argc, argv, optstring.c_str());
36-
37-
// DO NOT USE log HERE!
38-
//
39-
// The usual pattern of use is that the application class inherits from
40-
// messaget and parse_options_baset using a member variable of type
41-
// message_handlert to construct the messaget part.
42-
//
43-
// C++'s rules of initialisation mean that the constructors for
44-
// messaget and then parse_options_base run before those of message_handlert.
45-
// This means that the message_handlert object is uninitialised.
46-
// Using it here will likely cause a hard to debug failure somewhere in
47-
// the messaget code.
4836
}
4937

5038
void parse_options_baset::help()

0 commit comments

Comments
 (0)