namespace CesiumUtility
| 309 | |
| 310 | } // namespace CesiumUtility |
| 311 | std::vector<std::string> CesiumUtility::JsonValue::getArrayOfStrings( |
| 312 | const std::string& defaultString) const { |
| 313 | if (!this->isArray()) |
| 314 | return std::vector<std::string>(); |
| 315 | |
| 316 | const JsonValue::Array& array = this->getArray(); |
| 317 | std::vector<std::string> result(array.size()); |
| 318 | std::transform( |
| 319 | array.begin(), |
| 320 | array.end(), |
| 321 | result.begin(), |
| 322 | [&defaultString](const JsonValue& arrayValue) { |
| 323 | return arrayValue.getStringOrDefault(defaultString); |
| 324 | }); |
| 325 | return result; |
| 326 | } |
no test coverage detected