diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map.h b/Combinatorial_map/include/CGAL/Combinatorial_map.h index 12a98e7eb5d..42b64358d00 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map.h @@ -208,7 +208,7 @@ namespace CGAL { CGAL_assertion(number_of_darts()==0); } - + /** Copy the given combinatorial map 'amap' into *this. * Note that both CMap can have different dimensions and/or non void attributes. * Here CMap2 is necessarily non const; while Dart_handle_2 can be a const or non const handle. @@ -257,7 +257,7 @@ namespace CGAL { // Create an mapping between darts of the two maps (originals->copies). // (here we cannot use CGAL::Unique_hash_map because it does not provide // iterators... - boost::unordered_map local_dartmap; + boost::unordered_map local_dartmap; if (origin_to_copy==NULL) // Use local_dartmap if user does not provides its own unordered_map { origin_to_copy=&local_dartmap; } @@ -272,10 +272,10 @@ namespace CGAL { if (mark_perforated!=NB_MARKS && amap.is_perforated(it)) { mark(new_dart, mark_perforated); } - + (*origin_to_copy)[it]=new_dart; if (copy_to_origin!=NULL) { (*copy_to_origin)[new_dart]=it; } - + internal::Copy_dart_info_functor ::run (static_cast(amap), static_cast(*this), @@ -395,7 +395,7 @@ namespace CGAL { converters, dartinfoconverter, pointconverter, copy_perforated_darts, mark_perforated); } - + // (3a) copy(amap, converters) template void copy(CMap2& amap, @@ -427,7 +427,7 @@ namespace CGAL { copy(amap, origin_to_copy, copy_to_origin, converters, dartinfoconverter, copy_perforated_darts, mark_perforated); } - + // (4a) copy(amap) template void copy(CMap2& amap, @@ -567,7 +567,7 @@ namespace CGAL { // iterators... boost::unordered_map ::halfedge_descriptor, - Dart_handle> local_dartmap; + Dart_handle> local_dartmap; if (origin_to_copy==NULL) // Used local_dartmap if user does not provides its own unordered_map { origin_to_copy=&local_dartmap; } @@ -582,7 +582,7 @@ namespace CGAL { if (mark_perforated!=NB_MARKS && CGAL::is_border(*it, heg)) { mark(new_dart, mark_perforated); } - + (*origin_to_copy)[*it]=new_dart; if (copy_to_origin!=NULL) { (*copy_to_origin)[new_dart]=*it; } } @@ -597,7 +597,7 @@ namespace CGAL { basic_link_beta(dartmap_iter->second, (*origin_to_copy)[CM_ADL_next(dartmap_iter->first, heg)], 1); - + if (!CGAL::is_border(CM_ADL_opposite(dartmap_iter->first, heg), heg) && (dartmap_iter->first)first, heg)) { @@ -609,7 +609,7 @@ namespace CGAL { CGAL_assertion (is_valid()); } - + /** Clear the combinatorial map. Remove all darts and all attributes. * Note that reserved marks are not free. */ @@ -1194,7 +1194,7 @@ namespace CGAL { bool belong_to_same_cell(Dart_const_handle adart1, Dart_const_handle adart2) const { return CGAL::belong_to_same_cell(*this, adart1, adart2); } - + template bool is_whole_cell_unmarked(Dart_const_handle adart, size_type amark) const { return CGAL::is_whole_cell_unmarked(*this, adart, amark); } @@ -2726,16 +2726,16 @@ namespace CGAL { CGAL_assertion((!this->template is_free<1>(d1))); /* CGAL_assertion((belong_to_same_cell<0>(this->template beta<1>(d1), d2))); */ - + if (d2==beta<2>(d1)) { return 0; } - + Dart_const_handle dd1=d1; std::size_t res=1; while (beta<1>(dd1)!=d2) { if (this->template is_free<2>(beta<1>(dd1))) { return std::numeric_limits::max(); } - + ++res; dd1=beta<1, 2>(dd1); @@ -2752,7 +2752,7 @@ namespace CGAL { CGAL_assertion((!this->template is_free<1>(d1))); /* CGAL_assertion((belong_to_same_cell<0>(this->template beta<1>(d1), d2))); */ - + if (d2==beta<2>(d1)) { return 0; } if (this->template is_free<2>(d1) || this->template is_free<2>(d2)) @@ -2766,10 +2766,10 @@ namespace CGAL { { if (this->template is_free<2>(beta<0>(dd1))) { return std::numeric_limits::max(); } - + ++res; dd1=beta<0, 2>(dd1); - + CGAL_assertion(!this->template is_free<0>(dd1)); CGAL_assertion(beta<0>(dd1)==d2 || dd1!=d1); } @@ -3444,7 +3444,7 @@ namespace CGAL { #if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE) CGAL_USE(testDartInfo); #endif - + typedef Combinatorial_map_base Map2; bool match = true; @@ -4813,6 +4813,6 @@ namespace CGAL { #endif #include - + #endif // CGAL_COMBINATORIAL_MAP_H // // EOF // diff --git a/Combinatorial_map/include/CGAL/Face_graph_wrapper.h b/Combinatorial_map/include/CGAL/Face_graph_wrapper.h index bd4cb728a23..e7cd8b87706 100644 --- a/Combinatorial_map/include/CGAL/Face_graph_wrapper.h +++ b/Combinatorial_map/include/CGAL/Face_graph_wrapper.h @@ -46,7 +46,7 @@ public: // typedef My_halfedge_iterator iterator; // typedef My_halfedge_iterator const_iterator; // TODO ? }; - + typedef typename boost::graph_traits::halfedge_descriptor Dart_handle; typedef typename boost::graph_traits::halfedge_descriptor Dart_const_handle; @@ -67,7 +67,7 @@ public: typedef typename boost::graph_traits::edge_descriptor edge_descriptor; typedef typename boost::graph_traits::face_descriptor face_descriptor; typedef boost::undirected_tag directed_category; - typedef boost::disallow_parallel_edge_tag edge_parallel_category; + typedef boost::disallow_parallel_edge_tag edge_parallel_category; struct SM_graph_traversal_category : public virtual boost::bidirectional_graph_tag, public virtual boost::vertex_list_graph_tag, @@ -75,7 +75,7 @@ public: {}; typedef SM_graph_traversal_category traversal_category; - + Face_graph_wrapper(const HEG& f) : m_fg(f), mdarts(*this), m_nb_darts(0), @@ -111,7 +111,7 @@ public: const HEG& get_fg() const { return m_fg; } - + template bool is_free(Dart_const_handle /* dh */) const { return false; } // Not possible to have a free dart with an HEG. @@ -125,7 +125,7 @@ public: { CGAL_assertion(B1>=0 && B1<=static_cast(dimension)); if (B1==1) return Get_beta::value(m_fg, ADart); - if (B1==2) return Get_beta::value(m_fg, ADart); + if (B1==2) return Get_beta::value(m_fg, ADart); return Get_beta::value(m_fg, ADart); } template @@ -137,15 +137,15 @@ public: bool is_empty() const { return number_of_darts()==0; } - + /* ?? bool is_dart_used(Dart_const_handle dh) const { return true; ?? } */ - + int highest_nonfree_dimension(Dart_const_handle /* dh */) const { return 2; } Dart_const_handle previous(Dart_const_handle ADart) const - { return get_beta<0>(ADart); } + { return get_beta<0>(ADart); } Dart_const_handle next(Dart_const_handle ADart) const { return get_beta<1>(ADart); } Dart_const_handle opposite(Dart_const_handle dh) const @@ -159,7 +159,7 @@ public: Dart_const_handle opposite(Dart_const_handle ADart) const { return this->template get_beta(ADart); } Dart_const_handle other_orientation(Dart_const_handle ADart) const - { return ADart; } + { return ADart; } bool is_previous_exist(Dart_const_handle) const { return true; } @@ -185,10 +185,10 @@ public: Dart_const_handle beta(Dart_const_handle ADart) const { return CGAL::internal::Beta_functor_static:: run(*this, ADart); } - + size_type number_of_darts() const { return m_nb_darts; } - + size_type number_of_halfedges() const { return number_of_darts(); } @@ -200,26 +200,26 @@ public: CGAL_assertion(amarknull_dart_handle ); CGAL_assertion( is_reserved(amark) ); - + if (!is_marked(adart, amark)) return; - + --mnb_marked_darts[amark]; flip_dart_mark(adart, amark); } - + void unmark_all(size_type amark) const { CGAL_assertion( is_reserved(amark) ); - + if ( is_whole_map_marked(amark) ) { negate_mark(amark); @@ -337,44 +337,44 @@ public: } CGAL_assertion(is_whole_map_unmarked(amark)); } - + void free_mark(size_type amark) const { CGAL_assertion( is_reserved(amark) ); - + if ( mnb_times_reserved_marks[amark]>1 ) { --mnb_times_reserved_marks[amark]; return; } - + unmark_all(amark); - + // 1) We remove amark from the array mused_marks_stack by // replacing it with the last mark in this array. mused_marks_stack[mindex_marks[amark]] = mused_marks_stack[--mnb_used_marks]; mindex_marks[mused_marks_stack[mnb_used_marks]] = mindex_marks[amark]; - + // 2) We add amark in the array mfree_marks_stack and update its index. mfree_marks_stack[ mnb_used_marks ]=amark; mindex_marks[amark] = mnb_used_marks; - + mnb_times_reserved_marks[amark]=0; } - + bool is_without_boundary(unsigned int i) const { CGAL_assertion(1<=i && i<=dimension); if (i==1) return true; - + for ( typename Dart_range::const_iterator it(darts().begin()), itend(darts().end()); it!=itend; ++it) { if (is_perforated(it)) return false; } return true; } - + bool is_without_boundary() const { return is_without_boundary(2); } @@ -400,7 +400,7 @@ public: } return msize; } - + bool empty() const { return mmap.is_empty(); } private: @@ -477,7 +477,7 @@ public: } return msize; } - + bool empty() const { return mmap.is_empty(); } private: @@ -527,7 +527,7 @@ public: { if (*it==adart2) { return true; } } return false; } - + template bool is_whole_cell_unmarked(Dart_const_handle adart, size_type amark) const { @@ -562,7 +562,7 @@ public: else if (i==1) { return mark_cell<1>(adart, amark); } else if (i==2) { return mark_cell<2>(adart, amark); } return mark_cell<3>(adart, amark); - } + } template size_type unmark_cell(Dart_const_handle adart, size_type amark) const @@ -586,7 +586,7 @@ public: res[i]=0; marks[i]=INVALID_MARK; } - + // Mark reservation for (unsigned int i=0; i res; size_type m=get_new_mark(); negate_mark(m); // We mark all the cells. - + res=count_marked_cells(m, acells); - + negate_mark(m); // We unmark the cells free_mark(m); - + return res; } std::vector count_all_cells() const { std::vector dim(dimension+2); - + for ( unsigned int i=0; i<=dimension+1; ++i) { dim[i]=i; } - + return count_cells(dim); } @@ -674,9 +674,9 @@ public: std::vector cells(dimension+2); for ( unsigned int i=0; i<=dimension+1; ++i) { cells[i]=i; } - + std::vector res=count_cells(cells); - + os<<"#Darts="< void generic_copy(GMap2& amap, boost::unordered_map* origin_to_copy, @@ -239,14 +239,14 @@ namespace CGAL { (*origin_to_copy)[it]=new_dart; if (copy_to_origin!=NULL) { (*copy_to_origin)[new_dart]=it; } - + internal::Copy_dart_info_functor ::run (static_cast(amap), static_cast(*this), it, new_dart, dartinfoconverter); } } - + unsigned int min_dim=(dimension::iterator @@ -359,7 +359,7 @@ namespace CGAL { dartinfoconverter, pointconverter, copy_perforated_darts, mark_perforated); } - + // (3a) copy(amap, converters) template void copy(GMap2& amap, @@ -391,7 +391,7 @@ namespace CGAL { copy(amap, origin_to_copy, copy_to_origin, converters, dartinfoconverter, copy_perforated_darts, mark_perforated); } - + // (4a) copy(amap) template void copy(GMap2& amap, @@ -420,7 +420,7 @@ namespace CGAL { CGAL::cpp11::tuple<> converters; copy(amap, origin_to_copy, copy_to_origin, converters, copy_perforated_darts, mark_perforated); - } + } // Copy constructor from a map having exactly the same type. Generalized_map_base (const Self & amap) : Generalized_map_base() @@ -1018,7 +1018,7 @@ namespace CGAL { bool belong_to_same_cell(Dart_const_handle adart1, Dart_const_handle adart2) const { return CGAL::belong_to_same_cell(*this, adart1, adart2); } - + template bool is_whole_cell_unmarked(Dart_const_handle adart, size_type amark) const { return CGAL::is_whole_cell_unmarked(*this, adart, amark); } @@ -1839,16 +1839,16 @@ namespace CGAL { { CGAL_assertion((!this->template is_free<1>(d1))); /* CGAL_assertion((belong_to_same_cell<0>(this->next(d1), d2))); */ - + if (d2==opposite2(d1)) { return 0; } - + Dart_const_handle dd1=d1; std::size_t res=1; while (next(dd1)!=d2) { if (this->template is_free<2>(next(dd1))) { return std::numeric_limits::max(); } - + ++res; dd1=opposite2(next(dd1)); @@ -1881,7 +1881,7 @@ namespace CGAL { ++res; dd1=opposite2(previous(dd1)); - + CGAL_assertion(!this->template is_free<0>(dd1)); CGAL_assertion(previous(dd1)==d2 || dd1!=d1); } diff --git a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h index 7cbfd171fa0..45607a07236 100644 --- a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h +++ b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h @@ -21,7 +21,7 @@ namespace CGAL { - + // Default color functor; user can change it to have its own face color struct DefaultDrawingFunctorLCC { @@ -146,7 +146,7 @@ struct LCC_geom_utils } }; -// Viewer class for LCC +// Viewer class for LCC template class SimpleLCCViewerQt : public Basic_viewer_qt { @@ -155,7 +155,7 @@ class SimpleLCCViewerQt : public Basic_viewer_qt typedef typename LCC::Traits Kernel; typedef typename Kernel::Point Point; typedef typename Kernel::Vector Vector; - + public: /// Construct the viewer. /// @param alcc the lcc to view @@ -168,7 +168,7 @@ public: bool anofaces=false, const DrawingFunctorLCC& drawing_functor=DrawingFunctorLCC()) : // First draw: vertices; edges, faces; multi-color; inverse normal - Base(parent, title, true, true, true, false, false), + Base(parent, title, true, true, true, false, false), lcc(alcc), m_nofaces(anofaces), m_random_face_color(false), @@ -184,7 +184,7 @@ protected: compute_elements(); if (doredraw) { redraw(); } } - + void compute_face(Dart_const_handle dh, Dart_const_handle voldh) { if (m_nofaces || !m_drawing_functor.draw_face(*lcc, dh)) return; @@ -204,7 +204,7 @@ protected: { CGAL::Random random((unsigned int)(lcc->darts().index(dh))); CGAL::Color c=get_random_color(random); - face_begin(c); + face_begin(c); } else if (m_drawing_functor.colored_face(*lcc, dh)) { @@ -260,7 +260,7 @@ protected: { clear(); if (lcc==nullptr) return; - + typename LCC::size_type markvolumes = lcc->get_new_mark(); typename LCC::size_type markfaces = lcc->get_new_mark(); typename LCC::size_type markedges = lcc->get_new_mark(); @@ -331,13 +331,13 @@ protected: lcc->free_mark(markedges); lcc->free_mark(markvertices); } - + virtual void init() { Base::init(); setKeyDescription(::Qt::Key_C, "Toggles random face colors"); } - + virtual void keyPressEvent(QKeyEvent *e) { const ::Qt::KeyboardModifiers modifiers = e->modifiers(); @@ -350,7 +350,7 @@ protected: } else { Base::keyPressEvent(e); } // Call the base method to process others/classicals key - + // Call: * compute_elements() if the model changed, followed by // * redraw() if some viewing parameters changed that implies some // modifications of the buffers @@ -388,7 +388,7 @@ void draw(const CGAL_LCC_TYPE& alcc, #else bool cgal_test_suite=qEnvironmentVariableIsSet("CGAL_TEST_SUITE"); #endif - + if (!cgal_test_suite) { int argc=1;