| 173 | } |
| 174 | |
| 175 | int Patch::PatchTableExecute(PatchGroup* group, const std::string_view lhs, const std::string_view rhs, |
| 176 | const std::span<const PatchTextTable>& Table) |
| 177 | { |
| 178 | int i = 0; |
| 179 | |
| 180 | while (Table[i].text) |
| 181 | { |
| 182 | if (lhs.compare(Table[i].text) == 0) |
| 183 | { |
| 184 | if (Table[i].func) |
| 185 | Table[i].func(group, lhs, rhs); |
| 186 | break; |
| 187 | } |
| 188 | i++; |
| 189 | } |
| 190 | |
| 191 | return Table[i].code; |
| 192 | } |
| 193 | |
| 194 | // This routine is for executing the commands of the ini file. |
| 195 | void Patch::LoadPatchLine(PatchGroup* group, const std::string_view line) |