| 475 | } |
| 476 | |
| 477 | void Config::applyDefaultOptions() |
| 478 | { |
| 479 | std::set<const OptionGroupProto*> appliedOptionGroups; |
| 480 | for (auto& [group, option, hasArgument] : _appliedOptions) |
| 481 | if (group) |
| 482 | appliedOptionGroups.insert(group); |
| 483 | |
| 484 | /* For every group which doesn't have an option set, find the default and |
| 485 | * set it. */ |
| 486 | |
| 487 | for (const auto& group : base()->option_group()) |
| 488 | { |
| 489 | if (!appliedOptionGroups.contains(&group)) |
| 490 | { |
| 491 | for (const auto& option : group.option()) |
| 492 | { |
| 493 | if (option.set_by_default()) |
| 494 | applyOption({&group, &option, false}); |
| 495 | } |
| 496 | } |
| 497 | } |
| 498 | } |
| 499 | |
| 500 | void Config::clearOptions() |
| 501 | { |
no test coverage detected