---------------------------------------------------------------------
| 180 | |
| 181 | //--------------------------------------------------------------------- |
| 182 | std::filesystem::path UnifiedDiffParser::ExtractTargetFile(Stream& stream) const |
| 183 | { |
| 184 | std::wstring line; |
| 185 | if (!stream.GetLine(line)) |
| 186 | ThrowError(stream, UnifiedDiffParserException::ErrorCannotReadLine); |
| 187 | |
| 188 | if (!boost::algorithm::starts_with(line, ToFilePrefix)) |
| 189 | ThrowError(stream, UnifiedDiffParserException::ErrorExpectFromFilePrefix); |
| 190 | |
| 191 | const auto startIndex = ToFilePrefix.size(); |
| 192 | const auto endIndex = line.find('\t'); |
| 193 | |
| 194 | if (endIndex != std::string::npos) |
| 195 | return line.substr(startIndex, endIndex - startIndex); |
| 196 | return line.substr(startIndex); |
| 197 | } |
| 198 | |
| 199 | //------------------------------------------------------------------------- |
| 200 | UnifiedDiffParser::HunksDifferences |
nothing calls this directly
no outgoing calls
no test coverage detected