Skip to content

Commit

Permalink
Make default getcoords() implementation more precise.
Browse files Browse the repository at this point in the history
  • Loading branch information
richardreeve committed Feb 19, 2019
1 parent 70688c1 commit d58ff6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/DataTypes.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Compat: Nothing
"""
AbstractThings
Expand Down
4 changes: 3 additions & 1 deletion src/Interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ thingnames(asm::AbstractAssemblage, args...) = thingnames(things(asm), args...)
# accessing cache

# Methods for AbstractPlaces
getcoords(plc::AbstractPlaces) = plc # Pure places generate their own fake location data
getcoords(plc::AbstractPlaces{Nothing}) = plc # Pure places generate their own fake location data
getcoords(plc::AbstractPlaces{<: AbstractLocationData}) =
error("function not defined for $(typeof(plc))")
coordinates(plc::AbstractPlaces) = error("function not defined for $(typeof(plc))")

# Methods for AbstractGrid
Expand Down

0 comments on commit d58ff6b

Please sign in to comment.