123
123
124
124
function setindex! (h:: OrderedRobinDict{K, V} , v0, key0) where {K,V}
125
125
key = convert (K,key0)
126
-
127
126
v = convert (V, v0)
128
-
129
127
index = get (h. dict, key, - 2 )
130
128
131
129
if index < 0
@@ -215,11 +213,8 @@ get!(collection, key, default)
215
213
216
214
function get! (h:: OrderedRobinDict{K,V} , key0, default) where {K,V}
217
215
key = convert (K,key0)
218
-
219
216
index = get (h. dict, key, - 2 )
220
-
221
217
index > 0 && return h. vals[index]
222
-
223
218
v = convert (V, default)
224
219
setindex! (h, v, key)
225
220
return v
@@ -244,7 +239,6 @@ get!(f::Function, collection, key)
244
239
function get! (default:: Base.Callable , h:: OrderedRobinDict{K,V} , key0) where {K,V}
245
240
key = convert (K,key0)
246
241
index = get (h. dict, key, - 2 )
247
-
248
242
index > 0 && return @inbounds h. vals[index]
249
243
250
244
v = convert (V, default ())
@@ -473,4 +467,4 @@ function merge(combine::Function, d::OrderedRobinDict, others::AbstractDict...)
473
467
merge! (combine, OrderedRobinDict {K,V} (), d, others... )
474
468
end
475
469
476
- isordered (:: Type{T} ) where {T <: OrderedRobinDict } = true
470
+ isordered (:: Type{T} ) where {T <: OrderedRobinDict } = true
0 commit comments