Skip to content

Commit

Permalink
fix 'local variable is never mutated' errors and some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwain authored and Stephen Gutekanst committed Jun 2, 2024
1 parent 309be0c commit 05dc7f0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/glyph-to-svg.zig
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const OutlinePrinter = struct {

pub fn extractOutline(self: *Self) !void {
try self.path_stream.writer().writeAll("<path d='");
var callbacks = freetype.Outline.Funcs(*Self){
const callbacks = freetype.Outline.Funcs(*Self){
.move_to = moveToFunction,
.line_to = lineToFunction,
.conic_to = conicToFunction,
Expand Down
2 changes: 1 addition & 1 deletion examples/single-glyph.zig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
const allocator = gpa.allocator();
var args = try std.process.argsAlloc(allocator);
const args = try std.process.argsAlloc(allocator);
defer std.process.argsFree(allocator, args);

const lib = try freetype.Library.init();
Expand Down
8 changes: 4 additions & 4 deletions src/freetype.zig
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ pub const SizeRequest = c.FT_Size_RequestRec;
pub const Span = c.FT_Span;
pub const Vector = c.FT_Vector;

pub const angel_pi = c.FT_ANGLE_PI;
pub const angel_2pi = c.FT_ANGLE_2PI;
pub const angel_pi2 = c.FT_ANGLE_PI2;
pub const angel_pi4 = c.FT_ANGLE_PI4;
pub const angle_pi = c.FT_ANGLE_PI;
pub const angle_2pi = c.FT_ANGLE_2PI;
pub const angle_pi2 = c.FT_ANGLE_PI2;
pub const angle_pi4 = c.FT_ANGLE_PI4;

pub const BBoxMode = enum(u2) {
// https://freetype.org/freetype2/docs/reference/ft2-glyph_management.html#ft_glyph_bbox_mode
Expand Down

0 comments on commit 05dc7f0

Please sign in to comment.