| 118 | } |
| 119 | |
| 120 | mi_decl_nodiscard long mi_option_get(mi_option_t option) { |
| 121 | mi_assert(option >= 0 && option < _mi_option_last); |
| 122 | if (option < 0 || option >= _mi_option_last) return 0; |
| 123 | mi_option_desc_t* desc = &options[option]; |
| 124 | mi_assert(desc->option == option); // index should match the option |
| 125 | if mi_unlikely(desc->init == UNINIT) { |
| 126 | mi_option_init(desc); |
| 127 | } |
| 128 | return desc->value; |
| 129 | } |
| 130 |
no test coverage detected