Kaydet (Commit) ebc635b9 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Turn redundant member direct-initializations into value-initializations

...the direct-initializations were introduced with
032d5126 "cppcheck: fix some uninitMemberVar in
configmgr part," presumably to avoid false positives from static analysis tools.
But the initializations are redundant, as the invariants of the affected classes
imply that the members have meaningful values at their points of use.  And the
direct-initializations with arbitrary values make it harder for a maintainer to
understand the relevant invariants, namely to ensure the members must have been
assigned /meaningful/ values by the time they are used.  Give a (subtle) clue by
making those into value-initializations.

Change-Id: Iadb25fa08b6d6b12d5bf8a8f04271270b6a7f7cb
üst 4379180a
......@@ -257,7 +257,7 @@ css::uno::Any parseValue(
}
ValueParser::ValueParser(int layer): layer_(layer), state_(STATE_TEXT) {}
ValueParser::ValueParser(int layer): layer_(layer), state_() {}
ValueParser::~ValueParser() {}
......
......@@ -41,7 +41,7 @@ namespace configmgr {
XcdParser::XcdParser(
int layer, std::set< OUString > const & processedDependencies, Data & data):
layer_(layer), processedDependencies_(processedDependencies), data_(data),
state_(STATE_START), dependencyOptional_(false), nesting_(0)
state_(STATE_START), dependencyOptional_(), nesting_()
{}
XcdParser::~XcdParser() {}
......
......@@ -114,7 +114,7 @@ void merge(
}
XcsParser::XcsParser(int layer, Data & data):
valueParser_(layer), data_(data), state_(STATE_START), ignoring_(0)
valueParser_(layer), data_(data), state_(STATE_START), ignoring_()
{}
XcsParser::~XcsParser() {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment