@@ -11,14 +11,14 @@ const BadArgs = Args{<:Tuple{Tuple{<:Tuple}}}
1111
1212# Some help functions.
1313@pure has_ndims (:: Type{<:StaticArray{<:Tuple,<:Any,N}} ) where {N} = @isdefined N
14- @pure has_ndims (:: Type{<:StaticArray} ) = false
14+ has_ndims (:: Type{<:StaticArray} ) = false
1515if VERSION < v " 1.7"
1616 Base. ndims (:: Type{<:StaticArray{<:Tuple,<:Any,N}} ) where {N} = N
1717end
1818@pure has_eltype (:: Type{<:StaticArray{<:Tuple,T}} ) where {T} = @isdefined T
19- @pure has_eltype (:: Type{<:StaticArray} ) = false
19+ has_eltype (:: Type{<:StaticArray} ) = false
2020@pure has_size (:: Type{<:StaticArray{S}} ) where {S<: Tuple } = @isdefined S
21- @pure has_size (:: Type{<:StaticArray} ) = false
21+ has_size (:: Type{<:StaticArray} ) = false
2222# workaround for https://github.com/JuliaArrays/StaticArrays.jl/issues/1047
2323has_size (:: Type{SVector} ) = false
2424has_size (:: Type{MVector} ) = false
@@ -28,10 +28,10 @@ has_size(::Type{SMatrix{N}}) where {N} = false
2828has_size (:: Type{MMatrix{N}} ) where {N} = false
2929
3030@pure has_size1 (:: Type{<:StaticMatrix{M}} ) where {M} = @isdefined M
31- @pure has_size1 (:: Type{<:StaticMatrix} ) = false
31+ has_size1 (:: Type{<:StaticMatrix} ) = false
3232_size1 (:: Type{<:StaticMatrix{M}} ) where {M} = M
3333@generated function _sqrt (:: Length{L} ) where {L}
34- N = round (Int, sqrt (L) )
34+ N = isqrt (L )
3535 N^ 2 == L && return :($ N)
3636 throw (DimensionMismatch (" Input's length must be perfect square" ))
3737end
0 commit comments