---------------------------------------------------------------------
| 100 | |
| 101 | //--------------------------------------------------------------------- |
| 102 | void FillModule( |
| 103 | Plugin::ModuleCoverage& module, |
| 104 | const std::vector<Plugin::ModuleCoverage*>& modules) |
| 105 | { |
| 106 | std::map<fs::path, std::vector<Plugin::FileCoverage*>> filesByPath = |
| 107 | GroupChildrenByKey<Plugin::ModuleCoverage*, fs::path, Plugin::FileCoverage>( |
| 108 | modules, |
| 109 | [](const Plugin::ModuleCoverage* m) -> const Plugin::ModuleCoverage::T_FileCoverageCollection&{ return m->GetFiles(); }, |
| 110 | [](const Plugin::FileCoverage& file) -> const fs::path&{ return file.GetPath(); }); |
| 111 | |
| 112 | for (const auto& pair : filesByPath) |
| 113 | { |
| 114 | auto& file = module.AddFile(pair.first); |
| 115 | FillFiles(file, pair.second); |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | //------------------------------------------------------------------------- |
| 120 | void MergeFileCoverages(const std::vector<Plugin::FileCoverage*>& fileCoverages) |