| 138 | } |
| 139 | |
| 140 | static std::optional<float> safeStringToFloat(std::string_view str) { |
| 141 | try { |
| 142 | std::string strValue(str); |
| 143 | return std::stof(strValue); |
| 144 | } catch (const std::invalid_argument&) { |
| 145 | return std::nullopt; |
| 146 | } catch (const std::out_of_range&) { |
| 147 | return std::nullopt; |
| 148 | } |
| 149 | return std::nullopt; |
| 150 | } |
| 151 | |
| 152 | enum class CSSValue { |
| 153 | Number, |
no outgoing calls
no test coverage detected