Merge pull request #6454 from afabri/Stream_support-call_string_clear-GF

Stream_support: Make line a data member and call clear()
This commit is contained in:
Laurent Rineau 2022-03-31 16:57:58 +02:00
commit 362c30f1bd
1 changed files with 3 additions and 2 deletions

View File

@ -37,6 +37,7 @@ class File_scanner_OFF
std::vector<double> entries;
std::size_t color_entries;
std::size_t first_color_index;
std::string line;
std::istream& m_in;
bool normals_read;
@ -78,7 +79,7 @@ public:
else
{
skip_comment();
std::string line;
line.clear();
std::getline(m_in, line);
// First remove the comment if there is one
std::size_t pos = line.find('#');
@ -692,7 +693,7 @@ public:
else
{
skip_comment();
std::string line;
line.clear();
std::getline(m_in, line);
// First remove the comment if there is one
std::size_t pos = line.find('#');