Skip to content

remove using namepace #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 9, 2025
Merged

remove using namepace #14

merged 5 commits into from
May 9, 2025

Conversation

KarthikKaravatt
Copy link
Contributor

This removes the use of usingnamespace #7 but the import is done a little bit differently as seen in the updated readme. This seems like the simplest way to fix this, in terms of changes made.

This is done because usingnamesapce is going to be removed soon and also without it we can use incremental compilation.

@OndraVoves
Copy link
Contributor

It might be better to move the code from zmath.zig directly to main.zig. It will be without usingnamespace and at the same time backwards compatible.

Copy link
Member

@hazeycode hazeycode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @OndraVoves pointed out we can just move the contents of zmath.zig to the root module file.

Copy link
Member

@hazeycode hazeycode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also moved util to avoid the circular import.

@hazeycode hazeycode merged commit 5cf650a into zig-gamedev:main May 9, 2025
3 checks passed
@hazeycode hazeycode mentioned this pull request May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants