| 439 | |
| 440 | template <class Policy> |
| 441 | Control Impl<Policy>::ResolvePath() |
| 442 | { |
| 443 | Root const root = ClassifyRoot(P); |
| 444 | |
| 445 | // Resolve the root component. It always ends in a slash. |
| 446 | Control control = this->ResolveRoot(root); |
| 447 | if (control.tag != Control::Tag::Continue) { |
| 448 | return control; |
| 449 | } |
| 450 | std::string::size_type const root_slash = control.slash; |
| 451 | |
| 452 | // Resolve later components. Every iteration that finishes |
| 453 | // the loop body makes progress either by removing a component |
| 454 | // or advancing the slash past it. |
| 455 | for (std::string::size_type slash = root_slash; |
| 456 | P.size() > root_slash + 1 && slash < P.size();) { |
| 457 | control = this->ResolveComponent(root, root_slash, slash); |
| 458 | if (control.tag != Control::Tag::Continue) { |
| 459 | return control; |
| 460 | } |
| 461 | slash = control.slash; |
| 462 | } |
| 463 | return Control::Continue(P.size()); |
| 464 | } |
| 465 | |
| 466 | template <class Policy> |
| 467 | cmsys::Status Impl<Policy>::Resolve(std::string in, std::string& out) |
no test coverage detected