mirror of https://github.com/CGAL/cgal
move function to avoid duplicate
This commit is contained in:
parent
cce00dd29f
commit
fe12d897f9
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/IO/io.h>
|
||||
#include <CGAL/IO/VTK/VTK_writer.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
|
@ -32,18 +33,6 @@ namespace CGAL {
|
|||
namespace IO {
|
||||
namespace internal {
|
||||
|
||||
template <class FT>
|
||||
void
|
||||
write_vector(std::ostream& os,
|
||||
const std::vector<FT>& vect)
|
||||
{
|
||||
const char* buffer = reinterpret_cast<const char*>(&(vect[0]));
|
||||
std::size_t size = vect.size()*sizeof(FT);
|
||||
|
||||
os.write(reinterpret_cast<const char *>(&size), sizeof(std::size_t)); // number of bytes encoded
|
||||
os.write(buffer, vect.size()*sizeof(FT)); // encoded data
|
||||
}
|
||||
|
||||
// writes the cells tags before binary data is appended
|
||||
|
||||
template <class CDT>
|
||||
|
|
|
|||
Loading…
Reference in New Issue