Skip to content

Commit 78c50c3

Browse files
authored
Merge pull request #4 from rdeits/sa-update
update to new StaticArrays Size trait requirement
2 parents 5086e17 + 11aac17 commit 78c50c3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
julia 0.5
2-
StaticArrays 0.1
2+
StaticArrays 0.3
33
Iterators 0.2

src/RegionTrees.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ __precompile__()
33
module RegionTrees
44

55
using StaticArrays
6-
import StaticArrays: similar_type
6+
import StaticArrays: similar_type, Size
77
using Iterators: chain
8-
import Base: show, size, getindex, convert, parent
8+
import Base: show, size, getindex, convert, parent, @pure
99
export Cell,
1010
split!,
1111
isleaf,

src/twosarray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ end
1414
:(TwosArray{$N, T, L}(x))
1515
end
1616

17-
@generated size{N, T, L}(::Type{TwosArray{N, T, L}}) = Expr(:tuple, [2 for i in 1:N]...)
17+
@pure Size{N, T, L}(::Type{TwosArray{N, T, L}}) = Size(ntuple(i -> 2, Val{N}))
1818
getindex(b::TwosArray, i::Integer) = b.data[i]
1919

2020
"""

0 commit comments

Comments
 (0)