| 242 | } |
| 243 | |
| 244 | bool WktParser::HasValueInt(const std::string& key, int& val) { |
| 245 | std::string res; |
| 246 | if (HasValueStr(key, res)) { |
| 247 | size_t pos = res.find('|'); |
| 248 | try { |
| 249 | if (pos != std::string::npos) { |
| 250 | val = std::stoi(res.substr(pos + 1, 999)); |
| 251 | } else { |
| 252 | val = std::stoi(res); |
| 253 | } |
| 254 | return true; |
| 255 | } catch (const std::exception&) { |
| 256 | return false; |
| 257 | } |
| 258 | } else { |
| 259 | return false; |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | bool WktParser::HasValueDouble(const std::string& key, double& val) { |
| 264 | std::string res; |
nothing calls this directly
no outgoing calls
no test coverage detected