[Tile-serving] [osm2pgsql] Use std::vector for tags, members and nodes (#331)

Paul Norman notifications at github.com
Mon Apr 13 02:35:08 UTC 2015


> -		return;
> -	}
> -	for (i = 1; i < count; i ++) {
> -		from_line(last_lon, last_lat, nodes[i].lon, nodes[i].lat);
> -		last_lat = nodes[i].lat;
> -		last_lon = nodes[i].lon;
> -	}
> +void expire_tiles::from_nodes_line(const nodelist_t &nodes)
> +{
> +    if (Options->expire_tiles_zoom < 0 || nodes.empty())
> +        return;
> +
> +    if (nodes.size() == 1) {
> +        from_bbox(nodes[0].lon, nodes[0].lat, nodes[0].lon, nodes[0].lat);
> +    } else {
> +        for (int i = 1; i < nodes.size(); ++i)

should this be using an iterator?

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/331/files#r28211737
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20150412/fe1c495b/attachment.html>


More information about the Tile-serving mailing list