Skip to content

Commit 23e8f36

Browse files
committed
Val{N}() -> Val(N)
1 parent 8e37323 commit 23e8f36

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/FixedSizeArrays.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ end
6666

6767

6868
function unit(::Type{T}, i::Integer) where T <: StaticVector
69-
T(ntuple(Val{length(T)}) do j
69+
T(ntuple(Val(length(T))) do j
7070
ifelse(i == j, 1, 0)
7171
end)
7272
end
@@ -111,20 +111,20 @@ macro fixed_vector(name, parent)
111111
# Array constructor
112112
@inline function (::Type{$(name){S}})(x::AbstractVector{T}) where {S, T}
113113
@assert S <= length(x)
114-
$(name){S, T}(ntuple(i-> x[i], Val{S}()))
114+
$(name){S, T}(ntuple(i-> x[i], Val(S)))
115115
end
116116
@inline function (::Type{$(name){S, T1}})(x::AbstractVector{T2}) where {S, T1, T2}
117117
@assert S <= length(x)
118-
$(name){S, T1}(ntuple(i-> T1(x[i]), Val{S}()))
118+
$(name){S, T1}(ntuple(i-> T1(x[i]), Val(S)))
119119
end
120120

121121
@inline function (::Type{$(name){S, T}})(x) where {S, T}
122-
$(name){S, T}(ntuple(i-> T(x), Val{S}()))
122+
$(name){S, T}(ntuple(i-> T(x), Val(S)))
123123
end
124124

125125

126126
@inline function (::Type{$(name){S}})(x::T) where {S, T}
127-
$(name){S, T}(ntuple(i-> x, Val{S}()))
127+
$(name){S, T}(ntuple(i-> x, Val(S)))
128128
end
129129
@inline function (::Type{$(name){1, T}})(x::T) where T
130130
$(name){1, T}((x,))

0 commit comments

Comments
 (0)