Various deprecation-related improvements

This commit is contained in:
Mael Rouxel-Labbé 2018-05-18 16:47:54 +02:00
parent 4ceeb92020
commit b41f1d6272
40 changed files with 98 additions and 86 deletions

View File

@ -24,7 +24,8 @@
// and a STREP (FET Open) Project under Contract No IST-006413
// (ACS -- Algorithms for Complex Shapes)
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Algebraic_kernel_for_circles_2_2.h>
#include <CGAL/Circular_kernel_2.h>

View File

@ -24,7 +24,8 @@
// and a STREP (FET Open) Project under Contract No IST-006413
// (ACS -- Algorithms for Complex Shapes)
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/basic.h>
#include <CGAL/Exact_circular_kernel_2.h>
#include <CGAL/intersections.h>

View File

@ -24,7 +24,8 @@
// and a STREP (FET Open) Project under Contract No IST-006413
// (ACS -- Algorithms for Complex Shapes)
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Algebraic_kernel_for_circles_2_2.h>
#include <CGAL/Circular_kernel_2.h>

View File

@ -24,7 +24,7 @@
// and a STREP (FET Open) Project under Contract No IST-006413
// (ACS -- Algorithms for Complex Shapes)
#define CGAL_NO_DEPRECATION_WARNINGS 1
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/basic.h>
#include <CGAL/Exact_circular_kernel_2.h>

View File

@ -1,8 +1,7 @@
#include <cstdlib>
#ifndef CGAL_NO_DEPRECATED_CODE
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#define CGAL_NO_DEPRECATION_WARNINGS 1
#define CGAL_CMAP_DART_DEPRECATED 1
#include <CGAL/Combinatorial_map.h>
@ -88,12 +87,3 @@ int main()
std::cout<<" Success."<<std::endl;
return EXIT_SUCCESS;
}
#else // CGAL_NO_DEPRECATED_CODE
int main()
{
return EXIT_SUCCESS;
}
#endif // CGAL_NO_DEPRECATED_CODE

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/basic.h>
#include <CGAL/Homogeneous.h>

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/basic.h>
#include <CGAL/Homogeneous_d.h>

View File

@ -50,11 +50,11 @@ typedef CGAL::Mesh_polyhedron_3<K>::type Polyhedron;
// Domain
typedef CGAL::Polyhedral_mesh_domain_with_features_3<K> Mesh_domain;
typedef Mesh_domain::Corner_index Corner_index;
typedef Mesh_domain::Curve_segment_index Curve_segment_index;
typedef Mesh_domain::Curve_index Curve_index;
typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
typedef CGAL::Mesh_complex_3_in_triangulation_3<
Tr, Corner_index, Curve_segment_index> C3t3;
Tr, Corner_index, Curve_index> C3t3;
typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
typedef C3t3::Point Point;

View File

@ -20,7 +20,7 @@
// Including this header will cause compilation to fail
// if CGAL_NO_DEPRECATED_CODE is defined. If this is not the case, it will issue
// a warning during compilation unless CGAL_NO_DEPRECATION_WARNINGS.
// a warning during compilation, unless CGAL_NO_DEPRECATION_WARNINGS is defined.
// CGAL_DEPRECATED_HEADER, CGAL_REPLACEMENT_HEADER, and
// CGAL_DEPRECATED_MESSAGE_DETAILS can be defined
@ -56,11 +56,11 @@
# define CGAL_INTERNAL_DEPRECATED_MESSAGE_HEADERS \
CGAL_INTERNAL_DEPRECATED_MESSAGE_DEPRECATED_HEADER \
CGAL_INTERNAL_NO_DEPRECATED_CODE_MESSAGE \
" Please use `" CGAL_REPLACEMENT_HEADER "` instead.\n"
" Please use `" CGAL_REPLACEMENT_HEADER "` instead. "
#else
# define CGAL_INTERNAL_DEPRECATED_MESSAGE_HEADERS \
CGAL_INTERNAL_DEPRECATED_MESSAGE_DEPRECATED_HEADER \
CGAL_INTERNAL_NO_DEPRECATED_CODE_MESSAGE "\n"
CGAL_INTERNAL_NO_DEPRECATED_CODE_MESSAGE " "
#endif
// if more details are given, print them

View File

