| 445 | } |
| 446 | |
| 447 | common_preset common_preset_context::load_from_args(int argc, char ** argv) const { |
| 448 | common_preset preset; |
| 449 | preset.name = COMMON_PRESET_DEFAULT_NAME; |
| 450 | |
| 451 | bool ok = common_params_to_map(argc, argv, ctx_params.ex, preset.options); |
| 452 | if (!ok) { |
| 453 | throw std::runtime_error("failed to parse CLI arguments into preset"); |
| 454 | } |
| 455 | |
| 456 | return preset; |
| 457 | } |
| 458 | |
| 459 | common_presets common_preset_context::cascade(const common_presets & base, const common_presets & added) const { |
| 460 | common_presets out = base; // copy |
no test coverage detected