| version 1.11 | version 1.12 |
|---|
| |
| | // -*- c++ -*- |
| | |
| | // This file is part of the Collective Variables module (Colvars). |
| | // The original version of Colvars and its updates are located at: |
| | // https://github.com/colvars/colvars |
| | // Please update all Colvars source files before making any changes. |
| | // If you wish to distribute your changes, please submit them to the |
| | // Colvars repository at GitHub. |
| | |
| | |
| #include <sstream> | #include <sstream> |
| |
| | |
| std::string line; | std::string line; |
| std::istringstream is(conf); | std::istringstream is(conf); |
| while (std::getline(is, line)) { | while (cvm::getline(is, line)) { |
| if (line.size() == 0) | if (line.size() == 0) |
| continue; | continue; |
| if (line.find_first_not_of(white_space) == | if (line.find_first_not_of(white_space) == |
| |
| | |
| | |
| std::istream & colvarparse::getline_nocomments(std::istream &is, | std::istream & colvarparse::getline_nocomments(std::istream &is, |
| std::string &line, | std::string &line) |
| char const delim) | |
| { | { |
| std::getline(is, line, delim); | cvm::getline(is, line); |
| size_t const comment = line.find('#'); | size_t const comment = line.find('#'); |
| if (comment != std::string::npos) { | if (comment != std::string::npos) { |
| line.erase(comment); | line.erase(comment); |