Skip to content

Commit

Permalink
Avoid copy in features loop
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed May 6, 2016
1 parent 7d75833 commit e02380a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/supercluster.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Supercluster {
#endif
// generate a cluster object for each point
std::size_t i = 0;
for (auto f : features) {
for (const auto &f : features) {
const auto &p = f.geometry.get<GeoJSONPoint>();
Cluster c = { lngX(p.x), latY(p.y), 1, i++ };
clusters.push_back(c);
Expand Down

0 comments on commit e02380a

Please sign in to comment.