Skip to content

Commit

Permalink
Merge pull request #7744 from lrineau/CGAl-fix_IO_oformat_iformat-GF
Browse files Browse the repository at this point in the history
fix : iformat/oformat are in CGAL::IO
  • Loading branch information
lrineau committed Oct 16, 2023
2 parents 604c654 + ebdfddb commit 98a6bf7
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -736,13 +736,13 @@ class Point_2 :
swallow(is, '(');

// read values
is >> iformat(rep._m_xy);
is >> IO::iformat(rep._m_xy);
swallow(is, ',');
is >> iformat(rep._m_x);
is >> IO::iformat(rep._m_x);
swallow(is, ',');
is >> iformat(rep._m_curve);
is >> IO::iformat(rep._m_curve);
swallow(is, ',');
is >> iformat(rep._m_arcno);
is >> IO::iformat(rep._m_arcno);
swallow(is, ',');
is >> rep._m_location;

Expand Down
2 changes: 1 addition & 1 deletion Mesh_2/include/CGAL/IO/File_poly.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ read_triangle_poly_file(CDT& t, std::istream &f,
{
unsigned int j;
double x, y;
f >> j >> iformat(x) >> iformat(y);
f >> j >> IO::iformat(x) >> IO::iformat(y);
Point p(x, y);
skip_until_EOL(f); skip_comment_OFF(f);
vertices[--j] = t.insert(p);
Expand Down
1 change: 1 addition & 0 deletions Mesh_3/examples/Mesh_3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ if(CGAL_ACTIVATE_CONCURRENT_MESH_3 AND TARGET CGAL::TBB_support)
target
mesh_3D_image
mesh_3D_weighted_image
mesh_3D_weighted_image_with_detection_of_features
mesh_3D_image_variable_size
mesh_3D_image_with_custom_initialization
mesh_3D_gray_image_with_custom_initialization
Expand Down
4 changes: 2 additions & 2 deletions Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -1148,9 +1148,9 @@ number_of_bad_elements_impl()
const Subdomain mc_subdomain = this->r_oracle_.is_in_domain_object()(this->r_tr_.dual(mc));

std::cerr << "*** Is in complex? c is marked in domain: " << this->r_c3t3_.is_in_complex(c)
<< " / c is really in subdomain: " << oformat(c_subdomain)
<< " / c is really in subdomain: " << IO::oformat(c_subdomain)
<< " / mc is marked in domain: " << this->r_c3t3_.is_in_complex(mc)
<< " / mc is really in subdomain: " << oformat(mc_subdomain)
<< " / mc is really in subdomain: " << IO::oformat(mc_subdomain)
<< std::endl;


Expand Down
6 changes: 3 additions & 3 deletions Point_set_processing_3/include/CGAL/IO/read_xyz_points.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ bool read_XYZ(std::istream& is,
{
iss.clear();
iss.str(line);
if (iss >> iformat(x) >> iformat(y) >> iformat(z))
if (iss >> IO::iformat(x) >> IO::iformat(y) >> IO::iformat(z))
{
Point point(x,y,z);
Vector normal = CGAL::NULL_VECTOR;
// ... + normal...
if (iss >> iformat(nx))
if (iss >> IO::iformat(nx))
{
// In case we could read one number, we expect that there are two more
if(iss >> iformat(ny) >> iformat(nz)){
if(iss >> IO::iformat(ny) >> IO::iformat(nz)){
normal = Vector(nx,ny,nz);
} else {
std::cerr << "Error line " << lineNumber << " of file (incomplete normal coordinates)" << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion Stream_support/include/CGAL/IO/PLY/PLY_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class PLY_read_number

void read_ascii(std::istream& stream, double& t) const
{
if(!(stream >> iformat(t)))
if(!(stream >> IO::iformat(t)))
stream.clear(std::ios::badbit);
}

Expand Down
2 changes: 1 addition & 1 deletion Stream_support/include/CGAL/IO/STL/STL_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ bool read_ASCII_facet(std::istream& is,
return false;
}

if(!(is >> iformat(x) >> iformat(y) >> iformat(z)))
if(!(is >> IO::iformat(x) >> IO::iformat(y) >> IO::iformat(z)))
{
if(verbose)
std::cerr << "Error while reading point coordinates (premature end of file)" << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion Stream_support/include/CGAL/IO/VTK.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ void write_soup_points_tag(std::ostream& os,
{
os << "\">\n";
for(const Point& p : points)
os << oformat(p.x()) << " " << oformat(p.y()) << " " << oformat(p.z()) << " ";
os << IO::oformat(p.x()) << " " << IO::oformat(p.y()) << " " << IO::oformat(p.z()) << " ";
os << " </DataArray>\n";
}
os << " </Points>\n";
Expand Down
2 changes: 1 addition & 1 deletion Triangulation_2/include/CGAL/Constrained_triangulation_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ insert_constraint(Vertex_handle vaa, Vertex_handle vbb, OutputIterator out)
auto display_vertex(Vertex_handle v) const {
With_point_tag point_tag;
using CGAL::IO::oformat;
return oformat(v, point_tag);
return IO::oformat(v, point_tag);
}
#endif // CGAL_CDT_2_DEBUG_INTERSECTIONS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ insert_constraint(T va, T vb){
using CGAL::IO::oformat;
std::cerr << CGAL::internal::cdt_2_indent_level
<< "C_hierachy.insert_constraint( "
<< oformat(va) << ", " << oformat(vb) << ")\n";
<< IO::oformat(va) << ", " << IO::oformat(vb) << ")\n";
#endif // CGAL_CDT_2_DEBUG_INTERSECTIONS
typename Sc_to_c_map::iterator scit = sc_to_c_map.find(he);
if(scit == sc_to_c_map.end()){
Expand Down Expand Up @@ -900,7 +900,7 @@ insert_constraint_old_API(T va, T vb){
using CGAL::IO::oformat;
std::cerr << CGAL::internal::cdt_2_indent_level
<< "C_hierachy.insert_constraint_old_API( "
<< oformat(va) << ", " << oformat(vb) << ")\n";
<< IO::oformat(va) << ", " << IO::oformat(vb) << ")\n";
#endif // CGAL_CDT_2_DEBUG_INTERSECTIONS
typename Sc_to_c_map::iterator scit = sc_to_c_map.find(he);
if(scit == sc_to_c_map.end()){
Expand Down Expand Up @@ -933,7 +933,7 @@ append_constraint(Constraint_id cid, T va, T vb){
using CGAL::IO::oformat;
std::cerr << CGAL::internal::cdt_2_indent_level
<< "C_hierachy.append_constraint( ..., "
<< oformat(va) << ", " << oformat(vb) << ")\n";
<< IO::oformat(va) << ", " << IO::oformat(vb) << ")\n";
#endif // CGAL_CDT_2_DEBUG_INTERSECTIONS
typename Sc_to_c_map::iterator scit = sc_to_c_map.find(he);
if(scit == sc_to_c_map.end()){
Expand Down Expand Up @@ -1050,7 +1050,7 @@ add_Steiner(T va, T vb, T vc){
using CGAL::IO::oformat;
std::cerr << CGAL::internal::cdt_2_indent_level
<< "C_hierachy.add_Steinter( "
<< oformat(va) << ", " << oformat(vb) << ", " << oformat(vc)
<< IO::oformat(va) << ", " << IO::oformat(vb) << ", " << IO::oformat(vc)
<< ")\n";
#endif // CGAL_CDT_2_DEBUG_INTERSECTIONS
Context_list* hcl=nullptr;
Expand Down

0 comments on commit 98a6bf7

Please sign in to comment.