Skip to content

Commit

Permalink
cosmetic: getfield(a, :size) -> a.size (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsajko authored Apr 30, 2024
1 parent 3ad7e14 commit 43de14c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FixedSizeArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Base.IndexStyle(::Type{<:FixedSizeArray}) = IndexLinear()
Base.@propagate_inbounds Base.getindex(A::FixedSizeArray, i::Int) = A.mem[i]
Base.@propagate_inbounds Base.setindex!(A::FixedSizeArray, v, i::Int) = A.mem[i] = v

Base.size(a::FixedSizeArray) = getfield(a, :size)
Base.size(a::FixedSizeArray) = a.size

function Base.similar(::FixedSizeArray, ::Type{S}, size::NTuple{N,Int}) where {S,N}
FixedSizeArray{S,N}(undef, size)
Expand Down

0 comments on commit 43de14c

Please sign in to comment.