configmgr/source/valueparser.cxx | 2 +- configmgr/source/xcdparser.cxx | 2 +- configmgr/source/xcsparser.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit ebc635b95cc6d8c5853c443fee9fe76a0c89c121 Author: Stephan Bergmann <[email protected]> Date: Thu Jun 20 10:07:21 2013 +0200 Turn redundant member direct-initializations into value-initializations ...the direct-initializations were introduced with 032d5126e41562917b91b8f4826b0be628169968 "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 diff --git a/configmgr/source/valueparser.cxx b/configmgr/source/valueparser.cxx index f0a4072..1deced0 100644 --- a/configmgr/source/valueparser.cxx +++ b/configmgr/source/valueparser.cxx @@ -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() {} diff --git a/configmgr/source/xcdparser.cxx b/configmgr/source/xcdparser.cxx index 359c73d..a547c14 100644 --- a/configmgr/source/xcdparser.cxx +++ b/configmgr/source/xcdparser.cxx @@ -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() {} diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx index 6f4744d..0dc218d 100644 --- a/configmgr/source/xcsparser.cxx +++ b/configmgr/source/xcsparser.cxx @@ -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() {} _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
