Following two functions create a rank section and serialize |table| to it. If there was an old section with ranks, these functions overwrite it.
| 103 | // to it. If there was an old section with ranks, these functions |
| 104 | // overwrite it. |
| 105 | void SerializeRankTable(RankTable & table, FilesContainerW & wcont, string const & sectionName) |
| 106 | { |
| 107 | if (wcont.IsExist(sectionName)) |
| 108 | wcont.DeleteSection(sectionName); |
| 109 | |
| 110 | vector<char> buffer; |
| 111 | { |
| 112 | MemWriter<decltype(buffer)> writer(buffer); |
| 113 | table.Serialize(writer); |
| 114 | } |
| 115 | |
| 116 | wcont.Write(buffer, sectionName); |
| 117 | wcont.Finish(); |
| 118 | } |
| 119 | |
| 120 | void SerializeRankTable(RankTable & table, string const & mapPath, string const & sectionName) |
| 121 | { |
no test coverage detected