removing forward declaration

reusing include guards instead of forward declaration
This commit is contained in:
Sven Oesau 2025-04-02 10:32:19 +02:00
parent 765a9d0939
commit 0f19011bd7
3 changed files with 9 additions and 18 deletions

View File

@ -42,11 +42,6 @@
//---------------------
namespace CGAL {
// Forward declaration for normal check
template<typename Point_3, typename Vector_3 = typename Kernel_traits<Point_3>::Kernel::Vector_3>
class Point_set_3;
namespace Shape_detection {
/*!
@ -287,8 +282,10 @@ public:
Normal_map normal_map = Normal_map()
///< Property map to access the normal of an input point.
) {
if constexpr (std::is_convertible_v<Input_range, Point_set_3<Point>>)
#ifdef CGAL_POINT_SET_3_H
if constexpr (std::is_convertible_v<Input_range, Point_set_3<typename Traits::Point_3, typename Traits::Vector_3> >)
CGAL_precondition(input_range.has_normal_map());
#endif
m_point_pmap = point_map;
m_normal_pmap = normal_map;

View File

@ -21,11 +21,6 @@
#include <CGAL/Shape_detection/Region_growing/internal/utils.h>
namespace CGAL {
// Forward declaration for normal check
template<typename Point_3, typename Vector_3 = typename Kernel_traits<Point_3>::Kernel::Vector_3>
class Point_set_3;
namespace Shape_detection {
namespace Point_set {
@ -140,8 +135,10 @@ namespace Point_set {
m_traits(parameters::choose_parameter<GeomTraits>(parameters::get_parameter(np, internal_np::geom_traits))) {
CGAL_precondition(input_range.size() > 0);
if constexpr (std::is_convertible_v<InputRange, Point_set_3<typename Traits::Point_3>>)
#ifdef CGAL_POINT_SET_3_H
if constexpr (std::is_convertible_v<InputRange, Point_set_3<typename Traits::Point_3, typename Traits::Vector_3> >)
CGAL_precondition(input_range.has_normal_map());
#endif
using NP_helper = internal::Default_property_map_helper<CGAL_NP_CLASS, Item, typename InputRange::const_iterator, internal_np::item_map_t>;
using Item_map = typename NP_helper::type;

View File

@ -21,11 +21,6 @@
#include <CGAL/Shape_detection/Region_growing/internal/utils.h>
namespace CGAL {
// Forward declaration for normal check
template<typename Point_3, typename Vector_3 = typename Kernel_traits<Point_3>::Kernel::Vector_3>
class Point_set_3;
namespace Shape_detection {
namespace Point_set {
@ -142,8 +137,10 @@ namespace Point_set {
m_traits(parameters::choose_parameter<GeomTraits>(parameters::get_parameter(np, internal_np::geom_traits)))
{
CGAL_precondition(input_range.size() > 0);
if constexpr (std::is_convertible_v<InputRange, Point_set_3<typename Traits::Point_3>>)
#ifdef CGAL_POINT_SET_3_H
if constexpr (std::is_convertible_v<InputRange, Point_set_3<typename Traits::Point_3, typename Traits::Vector_3> >)
CGAL_precondition(input_range.has_normal_map());
#endif
using NP_helper = internal::Default_property_map_helper<CGAL_NP_CLASS, Item, typename InputRange::const_iterator, internal_np::item_map_t>;
using Item_map = typename NP_helper::type;