From 73679119b34874fd888f146288e4bb3bd97c03aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 23 Apr 2015 17:59:44 +0200 Subject: [PATCH] data_storage: Slightly simplify 'load_data_from_text'. The 'current_vs' variable was actually always zero. Thus, the 'vs' array was full of zeros, except for vs[0]. --- sources/core/data_storage.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/sources/core/data_storage.cpp b/sources/core/data_storage.cpp index 9f21602..7d5d6e5 100644 --- a/sources/core/data_storage.cpp +++ b/sources/core/data_storage.cpp @@ -28,7 +28,6 @@ void vertical_segment::load_data_from_text(std::istream& input, vec ymin, ymax; result._nX = 0 ; result._nY = 0 ; - std::vector vs ; int current_vs = 0 ; header header(input); @@ -36,12 +35,6 @@ void vertical_segment::load_data_from_text(std::istream& input, result._nX = dim.first; result._nY = dim.second; - vs.reserve(result.dimY()) ; - for(int k=0; k> min_dt ; linestream >> max_dt ; min_dt = min_dt-v[result.dimX()+i]; max_dt = max_dt-v[result.dimX()+i]; } - else if(vs[i] == 1) + else if(i == 0 && vs_value == 1) { double dt ; linestream >> dt ; -- GitLab