Skip to content

Commit

Permalink
Inline set_index!(::BitArray, ::Any, ::Int)
Browse files Browse the repository at this point in the history
Addresses #13914

(cherry picked from commit 73242ec)
ref #13946
  • Loading branch information
carlobaldassi authored and tkelman committed Nov 29, 2015
1 parent 6d2b766 commit 9ee16ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/bitarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ end
end
end

setindex!(B::BitArray, x, i::Int) = (checkbounds(B, i); unsafe_setindex!(B, x, i))
@inline setindex!(B::BitArray, x, i::Int) = (checkbounds(B, i); unsafe_setindex!(B, x, i))
@inline function unsafe_setindex!(B::BitArray, x, i::Int)
unsafe_bitsetindex!(B.chunks, convert(Bool, x), i)
return B
Expand Down

0 comments on commit 9ee16ff

Please sign in to comment.