@ -0,0 +1,30 @@
// Copyright (c) 2018 GeometryFactory (France). All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 3 of the License,
// or (at your option) any later version.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0+
//
// Author: Mael Rouxel-Labbé
// Some tests are explicitely used to check the sanity of deprecated code and should not
// give warnings/errors on plateforms that defined CGAL_NO_DEPRECATED_CODE CGAL-wide
// (or did not disable deprecation warnings).
#if !defined(CGAL_NO_DEPRECATION_WARNINGS)
#define CGAL_NO_DEPRECATION_WARNINGS
#endif
#if defined(CGAL_NO_DEPRECATED_CODE)
#undef CGAL_NO_DEPRECATED_CODE
#endif

View File

@ -27,7 +27,7 @@ typedef CGAL::Sequential_tag Concurrency_tag;
typedef CGAL::Mesh_triangulation_3<Mesh_domain,K,Concurrency_tag>::type Tr;
typedef CGAL::Mesh_complex_3_in_triangulation_3<
Tr,Mesh_domain::Corner_index,Mesh_domain::Curve_segment_index> C3t3;
Tr,Mesh_domain::Corner_index,Mesh_domain::Curve_index> C3t3;
// Criteria
typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;

View File

@ -18,7 +18,7 @@
//
// Author(s) : Laurent Rineau
#ifndef CGAL_NO_DEPRECATED_CODE
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <boost/optional.hpp>
@ -155,11 +155,3 @@ int main()
return 0;
}
#else // CGAL_NO_DEPRECATED_CODE
#include <iostream>
int main() {
std::cerr << "CGAL_NO_DEPRECATED_CODE is defined. Nothing to test.\n";
return 0;
}
#endif // CGAL_NO_DEPRECATED_CODE

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS 1
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Mesh_3/Implicit_to_labeled_function_wrapper.h>

View File

@ -23,7 +23,7 @@
// File Description :
//******************************************************************************
#define CGAL_NO_DEPRECATION_WARNINGS 1
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include "test_meshing_utilities.h"
#include <CGAL/Mesh_3/Labeled_mesh_domain_3.h>

View File

