Skip to content

Commit c9245c1

Browse files
committed
Use std::swap to swap double instead of using temp variable
1 parent 8988132 commit c9245c1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/expire-tiles.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,7 @@ void expire_tiles::from_line(geom::point_t const &a, geom::point_t const &b)
173173
but for simplicity, treat the coordinates as a bounding box
174174
and expire everything within that box. */
175175
if (y1 > y2) {
176-
double const temp = y2;
177-
y2 = y1;
178-
y1 = temp;
176+
std::swap(y1, y2);
179177
}
180178
for (int x = x1 - tile_expiry_leeway; x <= x2 + tile_expiry_leeway;
181179
++x) {

0 commit comments

Comments
 (0)