1
0
Fork 0

initialize variable

This commit is contained in:
jsteemann 2016-02-26 22:32:31 +01:00
parent 1dc877db5d
commit 05094a2370
1 changed files with 7 additions and 2 deletions

View File

@ -87,7 +87,8 @@ class ProgramOptions {
_terminalWidth(terminalWidth), _terminalWidth(terminalWidth),
_similarity(similarity), _similarity(similarity),
_processingResult(), _processingResult(),
_sealed(false) { _sealed(false),
_overrideOptions(false) {
// find progname wildcard in string // find progname wildcard in string
size_t const pos = _usage.find(ARANGODB_PROGRAM_OPTIONS_PROGNAME); size_t const pos = _usage.find(ARANGODB_PROGRAM_OPTIONS_PROGNAME);
@ -109,11 +110,15 @@ class ProgramOptions {
void seal() { _sealed = true; } void seal() { _sealed = true; }
// allow or disallow overriding already set options // allow or disallow overriding already set options
bool allowOverride(bool value) { void allowOverride(bool value) {
checkIfSealed(); checkIfSealed();
_overrideOptions = value; _overrideOptions = value;
} }
bool allowOverride() const {
return _overrideOptions;
}
// set context for error reporting // set context for error reporting
void setContext(std::string const& value) { _context = value; } void setContext(std::string const& value) { _context = value; }