Skip to content

Commit 69b38a7

Browse files
committed
replace argument _ with geom
This makes it more clear what the unused argument is supposed to be.
1 parent 2c00af7 commit 69b38a7

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

docs/src/guides/defaults.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ endpoint(geom) = getpoint(geom, length(geom))
3838
In some cases, we know the return value of a function for a specific geometry (sub)type beforehand and have implemented them.
3939

4040
```julia
41-
npoint(::LineTrait, _) = 2
42-
npoint(::TriangleTrait, _) = 3
43-
npoint(::RectangleTrait, _) = 4
44-
npoint(::QuadTrait, _) = 4
45-
npoint(::PentagonTrait, _) = 5
46-
npoint(::HexagonTrait, _) = 6
41+
npoint(::LineTrait, geom) = 2
42+
npoint(::TriangleTrait, geom) = 3
43+
npoint(::RectangleTrait, geom) = 4
44+
npoint(::QuadTrait, geom) = 4
45+
npoint(::PentagonTrait, geom) = 5
46+
npoint(::HexagonTrait, geom) = 6
4747
```

src/fallbacks.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,17 @@ getgeom(t::AbstractGeometryTrait, geom) = (getgeom(t, geom, i) for i in 1:ngeom(
6666
getcoord(t::AbstractPointTrait, geom) = (getcoord(t, geom, i) for i in 1:ncoord(t, geom))
6767

6868
## Npoints
69-
npoint(::LineTrait, _) = 2
70-
npoint(::TriangleTrait, _) = 3
71-
nring(::TriangleTrait, _) = 1
72-
npoint(::RectangleTrait, _) = 4
73-
nring(::RectangleTrait, _) = 1
74-
npoint(::QuadTrait, _) = 4
75-
nring(::QuadTrait, _) = 1
76-
npoint(::PentagonTrait, _) = 5
77-
nring(::PentagonTrait, _) = 1
78-
npoint(::HexagonTrait, _) = 6
79-
nring(::HexagonTrait, _) = 1
69+
npoint(::LineTrait, geom) = 2
70+
npoint(::TriangleTrait, geom) = 3
71+
nring(::TriangleTrait, geom) = 1
72+
npoint(::RectangleTrait, geom) = 4
73+
nring(::RectangleTrait, geom) = 1
74+
npoint(::QuadTrait, geom) = 4
75+
nring(::QuadTrait, geom) = 1
76+
npoint(::PentagonTrait, geom) = 5
77+
nring(::PentagonTrait, geom) = 1
78+
npoint(::HexagonTrait, geom) = 6
79+
nring(::HexagonTrait, geom) = 1
8080

8181
issimple(::AbstractCurveTrait, geom) =
8282
allunique([getpoint(t, geom, i) for i in 1:npoint(geom)-1]) && allunique([getpoint(t, geom, i) for i in 2:npoint(t, geom)])

0 commit comments

Comments
 (0)