summaryrefslogtreecommitdiff
path: root/src/node_options-inl.h
diff options
context:
space:
mode:
authorRefael Ackermann <refack@gmail.com>2019-02-25 15:42:28 -0500
committerRefael Ackermann <refack@gmail.com>2019-03-03 20:03:31 -0500
commit2c6d94f3db89ed4dfa3e68e7e945c10e3662ea41 (patch)
tree2ef84cb998275f475d1812f94ca9a59cbeacd583 /src/node_options-inl.h
parentaf8b92c0731603e5337cca3202603402d345c0a9 (diff)
downloadnode-new-2c6d94f3db89ed4dfa3e68e7e945c10e3662ea41.tar.gz
src: fix warnings around node_options
* header explicit usage, order, and reduce use of `*-inl.h` * pointer -> const reference when possible * no variable recyclicng * `std::begin/end` prefered over `instance.begin/end` * `USE` for explicit unused resaults PR-URL: https://github.com/nodejs/node/pull/26280 Fixes: https://github.com/nodejs/node/issues/25593 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'src/node_options-inl.h')
-rw-r--r--src/node_options-inl.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/node_options-inl.h b/src/node_options-inl.h
index 052c847f7e..001bdecbb6 100644
--- a/src/node_options-inl.h
+++ b/src/node_options-inl.h
@@ -213,15 +213,15 @@ auto OptionsParser<Options>::Convert(
template <typename Options>
template <typename ChildOptions>
void OptionsParser<Options>::Insert(
- const OptionsParser<ChildOptions>* child_options_parser,
+ const OptionsParser<ChildOptions>& child_options_parser,
ChildOptions* (Options::* get_child)()) {
- aliases_.insert(child_options_parser->aliases_.begin(),
- child_options_parser->aliases_.end());
+ aliases_.insert(std::begin(child_options_parser.aliases_),
+ std::end(child_options_parser.aliases_));
- for (const auto& pair : child_options_parser->options_)
+ 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_)
+ for (const auto& pair : child_options_parser.implications_)
implications_.emplace(pair.first, Convert(pair.second, get_child));
}