Fix some missing flushers

This commit is contained in:
Mael Rouxel-Labbé 2020-10-13 18:02:28 +02:00
parent 1520c8bc61
commit ec71a79fdf
9 changed files with 15 additions and 8 deletions

View File

@ -309,7 +309,7 @@ bool write_GOCAD(std::ostream& os,
os << "GOCAD TSurf 1\n"
"HEADER {\n"
"name:";
os << name << std::endl;
os << name << "\n";
os << "*border:on\n"
"*border*bstone:on\n"
"}\n"

View File

@ -439,6 +439,8 @@ bool write_PLY(std::ostream& os,
}
}
os << std::flush; // write() doesn't flush
return os.good();
}

View File

@ -279,6 +279,7 @@ bool write_STL(std::ostream& os,
os.write(reinterpret_cast<const char *>(&coords[i]), sizeof(coords[i]));
os << " ";
}
os << std::flush;
}
else
{
@ -295,7 +296,7 @@ bool write_STL(std::ostream& os,
os << "vertex " << p << "\n";
os << "vertex " << q << "\n";
os << "vertex " << r << "\n";
os << "endloop\nendfacet" << std::endl;
os << "endloop\nendfacet" << "\n";
}
os << "endsolid" << std::endl;
}

View File

@ -473,7 +473,7 @@ bool write_VTP(std::ostream& os,
IO::internal::write_polys_points(os, g, np);
IO::internal::write_polys(os, g, np);
}
os << "</VTKFile>\n";
os << "</VTKFile>" << std::endl;
return os.good();
}

View File

@ -79,9 +79,11 @@ bool write_OFF_PSP(std::ostream& os,
os << get(point_map, *it);
if (has_normals)
os << " " << get(normal_map, *it);
os << std::endl;
os << "\n";
}
os << std::flush;
return !os.fail();
}

View File

@ -76,9 +76,11 @@ bool write_XYZ_PSP(std::ostream& os,
os << get(point_map, *it);
if(has_normals)
os << " " << get(normal_map, *it);
os << std::endl;
os << "\n";
}
os << std::flush;
return !os.fail();
}

View File

@ -305,7 +305,7 @@ bool write_GOCAD(std::ostream& os,
os << "GOCAD TSurf 1\n"
"HEADER {\n"
"name:";
os << fname << std::endl;
os << fname << "\n";
os << "*border:on\n"
"*border*bstone:on\n"
"}\n"

View File

@ -346,7 +346,7 @@ bool write_STL(std::ostream& os,
os << "vertex " << p << "\n";
os << "vertex " << q << "\n";
os << "vertex " << r << "\n";
os << "endloop\nendfacet"<<std::endl;
os << "endloop\nendfacet\n";
}
os << "endsolid"<<std::endl;
}

View File

@ -434,7 +434,7 @@ bool write_VTP(std::ostream& os,
IO::internal::write_soup_polys_points(os, points);
IO::internal::write_soup_polys(os, polygons,size_map, cell_type);
}
os << "</VTKFile>\n";
os << "</VTKFile>" << std::endl;
}
/// \cond SKIP_IN_MANUAL