| 832 | } |
| 833 | |
| 834 | OptionStatus getLocalOptionValues( |
| 835 | const HighsLogOptions& report_log_options, const std::string& option, |
| 836 | const std::vector<OptionRecord*>& option_records, bool* current_value, |
| 837 | bool* default_value) { |
| 838 | HighsInt index; |
| 839 | OptionStatus status = |
| 840 | getOptionIndex(report_log_options, option, option_records, index); |
| 841 | if (status != OptionStatus::kOk) return status; |
| 842 | HighsOptionType type = option_records[index]->type; |
| 843 | if (type != HighsOptionType::kBool) { |
| 844 | highsLogUser(report_log_options, HighsLogType::kError, |
| 845 | "getLocalOptionValue: Option \"%s\" requires value of type " |
| 846 | "%s, not bool\n", |
| 847 | option.c_str(), optionEntryTypeToString(type).c_str()); |
| 848 | return OptionStatus::kIllegalValue; |
| 849 | } |
| 850 | OptionRecordBool& option_record = |
| 851 | ((OptionRecordBool*)option_records[index])[0]; |
| 852 | if (current_value) *current_value = *(option_record.value); |
| 853 | if (default_value) *default_value = option_record.default_value; |
| 854 | return OptionStatus::kOk; |
| 855 | } |
| 856 | |
| 857 | OptionStatus getLocalOptionValues( |
| 858 | const HighsLogOptions& report_log_options, const std::string& option, |
no test coverage detected