| 130 | return matched; |
| 131 | } |
| 132 | std::optional<int> OHDUtil::string_to_int(const std::string& s) { |
| 133 | try { |
| 134 | auto ret = std::stoi(s); |
| 135 | return ret; |
| 136 | } catch (...) { |
| 137 | openhd::log::get_default()->warn("Cannot convert [{}] to int", s); |
| 138 | return std::nullopt; |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | std::optional<long> OHDUtil::string_to_long(const std::string& s) { |
| 143 | try { |
nothing calls this directly
no outgoing calls
no test coverage detected