Insist on axisattrcache being private, added types

This commit is contained in:
t-bltg 2021-08-28 14:26:00 +02:00 committed by GitHub
parent aa55ce6ffd
commit c47567b9bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1215,14 +1215,15 @@ function mesh3d_triangles(x, y, z, cns)
return X, Y, Z return X, Y, Z
end end
axisattrcache = Dict{Symbol, Dict{Symbol, Symbol}}() _axisattrcache = Dict{Symbol, Dict{Symbol, Symbol}}()
get_axis_attr(letter, keyword::String) = get_axis_attr(letter, Symbol(keyword)) get_axis_attr(letter::Symbol, keyword::String) = get_axis_attr(letter, Symbol(keyword))
function get_axis_attr(letter, keyword)
lt = if haskey(axisattrcache, letter) function get_axis_attr(letter::Symbol, keyword::Symbol)
axisattrcache[letter] lt = if haskey(_axisattrcache, letter)
_axisattrcache[letter]
else else
axisattrcache[letter] = Dict{Symbol, Symbol}() _axisattrcache[letter] = Dict{Symbol, Symbol}()
end end
lk = if haskey(lt, keyword) lk = if haskey(lt, keyword)