Skip to content

Conversation

@squeek502
Copy link
Member

@squeek502 squeek502 commented Jun 10, 2019

Noticed that std.math.isPowerOfTwo got added in #2525 and so I went through and tried to find all instances of that logic and replace it with a call to that function.


Only instance I found that I didn't replace is this one:

if ((d[high] & (d[high] - 1)) == 0) {

because it doesn't currently @import("std") and I wasn't sure if that was okay to add that to that file.

EDIT: Nevermind, it actually did @import("std"), just not at the top. Made that file use std.math.isPowerOfTwo as well.

EDIT#2: Left compiler_rt/udivmod.zig unchanged, see comments.

@andrewrk andrewrk merged commit 05e92a5 into ziglang:master Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants