diff options
author | Thomas White <taw@physics.org> | 2024-04-24 16:24:55 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2024-04-24 16:24:55 +0200 |
commit | 35028ce34d3e31f23873730cd55e01b36b2cc1e2 (patch) | |
tree | 4af714381add47392d56325375016fe9c0250cf9 /julia/CrystFEL | |
parent | d7329d0a207cd17cde5651abd989a66c1b5da82c (diff) |
Julia: Avoid making a list of Nothing
The type of the list needs to be correct, otherwise we can't push to it
later.
Diffstat (limited to 'julia/CrystFEL')
-rw-r--r-- | julia/CrystFEL/src/image.jl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/julia/CrystFEL/src/image.jl b/julia/CrystFEL/src/image.jl index 4090dc61..5ce056bd 100644 --- a/julia/CrystFEL/src/image.jl +++ b/julia/CrystFEL/src/image.jl @@ -55,7 +55,7 @@ mutable struct Image internalptr::Ptr{InternalImage} peaklist::Union{Nothing,PeakList} crystals - reflists + reflists::Vector{Union{Nothing,RefList}} end @@ -99,7 +99,7 @@ function makecrystallist(image, listptr, n) end image.crystals = map(x->x.crystal, crystals) - image.reflists = map(x->x.reflections, crystals) + image.reflists = Vector{Union{Nothing,RefList}}(map(x->x.reflections, crystals)) return crystals end |