File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change 33
44#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
55
6+ #include < algorithm>
67#include < cstdlib>
8+ #include < ranges>
79#include " node_options.h"
810#include " util.h"
911
@@ -393,15 +395,16 @@ void OptionsParser<Options>::Parse(
393395 // Implications for negated options are defined with "--no-".
394396 implied_name.insert (2 , " no-" );
395397 }
396- auto implications = implications_.equal_range (implied_name);
397- for (auto imp = implications.first ; imp != implications.second ; ++imp) {
398- if (imp->second .type == kV8Option ) {
399- v8_args->push_back (imp->second .name );
400- } else {
401- *imp->second .target_field ->template Lookup <bool >(options) =
402- imp->second .target_value ;
403- }
404- }
398+ auto [f, l] = implications_.equal_range (implied_name);
399+ std::ranges::for_each (std::ranges::subrange (f, l) | std::views::values,
400+ [&](const auto & value) {
401+ if (value.type == kV8Option ) {
402+ v8_args->push_back (value.name );
403+ } else {
404+ *value.target_field ->template Lookup <bool >(
405+ options) = value.target_value ;
406+ }
407+ });
405408 }
406409
407410 if (it == options_.end ()) {
You can’t perform that action at this time.
0 commit comments