Commit 2dce1916 authored by Martin Schultz's avatar Martin Schultz

* made STLReader reuse stringstreams

parent ebd5180a
......@@ -249,6 +249,9 @@ read_stla(std::istream& _in, BaseImporter& _bi, Options& _opt) const
std::string line;
static std::string garbage;
static std::stringstream strstream;
bool facet_normal(false);
while( _in && !_in.eof() ) {
......@@ -265,9 +268,8 @@ read_stla(std::istream& _in, BaseImporter& _bi, Options& _opt) const
// Normal found?
if (line.find("facet normal") != std::string::npos) {
std::stringstream strstream(line);
std::string garbage;
strstream.str(line);
strstream.clear();
// facet
strstream >> garbage;
......@@ -292,9 +294,9 @@ read_stla(std::istream& _in, BaseImporter& _bi, Options& _opt) const
std::getline(_in, line);
trimStdString(line);
std::stringstream strstream(line);
strstream.str(line);
strstream.clear();
std::string garbage;
strstream >> garbage;
strstream >> v[0];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment