diff --git a/game/music.zig b/game/music.zig index 4171709..fef7a97 100644 --- a/game/music.zig +++ b/game/music.zig @@ -152,7 +152,7 @@ pub fn readFromFile(allocator: std.mem.Allocator, path: std.fs.Dir, file: std.fs self.fumen.* = try Fumen.readFromFile(allocator, fumen_file, path); errdefer self.fumen.deinit(); - var ranking_path = try path.realpathAlloc(allocator, self.ranking_file_name); + const ranking_path = try path.realpathAlloc(allocator, self.ranking_file_name); defer allocator.free(ranking_path); var ranking_file = try std.fs.openFileAbsolute(ranking_path, .{}); diff --git a/game/ranking.zig b/game/ranking.zig index f3bbbbd..d8a1730 100644 --- a/game/ranking.zig +++ b/game/ranking.zig @@ -38,7 +38,7 @@ pub fn getUTypingDate() UTypingDate { //Get the year and day var year_day = epoch_seconds.getEpochDay().calculateYearDay(); //Get the year and month - var month_and_day = year_day.calculateMonthDay(); + const month_and_day = year_day.calculateMonthDay(); return .{ .day = month_and_day.day_index, @@ -120,7 +120,7 @@ pub fn readRanking(file: std.fs.File) !Self { } //In version 5, we now only store the exact number of scores, rather than all ranking_len scores. - var ranking_size: usize = if (version >= 5) @intCast(try reader.readInt(i32, .little)) else ranking_len; + const ranking_size: usize = if (version >= 5) @intCast(try reader.readInt(i32, .little)) else ranking_len; //Iterate through all the rankings and read the scores for (0..ranking_size) |i| {