diff options
author | Sara Golemon <sara.golemon@mongodb.com> | 2018-11-06 22:48:19 +0000 |
---|---|---|
committer | Sara Golemon <sara.golemon@mongodb.com> | 2018-11-07 18:21:48 +0000 |
commit | 26796d79323aa3e1c3b8f27b02417a73e8360ed8 (patch) | |
tree | c71f7c4a8795fc59df53bff7692dda950ee80b50 /src/mongo/util/options_parser/option_section.h | |
parent | f62cf06d496a357b6fb3f1ca9f3174887fca302a (diff) | |
download | mongo-26796d79323aa3e1c3b8f27b02417a73e8360ed8.tar.gz |
SERVER-37969 Guard against duplicate named options
Diffstat (limited to 'src/mongo/util/options_parser/option_section.h')
-rw-r--r-- | src/mongo/util/options_parser/option_section.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/util/options_parser/option_section.h b/src/mongo/util/options_parser/option_section.h index 685e3d869f2..d776c18ae00 100644 --- a/src/mongo/util/options_parser/option_section.h +++ b/src/mongo/util/options_parser/option_section.h @@ -170,6 +170,17 @@ private: std::string _name; std::list<OptionSection> _subSections; std::list<OptionDescription> _options; + + /** + * Internal accumulator of all dotted names (incl. deprecated) in _options and all _subSections. + * Used for ensuring duplicate entries don't find their way into different parts of the tree. + */ + std::set<std::string> _allDottedNames; + + /** + * Internal accumulator for all single names. See _allDottedNames for further info. + */ + std::set<std::string> _allSingleNames; }; } // namespace optionenvironment |