| 63 | } |
| 64 | |
| 65 | string_view_t path::__root_path_raw() const { |
| 66 | auto PP = PathParser::CreateBegin(__pn_); |
| 67 | if (PP.State_ == PathParser::PS_InRootName) { |
| 68 | auto NextCh = PP.peek(); |
| 69 | if (NextCh && isSeparator(*NextCh)) { |
| 70 | ++PP; |
| 71 | return createView(__pn_.data(), &PP.RawEntry.back()); |
| 72 | } |
| 73 | return PP.RawEntry; |
| 74 | } |
| 75 | if (PP.State_ == PathParser::PS_InRootDir) |
| 76 | return *PP; |
| 77 | return {}; |
| 78 | } |
| 79 | |
| 80 | static bool ConsumeRootName(PathParser* PP) { |
| 81 | static_assert(PathParser::PS_BeforeBegin == 1 && PathParser::PS_InRootName == 2, "Values for enums are incorrect"); |
nothing calls this directly
no test coverage detected