Skip to content

Commit

Permalink
Make receiver names consistent to satisfy golint
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Feb 17, 2016
1 parent 3ade7d3 commit 40378ea
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 42 deletions.
6 changes: 3 additions & 3 deletions bounds.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ func (b *Bounds) Min(dim int) float64 {
return b.min[dim]
}

// Overlaps returns true if b1 overlaps b2 in layout.
func (b1 *Bounds) Overlaps(layout Layout, b2 *Bounds) bool {
// Overlaps returns true if b overlaps b2 in layout.
func (b *Bounds) Overlaps(layout Layout, b2 *Bounds) bool {
for i, stride := 0, layout.Stride(); i < stride; i++ {
if b1.min[i] > b2.max[i] || b1.max[i] < b2.min[i] {
if b.min[i] > b2.max[i] || b.max[i] < b2.min[i] {
return false
}
}
Expand Down
8 changes: 4 additions & 4 deletions flat_geom0.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ func (g *geom0) Reserve(n int) {
}
}

func (g1 *geom0) swap(g2 *geom0) {
g1.stride, g2.stride = g2.stride, g1.stride
g1.layout, g2.layout = g2.layout, g1.layout
g1.flatCoords, g2.flatCoords = g2.flatCoords, g1.flatCoords
func (g *geom0) swap(g2 *geom0) {
g.stride, g2.stride = g2.stride, g.stride
g.layout, g2.layout = g2.layout, g.layout
g.flatCoords, g2.flatCoords = g2.flatCoords, g.flatCoords
}

func (g *geom0) setCoords(coords0 []float64) error {
Expand Down
8 changes: 4 additions & 4 deletions flat_geom1.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ func (g *geom1) setCoords(coords1 []Coord) error {
return nil
}

func (g1 *geom1) swap(g2 *geom1) {
g1.stride, g2.stride = g2.stride, g1.stride
g1.layout, g2.layout = g2.layout, g1.layout
g1.flatCoords, g2.flatCoords = g2.flatCoords, g1.flatCoords
func (g *geom1) swap(g2 *geom1) {
g.stride, g2.stride = g2.stride, g.stride
g.layout, g2.layout = g2.layout, g.layout
g.flatCoords, g2.flatCoords = g2.flatCoords, g.flatCoords
}

func (g *geom1) verify() error {
Expand Down
10 changes: 5 additions & 5 deletions flat_geom2.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ func (g *geom2) setCoords(coords2 [][]Coord) error {
return nil
}

func (g1 *geom2) swap(g2 *geom2) {
g1.stride, g2.stride = g2.stride, g1.stride
g1.layout, g2.layout = g2.layout, g1.layout
g1.flatCoords, g2.flatCoords = g2.flatCoords, g1.flatCoords
g1.ends, g2.ends = g2.ends, g1.ends
func (g *geom2) swap(g2 *geom2) {
g.stride, g2.stride = g2.stride, g.stride
g.layout, g2.layout = g2.layout, g.layout
g.flatCoords, g2.flatCoords = g2.flatCoords, g.flatCoords
g.ends, g2.ends = g2.ends, g.ends
}

func (g *geom2) verify() error {
Expand Down
10 changes: 5 additions & 5 deletions flat_geom3.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ func (g *geom3) setCoords(coords3 [][][]Coord) error {
return nil
}

func (g1 *geom3) swap(g2 *geom3) {
g1.stride, g2.stride = g2.stride, g1.stride
g1.layout, g2.layout = g2.layout, g1.layout
g1.flatCoords, g2.flatCoords = g2.flatCoords, g1.flatCoords
g1.endss, g2.endss = g2.endss, g1.endss
func (g *geom3) swap(g2 *geom3) {
g.stride, g2.stride = g2.stride, g.stride
g.layout, g2.layout = g2.layout, g.layout
g.flatCoords, g2.flatCoords = g2.flatCoords, g.flatCoords
g.endss, g2.endss = g2.endss, g.endss
}

func (g *geom3) verify() error {
Expand Down
6 changes: 3 additions & 3 deletions linearring.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (lr *LinearRing) SetCoords(coords []Coord) (*LinearRing, error) {
return lr, nil
}

// Swap swaps the values of lr1 and lr2.
func (lr1 *LinearRing) Swap(lr2 *LinearRing) {
lr1.geom1.swap(&lr2.geom1)
// Swap swaps the values of lr and lr2.
func (lr *LinearRing) Swap(lr2 *LinearRing) {
lr.geom1.swap(&lr2.geom1)
}
6 changes: 3 additions & 3 deletions linestring.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (ls *LineString) SubLineString(start, stop int) *LineString {
return NewLineStringFlat(ls.layout, ls.flatCoords[start*ls.stride:stop*ls.stride])
}

// Swap swaps the values of ls1 and ls2.
func (ls1 *LineString) Swap(ls2 *LineString) {
ls1.geom1.swap(&ls2.geom1)
// Swap swaps the values of ls and ls2.
func (ls *LineString) Swap(ls2 *LineString) {
ls.geom1.swap(&ls2.geom1)
}
6 changes: 3 additions & 3 deletions multilinestring.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (mls *MultiLineString) SetCoords(coords [][]Coord) (*MultiLineString, error
return mls, nil
}

// Swap swaps the values of mls1 and mls2.
func (mls1 *MultiLineString) Swap(mls2 *MultiLineString) {
mls1.geom2.swap(&mls2.geom2)
// Swap swaps the values of mls and mls2.
func (mls *MultiLineString) Swap(mls2 *MultiLineString) {
mls.geom2.swap(&mls2.geom2)
}
6 changes: 3 additions & 3 deletions multipoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (mp *MultiPoint) Push(p *Point) error {
return nil
}

// Swap swaps the values of mp1 and mp2.
func (mp1 *MultiPoint) Swap(mp2 *MultiPoint) {
mp1.geom1.swap(&mp2.geom1)
// Swap swaps the values of mp and mp2.
func (mp *MultiPoint) Swap(mp2 *MultiPoint) {
mp.geom1.swap(&mp2.geom1)
}
6 changes: 3 additions & 3 deletions multipolygon.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (mp *MultiPolygon) SetCoords(coords [][][]Coord) (*MultiPolygon, error) {
return mp, nil
}

// Swap swaps the values of mp1 and mp2.
func (mp1 *MultiPolygon) Swap(mp2 *MultiPolygon) {
mp1.geom3.swap(&mp2.geom3)
// Swap swaps the values of mp and mp2.
func (mp *MultiPolygon) Swap(mp2 *MultiPolygon) {
mp.geom3.swap(&mp2.geom3)
}
6 changes: 3 additions & 3 deletions point.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (p *Point) SetCoords(coords Coord) (*Point, error) {
return p, nil
}

// Swap swaps the values of p1 and p2.
func (p1 *Point) Swap(p2 *Point) {
p1.geom0.swap(&p2.geom0)
// Swap swaps the values of p and p2.
func (p *Point) Swap(p2 *Point) {
p.geom0.swap(&p2.geom0)
}
6 changes: 3 additions & 3 deletions polygon.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (p *Polygon) SetCoords(coords [][]Coord) (*Polygon, error) {
return p, nil
}

// Swap swaps the values of p1 and p2.
func (p1 *Polygon) Swap(p2 *Polygon) {
p1.geom2.swap(&p2.geom2)
// Swap swaps the values of p and p2.
func (p *Polygon) Swap(p2 *Polygon) {
p.geom2.swap(&p2.geom2)
}

0 comments on commit 40378ea

Please sign in to comment.