File tree 2 files changed +9
-2
lines changed
Mesh_2/doc/Mesh_2/CGAL/IO
Stream_support/include/CGAL/IO/VTK
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ namespace IO {
6
6
// !
7
7
// ! The faces output are those for which `DelaunayMeshFaceBase_2::is_in_domain()` returns `true`,
8
8
// ! the edges are those for which `ConstrainedTriangulationFaceBase_2::is_constrained()` returns `true`.
9
+ // !\attention To read a binary file, the flag `std::ios::binary` must be set during the creation of `os`.
10
+ // !
9
11
// ! \tparam CDT a `Constrained_Delaunay_triangulation_2` with face type model of `DelaunayMeshFaceBase_2`.
10
12
// !
11
13
// ! \param os the stream used for writing.
@@ -23,9 +25,12 @@ void write_VTU(std::ostream& os,
23
25
// ! \brief writes the faces of a domain and its constrained edges embedded in
24
26
// ! a 2D constrained Delaunay triangulation using the `PolyData` XML
25
27
// ! format.
26
- // ! The faces output are those for which `get(ipm, f)` returns
27
- // ! `true` where `f` is a `CDT::Face_handle`,
28
+ // ! The faces output are those for which `get(ipm, f)` returns
29
+ // ! `true` where `f` is a `CDT::Face_handle`,
28
30
// ! the edges are those for which `ConstrainedTriangulationFaceBase_2::is_constrained()` returns `true`.
31
+ // !
32
+ // !\attention To read a binary file, the flag `std::ios::binary` must be set during the creation of `os`.
33
+ // !
29
34
// ! \tparam CDT a `Constrained_Delaunay_triangulation_2` with face
30
35
// ! type model of `DelaunayMeshFaceBase_2`.
31
36
// ! \tparam InDomainPmap a class model of `ReadWritePropertyMap` with
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ template <class FT>
25
25
void write_vector (std::ostream& os,
26
26
const std::vector<FT>& vect)
27
27
{
28
+ if (vect.empty ())
29
+ return ;
28
30
const char * buffer = reinterpret_cast <const char *>(&(vect[0 ]));
29
31
std::size_t size = vect.size ()*sizeof (FT);
30
32
You can’t perform that action at this time.
0 commit comments