@ -6,9 +6,6 @@
// subdomain.
//******************************************************************************
#define CGAL_NO_DEPRECATION_WARNINGS 1
#include "debug.h"
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
@ -16,8 +13,8 @@
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
#include <CGAL/Mesh_criteria_3.h>
#include <CGAL/Mesh_3/Implicit_to_labeled_function_wrapper.h>
#include <CGAL/Mesh_3/Labeled_mesh_domain_3.h>
#include <CGAL/Implicit_to_labeling_function_wrapper.h>
#include <CGAL/Labeled_mesh_domain_3.h>
#include <CGAL/make_mesh_3.h>
#include "implicit_functions.h"
@ -30,12 +27,12 @@ template <typename Concurrency_tag>
void test()
{
// Domain
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef FT_to_point_function_wrapper<K::FT, K::Point_3> Function;
typedef CGAL::Mesh_3::Implicit_vector_to_labeled_function_wrapper<Function, K>
Function_wrapper;
typedef Function_wrapper::Function_vector Function_vector;
typedef CGAL::Mesh_3::Labeled_mesh_domain_3<Function_wrapper, K> Mesh_domain;
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef FT_to_point_function_wrapper<K::FT, K::Point_3> Function;
typedef CGAL::Implicit_vector_to_labeling_function_wrapper<Function, K>
Function_wrapper;
typedef Function_wrapper::Function_vector Function_vector;
typedef CGAL::Labeled_mesh_domain_3<Function_wrapper, K> Mesh_domain;
// Triangulation
typedef typename CGAL::Mesh_triangulation_3<

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
// analysis_test.cpp

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
// bilateral_smoothing_test.cpp

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
// edge_aware_upsample_test.cpp

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <limits>

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
// normal_estimation_test.cpp

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/property_map.h>

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/property_map.h>

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
// remove_outliers_test.cpp

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
// smoothing_test.cpp

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Point_with_normal_3.h>

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/vcm_estimate_edges.h>

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/vcm_estimate_normals.h>

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
// wlop_simplify_and_regularize_test.cpp

View File

@ -25,6 +25,12 @@
#include <CGAL/license/Point_set_shape_detection_3.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Efficient_RANSAC_traits.h>"
#define CGAL_REPLACEMENT_HEADER "<CGAL/Shape_detection_traits.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"CGAL::Shape_detection_3::Efficient_RANSAC_traits<> has been replaced by the class "\
"CGAL::Shape_detection_3::Shape_detection_traits<>."
#include <CGAL/internal/deprecation_warning.h>
#include <CGAL/Search_traits_3.h>
@ -51,9 +57,7 @@ namespace CGAL {
class InputRange,
class InputPointMap,
class InputNormalMap>
struct
CGAL_DEPRECATED_MSG("CGAL::Shape_detection_3::Efficient_RANSAC_traits<> is now called CGAL::Shape_detection_3::Shape_detection_traits<>, please update your code")
Efficient_RANSAC_traits {
struct Efficient_RANSAC_traits {
///
typedef typename Gt::FT FT;
///

View File

@ -1,4 +1,4 @@
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include "generators.h"

View File

@ -361,7 +361,7 @@ tweak_criteria(Mesh_criteria& c, Mesh_fnt::Polyhedral_domain_tag) {
typedef CGAL::Mesh_3::Facet_topological_criterion_with_adjacency<Tr,
Domain, typename Facet_criteria::Visitor> New_topo_adj_crit;
if((int(c.facet_criteria().topology()) &
if((int(c.facet_criteria_object().topology()) &
CGAL::FACET_VERTICES_ON_SAME_SURFACE_PATCH_WITH_ADJACENCY_CHECK) != 0)
{
c.add_facet_criterion(new New_topo_adj_crit(this->domain_));

View File

@ -1,13 +1,13 @@
#define CGAL_NO_DEPRECATION_WARNINGS 1
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Twotuple.h>
#include <CGAL/Threetuple.h>
#include <CGAL/Fourtuple.h>
#include <CGAL/Sixtuple.h>
#include <CGAL/use.h>
int main()
{
#ifndef CGAL_NO_DEPRECATED_CODE
CGAL::Twotuple<int> d2, t2(0,1);
CGAL::Threetuple<int> d3, t3(0,1,2);
CGAL::Fourtuple<int> d4, t4(0,1,2,3);
@ -17,6 +17,6 @@ int main()
CGAL_USE(d3); CGAL_USE(t3);
CGAL_USE(d4); CGAL_USE(t4);
CGAL_USE(d6); CGAL_USE(t6);
#endif
return 0;
}

View File

@ -1,4 +1,5 @@
#define CGAL_NO_DEPRECATION_WARNINGS 1 // because CGAL::copy_n is deprecated
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h> // because CGAL::copy_n is deprecated
#include <boost/config.hpp>
#if defined(BOOST_MSVC)
@ -21,10 +22,8 @@ int main()
CGAL_USE(tuple);
CGAL_USE(tuple2);
#ifndef CGAL_NO_DEPRECATED_CODE
CGAL::copy_n(arr.begin(), 3, arr2.begin());
#endif // not CGAL_NO_DEPRECATED_CODE
CGAL::cpp0x::copy_n(arr.begin(), 3, arr2.begin());
CGAL::cpp11::copy_n(arr.begin(), 3, arr2.begin());

View File

@ -24,9 +24,18 @@
#include <CGAL/license/Triangulation_3.h>
// Commented because the class is actually used by Delaunay_triangulation_hierarchy_3.h
// #define CGAL_DEPRECATED_HEADER "<CGAL/Triangulation_hierarchy_3.h>"
// #include <CGAL/internal/deprecation_warning.h>
// This class is deprecated, but must be kept for backward compatibility.
//
// It would be better to move its content to the Delaunay_triangulation_3
// specializations for Fast_location and make Triangulation_hierarchy_3 the
// empty nutshell instead.
//
// Then, later, maybe merge the Compact/Fast codes in a cleaner factorized way.
#include <CGAL/basic.h>
#include <CGAL/internal/Has_nested_type_Bare_point.h>
#include <CGAL/triangulation_assertions.h>
@ -55,14 +64,6 @@
namespace CGAL {
// This class is deprecated, but must be kept for backward compatibility.
//
// It would be better to move its content to the Delaunay_triangulation_3
// specializations for Fast_location and make Triangulation_hierarchy_3 the
// empty nutshell instead.
//
// Then, later, maybe merge the Compact/Fast codes in a cleaner factorized way.
template < class Tr >
class Triangulation_hierarchy_3
: public Tr

View File

@ -19,7 +19,7 @@
//
// Author(s) : Francois Rebufat
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include "test_dependencies.h"

View File

@ -19,8 +19,6 @@
//
// Author(s) : Mariette Yvinec, Sylvain Pion
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/Delaunay_triangulation_3.h>
bool del=true;

View File

@ -19,8 +19,6 @@
//
// Author(s) : Mariette Yvinec, Sylvain Pion
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Triangulation_hierarchy_3.h>

View File

@ -20,7 +20,7 @@
//
// Author(s) : Mariette Yvinec
#define CGAL_NO_DEPRECATION_WARNINGS
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <cassert>
#include <CGAL/Regular_triangulation_euclidean_traits_3.h>