| 268 | |
| 269 | |
| 270 | mi_decl_nodiscard long mi_option_get(mi_option_t option) { |
| 271 | mi_assert(option >= 0 && option < _mi_option_last); |
| 272 | if (option < 0 || option >= _mi_option_last) return 0; |
| 273 | mi_option_desc_t* desc = &mi_options[option]; |
| 274 | mi_assert(desc->option == option); // index should match the option |
| 275 | if mi_unlikely(desc->init == MI_OPTION_UNINIT) { |
| 276 | mi_option_init(desc); |
| 277 | } |
| 278 | return desc->value; |
| 279 | } |
| 280 |
no test coverage detected