| 457 | } |
| 458 | |
| 459 | common_presets common_preset_context::cascade(const common_presets & base, const common_presets & added) const { |
| 460 | common_presets out = base; // copy |
| 461 | for (const auto & [name, preset_added] : added) { |
| 462 | if (out.find(name) != out.end()) { |
| 463 | // if exists, merge |
| 464 | common_preset & target = out[name]; |
| 465 | target.merge(preset_added); |
| 466 | } else { |
| 467 | // otherwise, add directly |
| 468 | out[name] = preset_added; |
| 469 | } |
| 470 | } |
| 471 | return out; |
| 472 | } |
| 473 | |
| 474 | common_presets common_preset_context::cascade(const common_preset & base, const common_presets & presets) const { |
| 475 | common_presets out; |
no test coverage detected