Skip to content

Commit

Permalink
avoid calling f twice (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkamins authored Aug 12, 2021
1 parent 35ecfd1 commit 095ea81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PooledArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ function Base.map(f, x::PooledArray{T,R}) where {T,R<:Integer}
end
refarray = map(x->translate[x], x.refs)
else
newinvpool = Dict(zip(map(f, ks), vs))
newinvpool = Dict(zip(ks1, vs))
refarray = copy(x.refs)
end
return PooledArray(RefArray(refarray), newinvpool)
Expand Down

0 comments on commit 095ea81

Please sign in to comment.