authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-05-21 12:55:28 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-05-21 12:55:28 -07:00
log7adf75caad961fb8d81fd7517c1db17a6df87a3a
tree7b9a0f89b37276a4bceac5d9d1ed4d88dad55bca
parentb1df1f0d3561f2ff59ccddacd9b5c8efdaec2cf2

update to Zig 0.14


1 files changed, 2 insertions(+), 2 deletions(-)

sRGB.zig+2-2
...@@ -51,7 +51,7 @@ pub fn format(x: Self, comptime fmt: []const u8, options: std.fmt.FormatOptions,...@@ -51,7 +51,7 @@ pub fn format(x: Self, comptime fmt: []const u8, options: std.fmt.FormatOptions,
51 _ = fmt;51 _ = fmt;
52 _ = options;52 _ = options;
53 if (x.a < 255) {53 if (x.a < 255) {
54 @setCold(true);54 @branchHint(.cold);
55 try writer.print("#{:0>2}{:0>2}{:0>2}{:0>2}", .{55 try writer.print("#{:0>2}{:0>2}{:0>2}{:0>2}", .{
56 std.fmt.fmtSliceHexLower(&.{x.r}),56 std.fmt.fmtSliceHexLower(&.{x.r}),
57 std.fmt.fmtSliceHexLower(&.{x.g}),57 std.fmt.fmtSliceHexLower(&.{x.g}),
...@@ -73,7 +73,7 @@ pub usingnamespace _x.mixin(@This(), u8, .r, .g, .b);...@@ -73,7 +73,7 @@ pub usingnamespace _x.mixin(@This(), u8, .r, .g, .b);
73// https://webstore.iec.ch/publication/616973// https://webstore.iec.ch/publication/6169
74pub fn to_linear_rgb(x: Self) color.LinearRgb {74pub fn to_linear_rgb(x: Self) color.LinearRgb {
75 const lut = comptime blk: {75 const lut = comptime blk: {
76 @setEvalBranchQuota(10_000);76 @setEvalBranchQuota(20_000);
77 var res: [256]f32 = undefined;77 var res: [256]f32 = undefined;
78 for (0..256) |i| {78 for (0..256) |i| {
79 const c = @as(f32, @floatFromInt(i)) / 255.0;79 const c = @as(f32, @floatFromInt(i)) / 255.0;