floooh / sokol-zig

Zig bindings for the sokol headers (https://github.com/floooh/sokol)
zlib License
341 stars 46 forks source link

Using const for local variables that are never mutated #47

Closed abhirag closed 8 months ago

abhirag commented 9 months ago

Unnecessary use of var is a compile time error now (reference compiler PR)

geooot commented 9 months ago

For debugtext.zig it might be better to make a PR to update the codegen in the main sokol repo.

https://github.com/floooh/sokol/blob/master/bindgen/gen_zig.py#L500

Changing the build.zig and the example here is completely valid tho

abhirag commented 9 months ago

@geooot thanks a lot for the code ref :) I'll make a change in main sokol repo, test and raise that PR too.

abhirag commented 9 months ago

Sokol PR https://github.com/floooh/sokol/pull/948

floooh commented 8 months ago

Ah, this PR now has conflicts after I merged the Android PR by @geooot, can you fix those? It looks quite trivial to resolve.

abhirag commented 8 months ago

resolved conflicts

floooh commented 8 months ago

...and merged. Many thanks!