| 167 | } |
| 168 | |
| 169 | Vec2 SizeFromString(std::string_view pszContent) |
| 170 | { |
| 171 | Vec2 ret = Vec2::ZERO; |
| 172 | |
| 173 | do |
| 174 | { |
| 175 | strArray strs; |
| 176 | AX_BREAK_IF(!splitWithForm(pszContent, strs)); |
| 177 | |
| 178 | float width = (float)utils::atof(strs[0].c_str()); |
| 179 | float height = (float)utils::atof(strs[1].c_str()); |
| 180 | |
| 181 | ret = Vec2(width, height); |
| 182 | } while (0); |
| 183 | |
| 184 | return ret; |
| 185 | } |
| 186 | |
| 187 | } |
no test coverage detected