Skip to content

Commit

Permalink
Merge pull request #1 from timbitz/patch-1
Browse files Browse the repository at this point in the history
Force Int casting of char key
  • Loading branch information
timbitz authored May 21, 2017
2 parents b6cc5b8 + c2bb51e commit 02908d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sais.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ type IntArray
pos::Int
end
import Base: getindex, setindex!
getindex(a::IntArray,key) = a.a[a.pos + key]
setindex!(a::IntArray,value,key) = a.a[a.pos + key] = value
getindex(a::IntArray,key) = a.a[a.pos + Int(key)]
setindex!(a::IntArray,value,key) = a.a[a.pos + Int(key)] = value

# "banana" = [5 3 1 0 4 2]
# "banana" = [6, 4, 2, 1, 5, 3]
Expand Down

0 comments on commit 02908d4

Please sign in to comment.