Skip to content

Commit 221195d

Browse files
committed
cosmetic fixes (tkelman)
1 parent 7f062ec commit 221195d

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

base/array.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,16 +1055,16 @@ end
10551055

10561056
const BitIntegerArray{N} = Union{map(T->Array{T,N}, BitInteger_types)...} where N
10571057
# use memcmp for == on bit integer types
1058-
function ==(a::A, b::A) where A <: BitIntegerArray
1058+
function ==(a::Arr, b::Arr) where Arr <: BitIntegerArray
10591059
size(a) == size(b) && 0 == ccall(
1060-
:memcmp, Int32, (Ptr{Void}, Ptr{Void}, UInt), a, b, sizeof(eltype(A)) * length(a))
1060+
:memcmp, Int32, (Ptr{Void}, Ptr{Void}, UInt), a, b, sizeof(eltype(Arr)) * length(a))
10611061
end
10621062

10631063
# this is ~20% faster than the generic implementation above for very small arrays
1064-
function ==(a::A, b::A) where A <: BitIntegerArray{1}
1064+
function ==(a::Arr, b::Arr) where Arr <: BitIntegerArray{1}
10651065
len = length(a)
10661066
len == length(b) && 0 == ccall(
1067-
:memcmp, Int32, (Ptr{Void}, Ptr{Void}, UInt), a, b, sizeof(eltype(A)) * len)
1067+
:memcmp, Int32, (Ptr{Void}, Ptr{Void}, UInt), a, b, sizeof(eltype(Arr)) * len)
10681068
end
10691069

10701070
function reverse(A::AbstractVector, s=first(linearindices(A)), n=last(linearindices(A)))

base/random.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ const BoolBitIntegerType = Union{Type{Bool},BitIntegerType}
3333
const BoolBitIntegerArray = Union{Array{Bool},Base.BitIntegerArray}
3434

3535
if is_windows()
36-
3736
struct RandomDevice <: AbstractRNG
3837
buffer::Vector{UInt128}
3938

@@ -46,9 +45,7 @@ if is_windows()
4645
end
4746

4847
rand!(rd::RandomDevice, A::BoolBitIntegerArray) = (win32_SystemFunction036!(A); A)
49-
5048
else # !windows
51-
5249
struct RandomDevice <: AbstractRNG
5350
file::IOStream
5451
unlimited::Bool
@@ -568,7 +565,7 @@ function rand!(r::MersenneTwister, A::Array{UInt128}, n::Int=length(A))
568565
A
569566
end
570567

571-
# A::Array{UInt128} will matche the specialized method above
568+
# A::Array{UInt128} will match the specialized method above
572569
function rand!(r::MersenneTwister, A::Base.BitIntegerArray)
573570
n=length(A)
574571
T = eltype(A)

0 commit comments

Comments
 (0)