| 313 | } |
| 314 | |
| 315 | void FromString(std::string_view str, Restriction::Type & type) |
| 316 | { |
| 317 | if (str == kNo) |
| 318 | { |
| 319 | type = Restriction::Type::No; |
| 320 | return; |
| 321 | } |
| 322 | |
| 323 | if (str == kOnly) |
| 324 | { |
| 325 | type = Restriction::Type::Only; |
| 326 | return; |
| 327 | } |
| 328 | |
| 329 | if (str == kNoUTurn) |
| 330 | { |
| 331 | type = Restriction::Type::NoUTurn; |
| 332 | return; |
| 333 | } |
| 334 | |
| 335 | if (str == kOnlyUTurn) |
| 336 | { |
| 337 | type = Restriction::Type::OnlyUTurn; |
| 338 | return; |
| 339 | } |
| 340 | |
| 341 | CHECK(false, ("Invalid line:", str, "expected:", kNo, "or", kOnly, "or", kNoUTurn, "or", kOnlyUTurn)); |
| 342 | UNREACHABLE(); |
| 343 | } |
| 344 | |
| 345 | void FromString(std::string_view str, RestrictionWriter::ViaType & type) |
| 346 | { |
no test coverage detected