Skip to content

Commit

Permalink
allow to call save_binary_file on non-C3t3 type (like a CDT_3)
Browse files Browse the repository at this point in the history
  • Loading branch information
lrineau committed Jun 10, 2024
1 parent 2c13f1f commit c10dcf7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions SMDS_3/include/CGAL/IO/File_binary_mesh_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,13 @@ save_binary_file(std::ostream& os,
, bool binary = true)
#endif
{
typedef typename C3T3::Triangulation::Geom_traits::FT FT;
if(binary) os << "binary ";
os << "CGAL c3t3 " << CGAL::Get_io_signature<C3T3>()() << "\n";
if(binary) {
CGAL::IO::set_binary_mode(os);
} else {
CGAL::IO::set_ascii_mode(os);
os.precision(std::numeric_limits<FT>::digits10+2);
os.precision(std::numeric_limits<double>::max_digits10);
}
return !!(os << c3t3);
// call operator!() twice, because operator bool() is C++11
Expand Down

0 comments on commit c10dcf7

Please sign in to comment.