| 367 | } |
| 368 | |
| 369 | std::string_view get_string(const registry& psf, std::string_view key, std::string_view def) |
| 370 | { |
| 371 | const auto found = psf.find(key); |
| 372 | |
| 373 | if (found == psf.end() || (found->second.type() != format::string && found->second.type() != format::array)) |
| 374 | { |
| 375 | return def; |
| 376 | } |
| 377 | |
| 378 | return found->second.as_string(); |
| 379 | } |
| 380 | |
| 381 | u32 get_integer(const registry& psf, std::string_view key, u32 def) |
| 382 | { |
no test coverage detected