Skip to content

Commit 0c1ec02

Browse files
committed
Fix the final two exhaustive lint check cases with nolint tags.
1 parent 4e3cd3f commit 0c1ec02

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

s2/edge_crosser.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,13 @@ func (e *EdgeCrosser) ChainCrossingSign(d Point) Crossing {
149149
func (e *EdgeCrosser) EdgeOrVertexChainCrossing(d Point) bool {
150150
// We need to copy e.c since it is clobbered by ChainCrossingSign.
151151
c := e.c
152-
switch e.ChainCrossingSign(d) { // nolint exhaustive - the missing case is the final return.
152+
switch e.ChainCrossingSign(d) {
153153
case DoNotCross:
154154
return false
155155
case Cross:
156156
return true
157+
case MaybeCross:
158+
// fall through
157159
}
158160
return VertexCrossing(e.a, e.b, c, d)
159161
}

s2/shapeindex.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ func (s *ShapeIndex) updateEdges(pcell *PaddedCell, edges []*clippedEdge, t *tra
10261026
// the existing cell contents by absorbing the cell.
10271027
iter := s.Iterator()
10281028
r := iter.LocateCellID(pcell.id)
1029-
switch r { // nolint exhaustive
1029+
switch r {
10301030
case Disjoint:
10311031
disjointFromIndex = true
10321032
case Indexed:
@@ -1035,7 +1035,7 @@ func (s *ShapeIndex) updateEdges(pcell *PaddedCell, edges []*clippedEdge, t *tra
10351035
s.absorbIndexCell(pcell, iter, edges, t)
10361036
indexCellAbsorbed = true
10371037
disjointFromIndex = true
1038-
default:
1038+
case Subdivided:
10391039
// TODO(rsned): Figure out the right way to deal with
10401040
// this case since we don't DCHECK.
10411041
// ABSL_DCHECK_EQ(SUBDIVIDED, r)

0 commit comments

Comments
 (0)