Skip to content

Commit

Permalink
Update IndexedArrays.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
diegozea committed Sep 28, 2015
1 parent 41c6058 commit b916a47
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/IndexedArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ copy{T}(ia::IndexedArray{T}) = IndexedArray{T}(copy(ia.items))

"`swap!(ia::IndexedArray, to::Int, from::Int)` interchange/swap the values on the indices `to` and `from` in the `IndexedArray`"
function swap!(ia::IndexedArray, to::Int, from::Int)
if to == from && checkbounds(ia,to)
if to == from
checkbounds(ia,to)
return ia
end
previous_id = ia[to]
Expand Down

0 comments on commit b916a47

Please sign in to comment.