diff --git a/Grid/serialisation/VectorUtils.h b/Grid/serialisation/VectorUtils.h index a5a739923..dd5ff0b87 100644 --- a/Grid/serialisation/VectorUtils.h +++ b/Grid/serialisation/VectorUtils.h @@ -432,12 +432,10 @@ namespace Grid { std::vector strToVec(const std::string s) { std::istringstream sstr(s); - T buf; std::vector v; - while(!sstr.eof()) + for(T buf; sstr >> buf;) { - sstr >> buf; v.push_back(buf); }