From dd4a2451208bfc9814ea4f8c3bcbf54d033626de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Traizet?= <cedric.traizet@c-s.fr> Date: Tue, 6 Aug 2019 17:09:02 +0200 Subject: [PATCH] PERF: initialize the variable length vector with a size parameter --- .../AppClassification/include/otbVectorPrediction.hxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Modules/Applications/AppClassification/include/otbVectorPrediction.hxx b/Modules/Applications/AppClassification/include/otbVectorPrediction.hxx index d4de8f2a70..20d8d357aa 100644 --- a/Modules/Applications/AppClassification/include/otbVectorPrediction.hxx +++ b/Modules/Applications/AppClassification/include/otbVectorPrediction.hxx @@ -87,8 +87,7 @@ void VectorPrediction<RegressionMode>::DoExecute() for (auto const& feature : layer) { - MeasurementType mv; - mv.SetSize(nbFeatures); + MeasurementType mv(nbFeatures); for (int idx = 0; idx < nbFeatures; ++idx) { // Beware that itemIndex differs from ogr layer field index -- GitLab