style(font/sprite): annotate type for value

pull/7732/head
Qwerasd 2025-06-30 16:44:21 -06:00
parent a00a727e77
commit 95fbeb5b82
1 changed files with 6 additions and 2 deletions

View File

@ -54,7 +54,7 @@ const Range = struct {
/// Automatically collect ranges for functions with names /// Automatically collect ranges for functions with names
/// in the format `draw<CP>` or `draw<MIN>_<MAX>`. /// in the format `draw<CP>` or `draw<MIN>_<MAX>`.
const ranges = ranges: { const ranges: []const Range = ranges: {
@setEvalBranchQuota(1_000_000); @setEvalBranchQuota(1_000_000);
// Structs containing drawing functions for codepoint ranges. // Structs containing drawing functions for codepoint ranges.
@ -137,7 +137,11 @@ const ranges = ranges: {
i = n.max; i = n.max;
} }
break :ranges r; // We need to copy in to a const rather than a var in order to take
// the reference at comptime so that we can break with a slice here.
const fixed = r;
break :ranges &fixed;
}; };
fn getDrawFn(cp: u32) ?*const DrawFn { fn getDrawFn(cp: u32) ?*const DrawFn {