Skip to content

Commit 6e8a93e

Browse files
committed
Field names rather than numbers in getfield
1 parent 196c162 commit 6e8a93e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/metadata.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ Free the MetaT from metadata
229229
i.e. returns the geometry/array of geometries
230230
"""
231231
function metafree(x::MetaT)
232-
getfield(x, 1)
232+
getfield(x, :main)
233233
end
234234
metafree(x::AbstractVector{<: MetaT}) = map(metafree, x)
235235

@@ -241,7 +241,7 @@ metafree(x::AbstractVector{<: MetaT}) = map(metafree, x)
241241
Returns the metadata of a `MetaT`
242242
"""
243243
function meta(x::MetaT)
244-
getfield(x, 2)
244+
getfield(x, :meta)
245245
end
246246
meta(x::AbstractVector{<: MetaT}) = map(meta, x)
247247

0 commit comments

Comments
 (0)