Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

WTF? #344

Closed
wants to merge 1 commit into from
Closed

WTF? #344

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions src/node_options-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,20 @@ template <typename ChildOptions>
void OptionsParser<Options>::Insert(
const OptionsParser<ChildOptions>& child_options_parser,
ChildOptions* (Options::* get_child)()) {
aliases_.insert(std::begin(child_options_parser.aliases_),
std::end(child_options_parser.aliases_));
if (child_options_parser.aliases_.size() > 0) {
aliases_.insert(std::begin(child_options_parser.aliases_),
std::end(child_options_parser.aliases_));
}

for (const auto& pair : child_options_parser.options_)
options_.emplace(pair.first, Convert(pair.second, get_child));
if (child_options_parser.options_.size() > 0) {
for (const auto& pair : child_options_parser.options_)
options_.emplace(pair.first, Convert(pair.second, get_child));
}

for (const auto& pair : child_options_parser.implications_)
implications_.emplace(pair.first, Convert(pair.second, get_child));
if (child_options_parser.implications_.size() > 0) {
for (const auto& pair : child_options_parser.implications_)
implications_.emplace(pair.first, Convert(pair.second, get_child));
}
}

inline std::string NotAllowedInEnvErr(const std::string& arg) {
Expand Down