The *Impl is not the key point for this example, code readers could ignore this.
| 37 | // The *Impl is not the key point for this example, code readers |
| 38 | // could ignore this. |
| 39 | uint64_t CountCharInFileImpl(const FileName &File, char c) { |
| 40 | uint64_t Ret = 0; |
| 41 | std::ifstream infile(File); |
| 42 | std::string line; |
| 43 | while (std::getline(infile, line)) |
| 44 | Ret += std::count(line.begin(), line.end(), c); |
| 45 | return Ret; |
| 46 | } |
| 47 | |
| 48 | uint64_t CountCharInFiles(const std::vector<FileName> &Files, char c) { |
| 49 | uint64_t ReadSize = 0; |
no test coverage detected