dev.1711 - switched to multi-object-for-loops

This commit is contained in:
Chris Boesch 2023-02-21 21:43:40 +01:00
parent 171248096d
commit cad9de0158
9 changed files with 18 additions and 16 deletions

View file

@ -102,7 +102,7 @@ const HermitsNotebook = struct {
end_of_entries: u8 = 0,
fn getEntry(self: *HermitsNotebook, place: *const Place) ?*NotebookEntry {
for (self.entries) |*entry, i| {
for (&self.entries, 0..) |*entry, i| {
if (i >= self.end_of_entries) break;
if (place == entry.*.?.place) return &entry.*.?;
}