aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--barchart.cpp3
-rw-r--r--scatterplot.cpp3
-rw-r--r--voronoisplat.cpp1
3 files changed, 2 insertions, 5 deletions
diff --git a/barchart.cpp b/barchart.cpp
index ba68843..8eab073 100644
--- a/barchart.cpp
+++ b/barchart.cpp
@@ -52,8 +52,7 @@ void BarChart::setValues(const arma::vec &values)
m_values = values;
if (m_selection.size() != m_values.n_elem) {
- m_selection.resize(m_values.n_elem);
- m_selection.assign(m_selection.size(), false);
+ m_selection.assign(m_values.n_elem, false);
}
m_originalIndices.resize(m_values.n_elem);
diff --git a/scatterplot.cpp b/scatterplot.cpp
index 021456b..460e738 100644
--- a/scatterplot.cpp
+++ b/scatterplot.cpp
@@ -111,8 +111,7 @@ void Scatterplot::setXY(const arma::mat &xy)
updateQuadTree();
if (m_selection.size() != m_xy.n_rows) {
- m_selection.resize(m_xy.n_rows);
- m_selection.assign(m_selection.size(), false);
+ m_selection.assign(m_xy.n_rows, false);
}
if (m_opacityData.n_elem != m_xy.n_rows) {
diff --git a/voronoisplat.cpp b/voronoisplat.cpp
index 15bb9bd..3e21e67 100644
--- a/voronoisplat.cpp
+++ b/voronoisplat.cpp
@@ -48,7 +48,6 @@ void VoronoiSplat::setSites(const arma::mat &points)
if (m_values.size() > 0 && m_values.size() != points.n_rows) {
// Old values are no longer valid, clean up
- m_values.resize(points.n_rows);
m_values.assign(points.n_rows, 0);
}