summaryrefslogtreecommitdiff
path: root/src/Alpha_complex/include/gudhi/Alpha_complex.h
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-09-30 09:18:36 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-09-30 09:18:36 +0200
commitc1b317640f81fefff7f7a774b239957fb632fa43 (patch)
tree697fbce8e859903d52b8f1067556340d5f35ca42 /src/Alpha_complex/include/gudhi/Alpha_complex.h
parentdab93ead76f1435f6b74937ef0377aafb0517439 (diff)
code review: emplace_back versus push_back
Diffstat (limited to 'src/Alpha_complex/include/gudhi/Alpha_complex.h')
-rw-r--r--src/Alpha_complex/include/gudhi/Alpha_complex.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex.h b/src/Alpha_complex/include/gudhi/Alpha_complex.h
index a692dbc6..4f8e3d54 100644
--- a/src/Alpha_complex/include/gudhi/Alpha_complex.h
+++ b/src/Alpha_complex/include/gudhi/Alpha_complex.h
@@ -310,7 +310,7 @@ class Alpha_complex {
thread_local std::vector<Point_d> v;
v.clear();
for (auto vertex : cplx.simplex_vertex_range(s))
- v.push_back(get_point_(vertex));
+ v.emplace_back(get_point_(vertex));
cache_.emplace_back(kernel_.get_sphere(v.cbegin(), v.cend()));
}
return cache_[k];
@@ -326,7 +326,7 @@ class Alpha_complex {
thread_local std::vector<Point_d> v;
v.clear();
for (auto vertex : cplx.simplex_vertex_range(s))
- v.push_back(get_point_(vertex));
+ v.emplace_back(get_point_(vertex));
return kernel_.get_squared_radius(v.cbegin(), v.cend());
}
@@ -394,7 +394,7 @@ class Alpha_complex {
std::clog << " " << (*vit)->data();
#endif // DEBUG_TRACES
// Vector of vertex construction for simplex_tree structure
- vertexVector.push_back((*vit)->data());
+ vertexVector.emplace_back((*vit)->data());
}
}
#ifdef DEBUG_TRACES