Skip to content

Commit

Permalink
Remove some spurious where T from SA constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
c42f committed Sep 27, 2019
1 parent 5005108 commit ed5444e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/initializers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const SA_F64 = SA{Float64}
Base.@pure _SA_type(sa::Type{SA}, len::Int) = SVector{len}
Base.@pure _SA_type(sa::Type{SA{T}}, len::Int) where {T} = SVector{len,T}

@inline Base.getindex(sa::Type{<:SA}, xs...) where T = similar_type(sa, Size(length(xs)))(xs)
@inline Base.typed_vcat(sa::Type{<:SA}, xs::Number...) where T = similar_type(sa, Size(length(xs)))(xs)
@inline Base.typed_hcat(sa::Type{<:SA}, xs::Number...) where T = similar_type(sa, Size(1,length(xs)))(xs)
@inline Base.getindex(sa::Type{<:SA}, xs...) = similar_type(sa, Size(length(xs)))(xs)
@inline Base.typed_vcat(sa::Type{<:SA}, xs::Number...) = similar_type(sa, Size(length(xs)))(xs)
@inline Base.typed_hcat(sa::Type{<:SA}, xs::Number...) = similar_type(sa, Size(1,length(xs)))(xs)

Base.@pure function _SA_hvcat_transposed_size(rows)
M = rows[1]
Expand All @@ -43,7 +43,7 @@ Base.@pure function _SA_hvcat_transposed_size(rows)
Size(M, length(rows))
end

@inline function Base.typed_hvcat(sa::Type{<:SA}, rows::Dims, xs::Number...) where T
@inline function Base.typed_hvcat(sa::Type{<:SA}, rows::Dims, xs::Number...)
msize = _SA_hvcat_transposed_size(rows)
if msize === nothing
throw(ArgumentError("SA[...] matrix rows of length $rows are inconsistent"))
Expand Down

0 comments on commit ed5444e

Please sign in to comment.