diff --git a/test/common/test_common.cpp b/test/common/test_common.cpp index 452ef266592..68068d699b5 100644 --- a/test/common/test_common.cpp +++ b/test/common/test_common.cpp @@ -298,7 +298,7 @@ TEST (PCL, PointTypes) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template class XYZPointTypesTest : public ::testing::Test { }; -typedef ::testing::Types XYZPointTypes; +using XYZPointTypes = ::testing::Types; TYPED_TEST_CASE(XYZPointTypesTest, XYZPointTypes); TYPED_TEST(XYZPointTypesTest, GetVectorXfMap) { @@ -319,7 +319,7 @@ TYPED_TEST(XYZPointTypesTest, GetArrayXfMap) } template class NormalPointTypesTest : public ::testing::Test { }; -typedef ::testing::Types NormalPointTypes; +using NormalPointTypes = ::testing::Types; TYPED_TEST_CASE(NormalPointTypesTest, NormalPointTypes); TYPED_TEST(NormalPointTypesTest, GetNormalVectorXfMap) { @@ -331,7 +331,7 @@ TYPED_TEST(NormalPointTypesTest, GetNormalVectorXfMap) } template class RGBPointTypesTest : public ::testing::Test { }; -typedef ::testing::Types RGBPointTypes; +using RGBPointTypes = ::testing::Types; TYPED_TEST_CASE(RGBPointTypesTest, RGBPointTypes); TYPED_TEST(RGBPointTypesTest, GetRGBVectorXi) { @@ -390,7 +390,7 @@ TEST (PCL, CopyIfFieldExists) p.r = 127; p.g = 64; p.b = 254; p.normal_x = 1.0; p.normal_y = 0.0; p.normal_z = 0.0; - typedef pcl::traits::fieldList::type FieldList; + using FieldList = pcl::traits::fieldList::type; bool is_x = false, is_y = false, is_z = false, is_rgb = false, is_normal_x = false, is_normal_y = false, is_normal_z = false; @@ -443,7 +443,7 @@ TEST (PCL, SetIfFieldExists) p.r = p.g = p.b = 0; p.normal_x = p.normal_y = p.normal_z = 0.0; - typedef pcl::traits::fieldList::type FieldList; + using FieldList = pcl::traits::fieldList::type; pcl::for_each_type (SetIfFieldExists (p, "x", 1.0)); EXPECT_EQ (p.x, 1.0); pcl::for_each_type (SetIfFieldExists (p, "y", 2.0)); diff --git a/test/common/test_eigen.cpp b/test/common/test_eigen.cpp index b166b7504d7..4225641dac3 100644 --- a/test/common/test_eigen.cpp +++ b/test/common/test_eigen.cpp @@ -57,9 +57,9 @@ namespace ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, InverseGeneral3x3f) { - typedef float Scalar; - typedef Eigen::Matrix RMatrix; - typedef Eigen::Matrix CMatrix; + using Scalar = float; + using RMatrix = Eigen::Matrix; + using CMatrix = Eigen::Matrix; RMatrix r_matrix = RMatrix::Zero (); RMatrix r_inverse = RMatrix::Zero (); CMatrix c_matrix = CMatrix::Zero (); @@ -116,9 +116,9 @@ TEST (PCL, InverseGeneral3x3f) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, InverseGeneral3x3d) { - typedef double Scalar; - typedef Eigen::Matrix RMatrix; - typedef Eigen::Matrix CMatrix; + using Scalar = double; + using RMatrix = Eigen::Matrix; + using CMatrix = Eigen::Matrix; RMatrix r_matrix = RMatrix::Zero (); RMatrix r_inverse = RMatrix::Zero (); CMatrix c_matrix = CMatrix::Zero (); @@ -175,9 +175,9 @@ TEST (PCL, InverseGeneral3x3d) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, InverseSymmetric3x3f) { - typedef float Scalar; - typedef Eigen::Matrix RMatrix; - typedef Eigen::Matrix CMatrix; + using Scalar = float; + using RMatrix = Eigen::Matrix; + using CMatrix = Eigen::Matrix; RMatrix r_matrix = RMatrix::Zero (); RMatrix r_inverse = RMatrix::Zero (); CMatrix c_matrix = CMatrix::Zero (); @@ -240,9 +240,9 @@ TEST (PCL, InverseSymmetric3x3f) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, InverseSymmetric3x3d) { - typedef double Scalar; - typedef Eigen::Matrix RMatrix; - typedef Eigen::Matrix CMatrix; + using Scalar = double; + using RMatrix = Eigen::Matrix; + using CMatrix = Eigen::Matrix; RMatrix r_matrix = RMatrix::Zero (); RMatrix r_inverse = RMatrix::Zero (); CMatrix c_matrix = CMatrix::Zero (); @@ -306,9 +306,9 @@ TEST (PCL, InverseSymmetric3x3d) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, Inverse2x2f) { - typedef float Scalar; - typedef Eigen::Matrix RMatrix; - typedef Eigen::Matrix CMatrix; + using Scalar = float; + using RMatrix = Eigen::Matrix; + using CMatrix = Eigen::Matrix; RMatrix r_matrix = RMatrix::Zero (); RMatrix r_inverse = RMatrix::Zero (); CMatrix c_matrix = CMatrix::Zero (); @@ -364,9 +364,9 @@ TEST (PCL, Inverse2x2f) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, Inverse2x2d) { - typedef double Scalar; - typedef Eigen::Matrix RMatrix; - typedef Eigen::Matrix CMatrix; + using Scalar = double; + using RMatrix = Eigen::Matrix; + using CMatrix = Eigen::Matrix; RMatrix r_matrix = RMatrix::Zero (); RMatrix r_inverse = RMatrix::Zero (); CMatrix c_matrix = CMatrix::Zero (); @@ -422,7 +422,7 @@ TEST (PCL, Inverse2x2d) template inline void generateSymPosMatrix2x2 (Matrix& matrix) { - typedef typename Matrix::Scalar Scalar; + using Scalar = typename Matrix::Scalar; unsigned test_case = rand_uint (rng) % 10; @@ -464,9 +464,9 @@ inline void generateSymPosMatrix2x2 (Matrix& matrix) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, eigen22d) { - typedef double Scalar; - typedef Eigen::Matrix RMatrix; - typedef Eigen::Matrix CMatrix; + using Scalar = double; + using RMatrix = Eigen::Matrix; + using CMatrix = Eigen::Matrix; RMatrix r_matrix; RMatrix r_vectors; Eigen::Matrix r_eigenvalues; @@ -522,9 +522,9 @@ TEST (PCL, eigen22d) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, eigen22f) { - typedef float Scalar; - typedef Eigen::Matrix RMatrix; - typedef Eigen::Matrix CMatrix; + using Scalar = float; + using RMatrix = Eigen::Matrix; + using CMatrix = Eigen::Matrix; RMatrix r_matrix; RMatrix r_vectors; Eigen::Matrix r_eigenvalues; @@ -582,7 +582,7 @@ TEST (PCL, eigen22f) template inline void generateSymPosMatrix3x3 (Matrix& matrix) { - typedef typename Matrix::Scalar Scalar; + using Scalar = typename Matrix::Scalar; // 3 equal elements != 0 // 2 equal elements none 0 @@ -661,9 +661,9 @@ inline void generateSymPosMatrix3x3 (Matrix& matrix) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, eigen33d) { - typedef double Scalar; - typedef Eigen::Matrix RMatrix; - typedef Eigen::Matrix CMatrix; + using Scalar = double; + using RMatrix = Eigen::Matrix; + using CMatrix = Eigen::Matrix; RMatrix r_matrix; RMatrix r_vectors; Eigen::Matrix r_eigenvalues; @@ -721,9 +721,9 @@ TEST (PCL, eigen33d) // some errors > 0.2 but less than 1% is > 1e-3 -> we will just check whether the failure rate is below 1% TEST (PCL, eigen33f) { - typedef float Scalar; - typedef Eigen::Matrix RMatrix; - typedef Eigen::Matrix CMatrix; + using Scalar = float; + using RMatrix = Eigen::Matrix; + using CMatrix = Eigen::Matrix; RMatrix r_matrix; RMatrix r_vectors; Eigen::Matrix r_eigenvalues; diff --git a/test/common/test_geometry.cpp b/test/common/test_geometry.cpp index 3c88671b551..cc44ff6d493 100644 --- a/test/common/test_geometry.cpp +++ b/test/common/test_geometry.cpp @@ -45,7 +45,7 @@ using namespace pcl; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template class XYZPointTypesTest : public ::testing::Test { }; -typedef ::testing::Types XYZPointTypes; +using XYZPointTypes = ::testing::Types; TYPED_TEST_CASE(XYZPointTypesTest, XYZPointTypes); TYPED_TEST(XYZPointTypesTest, Distance) diff --git a/test/common/test_io.cpp b/test/common/test_io.cpp index 63c0242acdb..b66f1117380 100644 --- a/test/common/test_io.cpp +++ b/test/common/test_io.cpp @@ -43,10 +43,10 @@ using namespace pcl; using namespace std; -typedef PointCloud CloudXYZRGBA; -typedef PointCloud CloudXYZRGB; -typedef PointCloud CloudXYZRGBNormal; -typedef PointCloud CloudXYZ; +using CloudXYZRGBA = PointCloud; +using CloudXYZRGB = PointCloud; +using CloudXYZRGBNormal = PointCloud; +using CloudXYZ = PointCloud; PointXYZRGBA pt_xyz_rgba, pt_xyz_rgba2; PointXYZRGB pt_xyz_rgb; diff --git a/test/common/test_transforms.cpp b/test/common/test_transforms.cpp index 6c204b59451..cd7ae710205 100644 --- a/test/common/test_transforms.cpp +++ b/test/common/test_transforms.cpp @@ -48,16 +48,17 @@ using namespace pcl; -typedef ::testing::Types, - Eigen::Transform, - Eigen::Matrix, - Eigen::Matrix > TransformTypes; +using TransformTypes = ::testing::Types + , + Eigen::Transform, + Eigen::Matrix, + Eigen::Matrix >; template class Transforms : public ::testing::Test { public: - typedef typename Transform::Scalar Scalar; + using Scalar = typename Transform::Scalar; Transforms () : ABS_ERROR (std::numeric_limits::epsilon () * 10) diff --git a/test/features/test_base_feature.cpp b/test/features/test_base_feature.cpp index 42ded9a6bb3..877eaf42756 100644 --- a/test/features/test_base_feature.cpp +++ b/test/features/test_base_feature.cpp @@ -47,7 +47,7 @@ using namespace pcl; using namespace pcl::io; using namespace std; -typedef search::KdTree::Ptr KdTreePtr; +using KdTreePtr = search::KdTree::Ptr; PointCloud cloud; vector indices; diff --git a/test/features/test_board_estimation.cpp b/test/features/test_board_estimation.cpp index 7a30256980b..a173103d94f 100644 --- a/test/features/test_board_estimation.cpp +++ b/test/features/test_board_estimation.cpp @@ -49,7 +49,7 @@ using namespace pcl::test; using namespace pcl::io; using namespace std; -typedef search::KdTree::Ptr KdTreePtr; +using KdTreePtr = search::KdTree::Ptr; PointCloud cloud; vector indices; diff --git a/test/features/test_boundary_estimation.cpp b/test/features/test_boundary_estimation.cpp index 3aeaa2bbdec..2c8e01be411 100644 --- a/test/features/test_boundary_estimation.cpp +++ b/test/features/test_boundary_estimation.cpp @@ -47,7 +47,7 @@ using namespace pcl; using namespace pcl::io; using namespace std; -typedef search::KdTree::Ptr KdTreePtr; +using KdTreePtr = search::KdTree::Ptr; PointCloud cloud; vector indices; diff --git a/test/features/test_brisk.cpp b/test/features/test_brisk.cpp index 6ec2291538d..0d02f55612b 100644 --- a/test/features/test_brisk.cpp +++ b/test/features/test_brisk.cpp @@ -47,8 +47,8 @@ using namespace pcl; using namespace pcl::io; using namespace std; -typedef PointXYZRGBA PointT; -typedef PointWithScale KeyPointT; +using PointT = PointXYZRGBA; +using KeyPointT = PointWithScale; PointCloud::Ptr cloud_image (new PointCloud); diff --git a/test/features/test_cppf_estimation.cpp b/test/features/test_cppf_estimation.cpp index d7f2a6aa2a0..aa4edc70bc8 100755 --- a/test/features/test_cppf_estimation.cpp +++ b/test/features/test_cppf_estimation.cpp @@ -42,7 +42,7 @@ #include #include -typedef pcl::PointXYZRGBNormal PointT; +using PointT = pcl::PointXYZRGBNormal; static pcl::PointCloud::Ptr cloud (new pcl::PointCloud ()); diff --git a/test/features/test_curvatures_estimation.cpp b/test/features/test_curvatures_estimation.cpp index f0ead818807..918f8340e01 100644 --- a/test/features/test_curvatures_estimation.cpp +++ b/test/features/test_curvatures_estimation.cpp @@ -47,7 +47,7 @@ using namespace pcl; using namespace pcl::io; using namespace std; -typedef search::KdTree::Ptr KdTreePtr; +using KdTreePtr = search::KdTree::Ptr; PointCloud cloud; vector indices; diff --git a/test/features/test_cvfh_estimation.cpp b/test/features/test_cvfh_estimation.cpp index b598d02f11a..2c2aa306ba2 100644 --- a/test/features/test_cvfh_estimation.cpp +++ b/test/features/test_cvfh_estimation.cpp @@ -48,8 +48,8 @@ using namespace pcl; using namespace pcl::io; using namespace std; -typedef search::KdTree::Ptr KdTreePtr; -typedef PointCloud::Ptr CloudPtr; +using KdTreePtr = search::KdTree::Ptr; +using CloudPtr = PointCloud::Ptr; PointCloud cloud; vector indices; diff --git a/test/features/test_flare_estimation.cpp b/test/features/test_flare_estimation.cpp index 0cfdcfeb4a8..a389b4b2156 100644 --- a/test/features/test_flare_estimation.cpp +++ b/test/features/test_flare_estimation.cpp @@ -44,8 +44,8 @@ #include #include -typedef pcl::search::KdTree::Ptr KdTreePtr; -typedef pcl::PointCloud::Ptr PointCloudPtr; +using KdTreePtr = pcl::search::KdTree::Ptr; +using PointCloudPtr = pcl::PointCloud::Ptr; PointCloudPtr cloud; KdTreePtr tree; diff --git a/test/features/test_ii_normals.cpp b/test/features/test_ii_normals.cpp index 5137c6bece9..c617f4ec604 100644 --- a/test/features/test_ii_normals.cpp +++ b/test/features/test_ii_normals.cpp @@ -46,7 +46,7 @@ using namespace pcl; using namespace std; -typedef search::KdTree::Ptr KdTreePtr; +using KdTreePtr = search::KdTree::Ptr; PointCloud cloud; KdTreePtr tree; diff --git a/test/features/test_invariants_estimation.cpp b/test/features/test_invariants_estimation.cpp index f18092bd67f..7d426a93275 100644 --- a/test/features/test_invariants_estimation.cpp +++ b/test/features/test_invariants_estimation.cpp @@ -46,7 +46,7 @@ using namespace pcl; using namespace pcl::io; using namespace std; -typedef search::KdTree::Ptr KdTreePtr; +using KdTreePtr = search::KdTree::Ptr; PointCloud cloud; vector indices; diff --git a/test/features/test_normal_estimation.cpp b/test/features/test_normal_estimation.cpp index 7a555ad9b3f..6aa4f8c665b 100644 --- a/test/features/test_normal_estimation.cpp +++ b/test/features/test_normal_estimation.cpp @@ -47,7 +47,7 @@ using namespace pcl; using namespace pcl::io; using namespace std; -typedef search::KdTree::Ptr KdTreePtr; +using KdTreePtr = search::KdTree::Ptr; PointCloud cloud; vector indices; diff --git a/test/features/test_pfh_estimation.cpp b/test/features/test_pfh_estimation.cpp index b552b9e54b6..38151560878 100644 --- a/test/features/test_pfh_estimation.cpp +++ b/test/features/test_pfh_estimation.cpp @@ -51,8 +51,8 @@ #include #include -typedef pcl::PointNormal PointT; -typedef pcl::search::KdTree::Ptr KdTreePtr; +using PointT = pcl::PointNormal; +using KdTreePtr = pcl::search::KdTree::Ptr; using pcl::PointCloud; static PointCloud::Ptr cloud (new PointCloud ()); @@ -66,8 +66,8 @@ testIndicesAndSearchSurface (const typename PointCloud::Ptr & points, const boost::shared_ptr > & indices, int ndims) { - typedef pcl::search::KdTree KdTreeT; - typedef FeatureEstimation FeatureEstimationT; + using KdTreeT = pcl::search::KdTree; + using FeatureEstimationT = FeatureEstimation; // // Test setIndices and setSearchSurface @@ -291,8 +291,9 @@ struct FPFHTest > }; // Types which will be instantiated -typedef ::testing::Types, - FPFHEstimationOMP > FPFHEstimatorTypes; +using FPFHEstimatorTypes = ::testing::Types + , + FPFHEstimationOMP >; TYPED_TEST_CASE (FPFHTest, FPFHEstimatorTypes); // This is a copy of the old FPFHEstimation test which will now diff --git a/test/features/test_ppf_estimation.cpp b/test/features/test_ppf_estimation.cpp index a292b4a423a..b749e8e4b8a 100644 --- a/test/features/test_ppf_estimation.cpp +++ b/test/features/test_ppf_estimation.cpp @@ -47,7 +47,7 @@ using namespace pcl; using namespace pcl::io; using namespace std; -typedef search::KdTree::Ptr KdTreePtr; +using KdTreePtr = search::KdTree::Ptr; PointCloud cloud; vector indices; diff --git a/test/features/test_rift_estimation.cpp b/test/features/test_rift_estimation.cpp index 933a2a13000..4fcaaee8e80 100644 --- a/test/features/test_rift_estimation.cpp +++ b/test/features/test_rift_estimation.cpp @@ -103,7 +103,7 @@ TEST (PCL, RIFTEstimation) } // Compute the RIFT features - typedef Histogram<32> RIFTDescriptor; + using RIFTDescriptor = Histogram<32>; RIFTEstimation rift_est; search::KdTree::Ptr treept4 (new search::KdTree (false)); rift_est.setSearchMethod (treept4); diff --git a/test/features/test_rsd_estimation.cpp b/test/features/test_rsd_estimation.cpp index 2d2d7fd027f..e9af1290335 100644 --- a/test/features/test_rsd_estimation.cpp +++ b/test/features/test_rsd_estimation.cpp @@ -82,7 +82,7 @@ TEST (PCL, RSDEstimation) rsd.setSaveHistograms (true); rsd.compute (*rsds); - typedef std::vector > vec_matrixXf; + using vec_matrixXf = std::vector >; boost::shared_ptr mat (new vec_matrixXf); mat = rsd.getHistograms(); diff --git a/test/features/test_shot_estimation.cpp b/test/features/test_shot_estimation.cpp index 180ae33d49b..12c97b9c306 100644 --- a/test/features/test_shot_estimation.cpp +++ b/test/features/test_shot_estimation.cpp @@ -51,7 +51,7 @@ using namespace pcl; using namespace pcl::io; using namespace std; -typedef search::KdTree::Ptr KdTreePtr; +using KdTreePtr = search::KdTree::Ptr; PointCloud cloud; vector indices; @@ -368,8 +368,9 @@ struct SHOTShapeTest > }; // Types which will be instantiated -typedef ::testing::Types, - SHOTEstimationOMP > SHOTEstimatorTypes; +using SHOTEstimatorTypes = ::testing::Types + , + SHOTEstimationOMP >; TYPED_TEST_CASE (SHOTShapeTest, SHOTEstimatorTypes); // This is a copy of the old SHOTShapeEstimation test which will now @@ -556,8 +557,9 @@ struct SHOTShapeAndColorTest, - SHOTColorEstimationOMP > SHOTColorEstimatorTypes; +using SHOTColorEstimatorTypes= ::testing::Types + , + SHOTColorEstimationOMP >; TYPED_TEST_CASE (SHOTShapeAndColorTest, SHOTColorEstimatorTypes); // This is a copy of the old SHOTShapeAndColorEstimation test which will now diff --git a/test/features/test_shot_lrf_estimation.cpp b/test/features/test_shot_lrf_estimation.cpp index 56734a5bfc6..3160e1b1b81 100644 --- a/test/features/test_shot_lrf_estimation.cpp +++ b/test/features/test_shot_lrf_estimation.cpp @@ -48,7 +48,7 @@ using namespace pcl::test; using namespace pcl::io; using namespace std; -typedef search::KdTree::Ptr KdTreePtr; +using KdTreePtr = search::KdTree::Ptr; PointCloud cloud; vector indices; diff --git a/test/features/test_spin_estimation.cpp b/test/features/test_spin_estimation.cpp index 9b50556fb0f..fb10a1551e6 100644 --- a/test/features/test_spin_estimation.cpp +++ b/test/features/test_spin_estimation.cpp @@ -48,7 +48,7 @@ using namespace pcl; using namespace pcl::io; using namespace std; -typedef search::KdTree::Ptr KdTreePtr; +using KdTreePtr = search::KdTree::Ptr; PointCloud cloud; vector indices; @@ -80,7 +80,7 @@ TEST (PCL, SpinImageEstimation) EXPECT_NEAR (normals->points[140].normal_y, -0.19499126, 1e-4); EXPECT_NEAR (normals->points[140].normal_z, -0.87091631, 1e-4); - typedef Histogram<153> SpinImage; + using SpinImage = Histogram<153>; SpinImageEstimation spin_est(8, 0.5, 16); // set parameters //spin_est.setInputWithNormals (cloud.makeShared (), normals); @@ -257,7 +257,7 @@ TEST (PCL, IntensitySpinEstimation) cloud_xyzi.width = static_cast (cloud_xyzi.points.size ()); // Compute the intensity-domain spin features - typedef Histogram<20> IntensitySpin; + using IntensitySpin = Histogram<20>; IntensitySpinEstimation ispin_est; search::KdTree::Ptr treept3 (new search::KdTree (false)); ispin_est.setSearchMethod (treept3); diff --git a/test/geometry/test_mesh.cpp b/test/geometry/test_mesh.cpp index 1dc05751ec1..d52d8c360fa 100644 --- a/test/geometry/test_mesh.cpp +++ b/test/geometry/test_mesh.cpp @@ -51,27 +51,27 @@ //////////////////////////////////////////////////////////////////////////////// -typedef pcl::geometry::VertexIndex VertexIndex; -typedef pcl::geometry::HalfEdgeIndex HalfEdgeIndex; -typedef pcl::geometry::EdgeIndex EdgeIndex; -typedef pcl::geometry::FaceIndex FaceIndex; +using VertexIndex = pcl::geometry::VertexIndex; +using HalfEdgeIndex = pcl::geometry::HalfEdgeIndex; +using EdgeIndex = pcl::geometry::EdgeIndex; +using FaceIndex = pcl::geometry::FaceIndex; -typedef std::vector VertexIndices; -typedef std::vector HalfEdgeIndices; -typedef std::vector FaceIndices; +using VertexIndices = std::vector; +using HalfEdgeIndices = std::vector; +using FaceIndices = std::vector; template struct MeshTraits { - typedef int VertexData; - typedef pcl::geometry::NoData HalfEdgeData; - typedef pcl::geometry::NoData EdgeData; - typedef pcl::geometry::NoData FaceData; - typedef std::integral_constant IsManifold; + using VertexData = int; + using HalfEdgeData = pcl::geometry::NoData; + using EdgeData = pcl::geometry::NoData; + using FaceData = pcl::geometry::NoData; + using IsManifold = std::integral_constant ; }; -typedef pcl::geometry::TriangleMesh > ManifoldTriangleMesh; -typedef pcl::geometry::TriangleMesh > NonManifoldTriangleMesh; +using ManifoldTriangleMesh = pcl::geometry::TriangleMesh >; +using NonManifoldTriangleMesh = pcl::geometry::TriangleMesh >; //////////////////////////////////////////////////////////////////////////////// @@ -86,7 +86,7 @@ TEST (TestAddDeleteFace, NonManifold1) NonManifoldTriangleMesh mesh; for (unsigned int i=0; i<6; ++i) mesh.addVertex (i); - typedef VertexIndex VI; + using VI = VertexIndex; VertexIndices vi; std::vector faces; vi.push_back (VI (0)); vi.push_back (VI (3)); vi.push_back (VI (1)); faces.push_back (vi); vi.clear (); // 0 @@ -143,7 +143,7 @@ TEST (TestAddDeleteFace, NonManifold2) { NonManifoldTriangleMesh mesh; for (unsigned int i=0; i<9; ++i) mesh.addVertex (i); - typedef VertexIndex VI; + using VI = VertexIndex; VertexIndices vi; std::vector faces; @@ -333,8 +333,8 @@ TEST (TestAddDeleteFace, NonManifold2) TEST (TestAddDeleteFace, Manifold1) { - typedef ManifoldTriangleMesh Mesh; - typedef VertexIndex VI; + using Mesh = ManifoldTriangleMesh; + using VI = VertexIndex; Mesh mesh; for (unsigned int i=0; i<7; ++i) mesh.addVertex (i); @@ -432,8 +432,8 @@ TEST (TestAddDeleteFace, Manifold1) TEST (TestAddDeleteFace, Manifold2) { - typedef ManifoldTriangleMesh Mesh; - typedef VertexIndex VI; + using Mesh = ManifoldTriangleMesh; + using VI = VertexIndex; // 1 ----- 3 // // \ \ / / // @@ -498,8 +498,8 @@ TEST (TestAddDeleteFace, Manifold2) TEST (TestDelete, VertexAndEdge) { - typedef NonManifoldTriangleMesh Mesh; - typedef VertexIndex VI; + using Mesh = NonManifoldTriangleMesh; + using VI = VertexIndex; Mesh mesh; for (unsigned int i=0; i<7; ++i) mesh.addVertex (i); @@ -578,7 +578,7 @@ TEST (TestMesh, IsBoundaryIsManifold) NonManifoldTriangleMesh mesh; for (unsigned int i=0; i<6; ++i) mesh.addVertex (i); - typedef VertexIndex VI; + using VI = VertexIndex; VertexIndices vi; std::vector faces; vi.push_back (VI (0)); vi.push_back (VI (3)); vi.push_back (VI (1)); faces.push_back (vi); vi.clear (); // 0 diff --git a/test/geometry/test_mesh_circulators.cpp b/test/geometry/test_mesh_circulators.cpp index 79314ece2d6..13afcd21286 100644 --- a/test/geometry/test_mesh_circulators.cpp +++ b/test/geometry/test_mesh_circulators.cpp @@ -49,33 +49,33 @@ class TestMeshCirculators : public ::testing::Test { protected: - typedef pcl::geometry::VertexIndex VertexIndex; - typedef pcl::geometry::HalfEdgeIndex HalfEdgeIndex; - typedef pcl::geometry::EdgeIndex EdgeIndex; - typedef pcl::geometry::FaceIndex FaceIndex; + using VertexIndex = pcl::geometry::VertexIndex; + using HalfEdgeIndex = pcl::geometry::HalfEdgeIndex; + using EdgeIndex = pcl::geometry::EdgeIndex; + using FaceIndex = pcl::geometry::FaceIndex; - typedef std::vector VertexIndices; - typedef std::vector HalfEdgeIndices; - typedef std::vector FaceIndices; + using VertexIndices = std::vector; + using HalfEdgeIndices = std::vector; + using FaceIndices = std::vector; struct MeshTraits { - typedef pcl::geometry::NoData VertexData; - typedef pcl::geometry::NoData HalfEdgeData; - typedef pcl::geometry::NoData EdgeData; - typedef pcl::geometry::NoData FaceData; - typedef std::true_type IsManifold; + using VertexData = pcl::geometry::NoData; + using HalfEdgeData = pcl::geometry::NoData; + using EdgeData = pcl::geometry::NoData; + using FaceData = pcl::geometry::NoData; + using IsManifold = std::true_type; }; - typedef pcl::geometry::TriangleMesh Mesh; - typedef Mesh::VertexAroundVertexCirculator VAVC; - typedef Mesh::OutgoingHalfEdgeAroundVertexCirculator OHEAVC; - typedef Mesh::IncomingHalfEdgeAroundVertexCirculator IHEAVC; - typedef Mesh::FaceAroundVertexCirculator FAVC; - typedef Mesh::VertexAroundFaceCirculator VAFC; - typedef Mesh::InnerHalfEdgeAroundFaceCirculator IHEAFC; - typedef Mesh::OuterHalfEdgeAroundFaceCirculator OHEAFC; - typedef Mesh::FaceAroundFaceCirculator FAFC; + using Mesh = pcl::geometry::TriangleMesh; + using VAVC = Mesh::VertexAroundVertexCirculator; + using OHEAVC = Mesh::OutgoingHalfEdgeAroundVertexCirculator; + using IHEAVC = Mesh::IncomingHalfEdgeAroundVertexCirculator; + using FAVC = Mesh::FaceAroundVertexCirculator; + using VAFC = Mesh::VertexAroundFaceCirculator; + using IHEAFC = Mesh::InnerHalfEdgeAroundFaceCirculator; + using OHEAFC = Mesh::OuterHalfEdgeAroundFaceCirculator; + using FAFC = Mesh::FaceAroundFaceCirculator; // 1 - 6 // // / \ / \ // @@ -88,7 +88,7 @@ class TestMeshCirculators : public ::testing::Test for (int i=0; i<7; ++i) mesh_.addVertex (); VertexIndices vi; - typedef VertexIndex VI; + using VI = VertexIndex; vi.push_back (VI (0)); vi.push_back (VI (1)); vi.push_back (VI (2)); faces_.push_back (vi); vi.clear (); vi.push_back (VI (0)); vi.push_back (VI (2)); vi.push_back (VI (3)); faces_.push_back (vi); vi.clear (); vi.push_back (VI (0)); vi.push_back (VI (3)); vi.push_back (VI (4)); faces_.push_back (vi); vi.clear (); diff --git a/test/geometry/test_mesh_common_functions.h b/test/geometry/test_mesh_common_functions.h index 209cd4029b8..ade79221195 100644 --- a/test/geometry/test_mesh_common_functions.h +++ b/test/geometry/test_mesh_common_functions.h @@ -55,9 +55,9 @@ const unsigned int max_number_boundary_vertices = 100; template bool hasFaces (const MeshT& mesh, const std::vector &faces, const bool verbose = false) { - typedef typename MeshT::VertexAroundFaceCirculator VAFC; - typedef typename MeshT::VertexIndices VertexIndices; - typedef typename MeshT::FaceIndex FaceIndex; + using VAFC = typename MeshT::VertexAroundFaceCirculator; + using VertexIndices = typename MeshT::VertexIndices; + using FaceIndex = typename MeshT::FaceIndex; if (mesh.sizeFaces () != faces.size ()) { @@ -116,9 +116,9 @@ hasFaces (const MeshT& mesh, const std::vector & template bool hasFaces (const MeshT& mesh, const std::vector > &faces, const bool verbose = false) { - typedef typename MeshT::VertexAroundFaceCirculator VAFC; - typedef typename MeshT::FaceIndex FaceIndex; - typedef typename MeshT::VertexDataCloud VertexDataCloud; + using VAFC = typename MeshT::VertexAroundFaceCirculator; + using FaceIndex = typename MeshT::FaceIndex; + using VertexDataCloud = typename MeshT::VertexDataCloud; if (mesh.sizeFaces () != faces.size ()) { @@ -177,9 +177,9 @@ hasFaces (const MeshT& mesh, const std::vector > &faces, cons template typename MeshT::VertexIndices getBoundaryVertices (const MeshT& mesh, const typename MeshT::VertexIndex& first, const bool verbose = false) { - typedef typename MeshT::VertexAroundFaceCirculator VAFC; - typedef typename MeshT::HalfEdgeIndex HalfEdgeIndex; - typedef typename MeshT::VertexIndices VertexIndices; + using VAFC = typename MeshT::VertexAroundFaceCirculator; + using HalfEdgeIndex = typename MeshT::HalfEdgeIndex; + using VertexIndices = typename MeshT::VertexIndices; const HalfEdgeIndex boundary_he = mesh.getOutgoingHalfEdgeIndex (first); if (!mesh.isBoundary (boundary_he)) @@ -217,9 +217,9 @@ getBoundaryVertices (const MeshT& mesh, const typename MeshT::VertexIndex& first template std::vector getBoundaryVertices (const MeshT& mesh, const int first, const bool verbose = false) { - typedef typename MeshT::VertexAroundFaceCirculator VAFC; - typedef typename MeshT::VertexIndex VertexIndex; - typedef typename MeshT::HalfEdgeIndex HalfEdgeIndex; + using VAFC = typename MeshT::VertexAroundFaceCirculator; + using VertexIndex = typename MeshT::VertexIndex; + using HalfEdgeIndex = typename MeshT::HalfEdgeIndex; const HalfEdgeIndex boundary_he = mesh.getOutgoingHalfEdgeIndex (VertexIndex (first)); if (!mesh.isBoundary (boundary_he)) @@ -333,8 +333,8 @@ findHalfEdge (const MeshT& mesh, const typename MeshT::VertexIndex& idx_v_0, const typename MeshT::VertexIndex& idx_v_1) { - typedef typename MeshT::HalfEdgeIndex HalfEdgeIndex; - typedef typename MeshT::VertexAroundVertexCirculator VAVC; + using HalfEdgeIndex = typename MeshT::HalfEdgeIndex; + using VAVC = typename MeshT::VertexAroundVertexCirculator; if (mesh.isIsolated (idx_v_0) || mesh.isIsolated (idx_v_1)) { diff --git a/test/geometry/test_mesh_conversion.cpp b/test/geometry/test_mesh_conversion.cpp index 4ad0f6e212a..c6b12a7d1cc 100644 --- a/test/geometry/test_mesh_conversion.cpp +++ b/test/geometry/test_mesh_conversion.cpp @@ -58,7 +58,7 @@ class TestMeshConversion : public ::testing::Test { protected: - typedef MeshTraitsT MeshTraits; + using MeshTraits = MeshTraitsT; // 2 - 1 7 - 6 17 - 16 // // \ / | | / \ // @@ -139,17 +139,17 @@ class TestMeshConversion : public ::testing::Test template struct MeshTraits { - typedef pcl::PointXYZRGBNormal VertexData; - typedef pcl::geometry::NoData HalfEdgeData; - typedef pcl::geometry::NoData EdgeData; - typedef pcl::geometry::NoData FaceData; - typedef std::integral_constant IsManifold; + using VertexData = pcl::PointXYZRGBNormal; + using HalfEdgeData = pcl::geometry::NoData; + using EdgeData = pcl::geometry::NoData; + using FaceData = pcl::geometry::NoData; + using IsManifold = std::integral_constant ; }; -typedef MeshTraits ManifoldMeshTraits; -typedef MeshTraits NonManifoldMeshTraits; +using ManifoldMeshTraits = MeshTraits; +using NonManifoldMeshTraits = MeshTraits; -typedef testing::Types MeshTraitsTypes; +using MeshTraitsTypes = testing::Types ; TYPED_TEST_CASE (TestMeshConversion, MeshTraitsTypes); @@ -157,10 +157,10 @@ TYPED_TEST_CASE (TestMeshConversion, MeshTraitsTypes); TYPED_TEST (TestMeshConversion, HalfEdgeMeshToFaceVertexMesh) { - typedef typename TestFixture::MeshTraits Traits; - typedef pcl::geometry::PolygonMesh Mesh; - typedef typename Mesh::VertexIndex VertexIndex; - typedef typename Mesh::VertexIndices VertexIndices; + using Traits = typename TestFixture::MeshTraits; + using Mesh = pcl::geometry::PolygonMesh; + using VertexIndex = typename Mesh::VertexIndex; + using VertexIndices = typename Mesh::VertexIndices; const std::vector > faces = Mesh::IsManifold::value ? this->manifold_faces_ : @@ -224,10 +224,10 @@ TYPED_TEST (TestMeshConversion, HalfEdgeMeshToFaceVertexMesh) TYPED_TEST (TestMeshConversion, FaceVertexMeshToHalfEdgeMesh) { - typedef typename TestFixture::MeshTraits Traits; - typedef pcl::geometry::PolygonMesh Mesh; - typedef typename Mesh::FaceIndex FaceIndex; - typedef typename Mesh::VertexAroundFaceCirculator VAFC; + using Traits = typename TestFixture::MeshTraits; + using Mesh = pcl::geometry::PolygonMesh; + using FaceIndex = typename Mesh::FaceIndex; + using VAFC = typename Mesh::VertexAroundFaceCirculator; // Generate the mesh pcl::PolygonMesh face_vertex_mesh; @@ -294,8 +294,8 @@ TYPED_TEST (TestMeshConversion, FaceVertexMeshToHalfEdgeMesh) //TEST (TestFaceVertexMeshToHalfEdgeMesh, NoVertexData) //{ -// typedef pcl::geometry::DefaultMeshTraits <> MeshTraits; -// typedef pcl::geometry::PolygonMesh Mesh; +// using MeshTraits = pcl::geometry::DefaultMeshTraits <>; +// using Mesh = pcl::geometry::PolygonMesh ; // Mesh half_edge_mesh; // pcl::PolygonMesh face_vertex_mesh; @@ -307,10 +307,10 @@ TYPED_TEST (TestMeshConversion, FaceVertexMeshToHalfEdgeMesh) TYPED_TEST (TestMeshConversion, NonConvertibleCases) { - typedef typename TestFixture::MeshTraits Traits; - typedef pcl::geometry::TriangleMesh TriangleMesh; - typedef pcl::geometry::QuadMesh QuadMesh; - typedef pcl::geometry::PolygonMesh PolygonMesh; + using Traits = typename TestFixture::MeshTraits; + using TriangleMesh = pcl::geometry::TriangleMesh; + using QuadMesh = pcl::geometry::QuadMesh; + using PolygonMesh = pcl::geometry::PolygonMesh; // Generate the mesh pcl::PolygonMesh face_vertex_mesh; diff --git a/test/geometry/test_mesh_data.cpp b/test/geometry/test_mesh_data.cpp index 68e7fbd38af..9abc999a6ed 100644 --- a/test/geometry/test_mesh_data.cpp +++ b/test/geometry/test_mesh_data.cpp @@ -45,27 +45,27 @@ //////////////////////////////////////////////////////////////////////////////// -typedef pcl::geometry::NoData NoData; -typedef pcl::geometry::DefaultMeshTraits TraitsV; -typedef pcl::geometry::DefaultMeshTraits TraitsHE; -typedef pcl::geometry::DefaultMeshTraits TraitsE; -typedef pcl::geometry::DefaultMeshTraits TraitsF; -typedef pcl::geometry::DefaultMeshTraits TraitsAD; - -typedef pcl::geometry::PolygonMesh MeshV; -typedef pcl::geometry::PolygonMesh MeshHE; -typedef pcl::geometry::PolygonMesh MeshE; -typedef pcl::geometry::PolygonMesh MeshF; -typedef pcl::geometry::PolygonMesh MeshAD; - -typedef pcl::geometry::VertexIndex VertexIndex; -typedef pcl::geometry::HalfEdgeIndex HalfEdgeIndex; -typedef pcl::geometry::EdgeIndex EdgeIndex; -typedef pcl::geometry::FaceIndex FaceIndex; - -typedef std::vector VertexIndices; -typedef std::vector HalfEdgeIndices; -typedef std::vector FaceIndices; +using NoData = pcl::geometry::NoData; +using TraitsV = pcl::geometry::DefaultMeshTraits ; +using TraitsHE = pcl::geometry::DefaultMeshTraits ; +using TraitsE = pcl::geometry::DefaultMeshTraits ; +using TraitsF = pcl::geometry::DefaultMeshTraits ; +using TraitsAD = pcl::geometry::DefaultMeshTraits ; + +using MeshV = pcl::geometry::PolygonMesh; +using MeshHE = pcl::geometry::PolygonMesh; +using MeshE = pcl::geometry::PolygonMesh; +using MeshF = pcl::geometry::PolygonMesh; +using MeshAD = pcl::geometry::PolygonMesh; + +using VertexIndex = pcl::geometry::VertexIndex; +using HalfEdgeIndex = pcl::geometry::HalfEdgeIndex; +using EdgeIndex = pcl::geometry::EdgeIndex; +using FaceIndex = pcl::geometry::FaceIndex; + +using VertexIndices = std::vector; +using HalfEdgeIndices = std::vector; +using FaceIndices = std::vector; //////////////////////////////////////////////////////////////////////////////// diff --git a/test/geometry/test_mesh_get_boundary.cpp b/test/geometry/test_mesh_get_boundary.cpp index 938baa7badb..6fc82c7f644 100644 --- a/test/geometry/test_mesh_get_boundary.cpp +++ b/test/geometry/test_mesh_get_boundary.cpp @@ -49,23 +49,23 @@ template struct MeshTraits { - typedef pcl::geometry::NoData VertexData; - typedef pcl::geometry::NoData HalfEdgeData; - typedef pcl::geometry::NoData EdgeData; - typedef pcl::geometry::NoData FaceData; - typedef std::integral_constant IsManifold; + using VertexData = pcl::geometry::NoData; + using HalfEdgeData = pcl::geometry::NoData; + using EdgeData = pcl::geometry::NoData; + using FaceData = pcl::geometry::NoData; + using IsManifold = std::integral_constant ; }; -typedef pcl::geometry::PolygonMesh > ManifoldMesh; -typedef pcl::geometry::PolygonMesh > NonManifoldMesh; +using ManifoldMesh = pcl::geometry::PolygonMesh >; +using NonManifoldMesh = pcl::geometry::PolygonMesh >; -typedef testing::Types MeshTypes; +using MeshTypes = testing::Types ; template class TestGetBoundary : public testing::Test { protected: - typedef MeshT Mesh; + using Mesh = MeshT; }; TYPED_TEST_CASE (TestGetBoundary, MeshTypes); @@ -74,11 +74,11 @@ TYPED_TEST_CASE (TestGetBoundary, MeshTypes); TYPED_TEST (TestGetBoundary, GetBoundaryHalfEdges) { - typedef typename TestFixture::Mesh Mesh; + using Mesh = typename TestFixture::Mesh; - typedef typename Mesh::VertexIndices VertexIndices; - typedef typename Mesh::HalfEdgeIndices HalfEdgeIndices; + using VertexIndices = typename Mesh::VertexIndices; + using HalfEdgeIndices = typename Mesh::HalfEdgeIndices; // 0 - 1 - 2 - 3 // | | | | diff --git a/test/geometry/test_mesh_indices.cpp b/test/geometry/test_mesh_indices.cpp index 5f8163667e8..39e098cd2a1 100644 --- a/test/geometry/test_mesh_indices.cpp +++ b/test/geometry/test_mesh_indices.cpp @@ -47,10 +47,10 @@ //////////////////////////////////////////////////////////////////////////////// -typedef pcl::geometry::VertexIndex VertexIndex; -typedef pcl::geometry::HalfEdgeIndex HalfEdgeIndex; -typedef pcl::geometry::EdgeIndex EdgeIndex; -typedef pcl::geometry::FaceIndex FaceIndex; +using VertexIndex = pcl::geometry::VertexIndex; +using HalfEdgeIndex = pcl::geometry::HalfEdgeIndex; +using EdgeIndex = pcl::geometry::EdgeIndex; +using FaceIndex = pcl::geometry::FaceIndex; //////////////////////////////////////////////////////////////////////////////// @@ -58,10 +58,10 @@ template class TestMeshIndicesTyped : public testing::Test { protected: - typedef MeshIndexT MeshIndex; + using MeshIndex = MeshIndexT; }; -typedef testing::Types MeshIndexTypes; +using MeshIndexTypes = testing::Types ; TYPED_TEST_CASE (TestMeshIndicesTyped, MeshIndexTypes); @@ -69,7 +69,7 @@ TYPED_TEST_CASE (TestMeshIndicesTyped, MeshIndexTypes); TYPED_TEST (TestMeshIndicesTyped, General) { - typedef typename TestFixture::MeshIndex MeshIndex; + using MeshIndex = typename TestFixture::MeshIndex; MeshIndex vi0, vi1 (-5), vi2 (0), vi3 (5), vi4 (5), vi5 (6); EXPECT_FALSE (vi0.isValid ()); diff --git a/test/geometry/test_mesh_io.cpp b/test/geometry/test_mesh_io.cpp index 29bf3113031..d4161a3aab5 100644 --- a/test/geometry/test_mesh_io.cpp +++ b/test/geometry/test_mesh_io.cpp @@ -49,13 +49,13 @@ //////////////////////////////////////////////////////////////////////////////// -typedef pcl::geometry::DefaultMeshTraits <> MeshTraits; -typedef pcl::geometry::TriangleMesh Mesh; -typedef pcl::geometry::MeshIO MeshIO; +using MeshTraits = pcl::geometry::DefaultMeshTraits<>; +using Mesh = pcl::geometry::TriangleMesh; +using MeshIO = pcl::geometry::MeshIO; -typedef Mesh::VertexIndex VertexIndex; -typedef Mesh::HalfEdgeIndex HalfEdgeIndex; -typedef Mesh::FaceIndex FaceIndex; +using VertexIndex = Mesh::VertexIndex; +using HalfEdgeIndex = Mesh::HalfEdgeIndex; +using FaceIndex = Mesh::FaceIndex; //////////////////////////////////////////////////////////////////////////////// diff --git a/test/geometry/test_polygon_mesh.cpp b/test/geometry/test_polygon_mesh.cpp index 94d35c6460d..160b45e1e8f 100644 --- a/test/geometry/test_polygon_mesh.cpp +++ b/test/geometry/test_polygon_mesh.cpp @@ -51,35 +51,35 @@ //////////////////////////////////////////////////////////////////////////////// -typedef pcl::geometry::VertexIndex VertexIndex; -typedef pcl::geometry::HalfEdgeIndex HalfEdgeIndex; -typedef pcl::geometry::EdgeIndex EdgeIndex; -typedef pcl::geometry::FaceIndex FaceIndex; +using VertexIndex = pcl::geometry::VertexIndex; +using HalfEdgeIndex = pcl::geometry::HalfEdgeIndex; +using EdgeIndex = pcl::geometry::EdgeIndex; +using FaceIndex = pcl::geometry::FaceIndex; -typedef std::vector VertexIndices; -typedef std::vector HalfEdgeIndices; -typedef std::vector FaceIndices; +using VertexIndices = std::vector; +using HalfEdgeIndices = std::vector; +using FaceIndices = std::vector; template struct MeshTraits { - typedef int VertexData; - typedef pcl::geometry::NoData HalfEdgeData; - typedef pcl::geometry::NoData EdgeData; - typedef pcl::geometry::NoData FaceData; - typedef std::integral_constant IsManifold; + using VertexData = int; + using HalfEdgeData = pcl::geometry::NoData; + using EdgeData = pcl::geometry::NoData; + using FaceData = pcl::geometry::NoData; + using IsManifold = std::integral_constant ; }; -typedef pcl::geometry::PolygonMesh > ManifoldPolygonMesh; -typedef pcl::geometry::PolygonMesh > NonManifoldPolygonMesh; +using ManifoldPolygonMesh = pcl::geometry::PolygonMesh >; +using NonManifoldPolygonMesh = pcl::geometry::PolygonMesh >; -typedef testing::Types PolygonMeshTypes; +using PolygonMeshTypes = testing::Types ; template class TestPolygonMesh : public testing::Test { protected: - typedef MeshT Mesh; + using Mesh = MeshT; }; TYPED_TEST_CASE (TestPolygonMesh, PolygonMeshTypes); @@ -88,8 +88,8 @@ TYPED_TEST_CASE (TestPolygonMesh, PolygonMeshTypes); TYPED_TEST (TestPolygonMesh, CorrectMeshTag) { - typedef typename TestFixture::Mesh Mesh; - typedef typename Mesh::MeshTag MeshTag; + using Mesh = typename TestFixture::Mesh; + using MeshTag = typename Mesh::MeshTag; ASSERT_EQ (typeid (pcl::geometry::PolygonMeshTag), typeid (MeshTag)); } @@ -100,7 +100,7 @@ TYPED_TEST (TestPolygonMesh, CorrectMeshTag) //TYPED_TEST (TestPolygonMesh, OutOfRange) //{ -// typedef typename TestFixture::Mesh Mesh; +// using Mesh = typename TestFixture::Mesh; // Mesh mesh; // VertexIndices vi; @@ -125,7 +125,7 @@ TYPED_TEST (TestPolygonMesh, CorrectMeshTag) TYPED_TEST (TestPolygonMesh, CorrectNumberOfVertices) { // Make sure that only quads can be added - typedef typename TestFixture::Mesh Mesh; + using Mesh = typename TestFixture::Mesh; for (unsigned int n=1; n<=5; ++n) { @@ -147,7 +147,7 @@ TYPED_TEST (TestPolygonMesh, CorrectNumberOfVertices) TYPED_TEST (TestPolygonMesh, ThreePolygons) { - typedef typename TestFixture::Mesh Mesh; + using Mesh = typename TestFixture::Mesh; // 1 - 6 // // / \ \ // diff --git a/test/geometry/test_quad_mesh.cpp b/test/geometry/test_quad_mesh.cpp index 7e362db24d6..819a8886c50 100644 --- a/test/geometry/test_quad_mesh.cpp +++ b/test/geometry/test_quad_mesh.cpp @@ -49,35 +49,35 @@ //////////////////////////////////////////////////////////////////////////////// -typedef pcl::geometry::VertexIndex VertexIndex; -typedef pcl::geometry::HalfEdgeIndex HalfEdgeIndex; -typedef pcl::geometry::EdgeIndex EdgeIndex; -typedef pcl::geometry::FaceIndex FaceIndex; +using VertexIndex = pcl::geometry::VertexIndex; +using HalfEdgeIndex = pcl::geometry::HalfEdgeIndex; +using EdgeIndex = pcl::geometry::EdgeIndex; +using FaceIndex = pcl::geometry::FaceIndex; -typedef std::vector VertexIndices; -typedef std::vector HalfEdgeIndices; -typedef std::vector FaceIndices; +using VertexIndices = std::vector; +using HalfEdgeIndices = std::vector; +using FaceIndices = std::vector; template struct MeshTraits { - typedef int VertexData; - typedef pcl::geometry::NoData HalfEdgeData; - typedef pcl::geometry::NoData EdgeData; - typedef pcl::geometry::NoData FaceData; - typedef std::integral_constant IsManifold; + using VertexData = int; + using HalfEdgeData = pcl::geometry::NoData; + using EdgeData = pcl::geometry::NoData; + using FaceData = pcl::geometry::NoData; + using IsManifold = std::integral_constant ; }; -typedef pcl::geometry::QuadMesh > ManifoldQuadMesh; -typedef pcl::geometry::QuadMesh > NonManifoldQuadMesh; +using ManifoldQuadMesh = pcl::geometry::QuadMesh >; +using NonManifoldQuadMesh = pcl::geometry::QuadMesh >; -typedef testing::Types QuadMeshTypes; +using QuadMeshTypes = testing::Types ; template class TestQuadMesh : public testing::Test { protected: - typedef MeshT Mesh; + using Mesh = MeshT; }; TYPED_TEST_CASE (TestQuadMesh, QuadMeshTypes); @@ -86,8 +86,8 @@ TYPED_TEST_CASE (TestQuadMesh, QuadMeshTypes); TYPED_TEST (TestQuadMesh, CorrectMeshTag) { - typedef typename TestFixture::Mesh Mesh; - typedef typename Mesh::MeshTag MeshTag; + using Mesh = typename TestFixture::Mesh; + using MeshTag = typename Mesh::MeshTag; ASSERT_EQ (typeid (pcl::geometry::QuadMeshTag), typeid (MeshTag)); } @@ -97,7 +97,7 @@ TYPED_TEST (TestQuadMesh, CorrectMeshTag) TYPED_TEST (TestQuadMesh, CorrectNumberOfVertices) { // Make sure that only quads can be added - typedef typename TestFixture::Mesh Mesh; + using Mesh = typename TestFixture::Mesh; for (unsigned int n=1; n<=5; ++n) { @@ -119,7 +119,7 @@ TYPED_TEST (TestQuadMesh, CorrectNumberOfVertices) TYPED_TEST (TestQuadMesh, OneQuad) { - typedef typename TestFixture::Mesh Mesh; + using Mesh = typename TestFixture::Mesh; // 3 - 2 // // | | // @@ -221,7 +221,7 @@ TYPED_TEST (TestQuadMesh, OneQuad) TYPED_TEST (TestQuadMesh, NineQuads) { - typedef typename TestFixture::Mesh Mesh; + using Mesh = typename TestFixture::Mesh; const int int_max = std::numeric_limits ::max (); // Order @@ -329,7 +329,7 @@ TYPED_TEST (TestQuadMesh, NineQuads) // 08 - 09 - 10 - 11 // // | | | | // // 12 - 13 - 14 - 15 // - typedef VertexIndex VI; + using VI = VertexIndex; std::vector faces; VertexIndices vi; vi.push_back (VI ( 0)); vi.push_back (VI ( 4)); vi.push_back (VI ( 5)); vi.push_back (VI ( 1)); faces.push_back (vi); vi.clear (); diff --git a/test/geometry/test_triangle_mesh.cpp b/test/geometry/test_triangle_mesh.cpp index 47fa2746197..b7cf4e3ce33 100644 --- a/test/geometry/test_triangle_mesh.cpp +++ b/test/geometry/test_triangle_mesh.cpp @@ -49,35 +49,35 @@ //////////////////////////////////////////////////////////////////////////////// -typedef pcl::geometry::VertexIndex VertexIndex; -typedef pcl::geometry::HalfEdgeIndex HalfEdgeIndex; -typedef pcl::geometry::EdgeIndex EdgeIndex; -typedef pcl::geometry::FaceIndex FaceIndex; +using VertexIndex = pcl::geometry::VertexIndex; +using HalfEdgeIndex = pcl::geometry::HalfEdgeIndex; +using EdgeIndex = pcl::geometry::EdgeIndex; +using FaceIndex = pcl::geometry::FaceIndex; -typedef std::vector VertexIndices; -typedef std::vector HalfEdgeIndices; -typedef std::vector FaceIndices; +using VertexIndices = std::vector; +using HalfEdgeIndices = std::vector; +using FaceIndices = std::vector; template struct MeshTraits { - typedef int VertexData; - typedef pcl::geometry::NoData HalfEdgeData; - typedef pcl::geometry::NoData EdgeData; - typedef pcl::geometry::NoData FaceData; - typedef std::integral_constant IsManifold; + using VertexData = int; + using HalfEdgeData = pcl::geometry::NoData; + using EdgeData = pcl::geometry::NoData; + using FaceData = pcl::geometry::NoData; + using IsManifold = std::integral_constant ; }; -typedef pcl::geometry::TriangleMesh > ManifoldTriangleMesh; -typedef pcl::geometry::TriangleMesh > NonManifoldTriangleMesh; +using ManifoldTriangleMesh = pcl::geometry::TriangleMesh >; +using NonManifoldTriangleMesh = pcl::geometry::TriangleMesh >; -typedef testing::Types TriangleMeshTypes; +using TriangleMeshTypes = testing::Types ; template class TestTriangleMesh : public testing::Test { protected: - typedef MeshT Mesh; + using Mesh = MeshT; }; TYPED_TEST_CASE (TestTriangleMesh, TriangleMeshTypes); @@ -86,8 +86,8 @@ TYPED_TEST_CASE (TestTriangleMesh, TriangleMeshTypes); TYPED_TEST (TestTriangleMesh, CorrectMeshTag) { - typedef typename TestFixture::Mesh Mesh; - typedef typename Mesh::MeshTag MeshTag; + using Mesh = typename TestFixture::Mesh; + using MeshTag = typename Mesh::MeshTag; ASSERT_EQ (typeid (pcl::geometry::TriangleMeshTag), typeid (MeshTag)); } @@ -97,7 +97,7 @@ TYPED_TEST (TestTriangleMesh, CorrectMeshTag) TYPED_TEST (TestTriangleMesh, CorrectNumberOfVertices) { // Make sure that only quads can be added - typedef typename TestFixture::Mesh Mesh; + using Mesh = typename TestFixture::Mesh; for (unsigned int n=1; n<=5; ++n) { @@ -119,7 +119,7 @@ TYPED_TEST (TestTriangleMesh, CorrectNumberOfVertices) TYPED_TEST (TestTriangleMesh, OneTriangle) { - typedef typename TestFixture::Mesh Mesh; + using Mesh = typename TestFixture::Mesh; // 2 // // / \ // @@ -205,7 +205,7 @@ TYPED_TEST (TestTriangleMesh, OneTriangle) TYPED_TEST (TestTriangleMesh, TwoTriangles) { - typedef typename TestFixture::Mesh Mesh; + using Mesh = typename TestFixture::Mesh; // 3 - 2 // // \ / \ // @@ -341,7 +341,7 @@ TYPED_TEST (TestTriangleMesh, TwoTriangles) TYPED_TEST (TestTriangleMesh, ThreeTriangles) { - typedef typename TestFixture::Mesh Mesh; + using Mesh = typename TestFixture::Mesh; // 1 ----- 3 // // \ \ / / // diff --git a/test/io/test_buffers.cpp b/test/io/test_buffers.cpp index 1a4cbc1f92c..415c5a469dd 100644 --- a/test/io/test_buffers.cpp +++ b/test/io/test_buffers.cpp @@ -83,7 +83,7 @@ class BuffersTest : public ::testing::Test }; -typedef ::testing::Types DataTypes; +using DataTypes = ::testing::Types; TYPED_TEST_CASE (BuffersTest, DataTypes); TYPED_TEST (BuffersTest, SingleBuffer) diff --git a/test/io/test_grabbers.cpp b/test/io/test_grabbers.cpp index de1250d5246..7f4f3d7ef1c 100644 --- a/test/io/test_grabbers.cpp +++ b/test/io/test_grabbers.cpp @@ -12,8 +12,8 @@ using namespace std; using namespace std::chrono_literals; -typedef pcl::PointXYZRGBA PointT; -typedef pcl::PointCloud CloudT; +using PointT = pcl::PointXYZRGBA; +using CloudT = pcl::PointCloud; string tiff_dir_; string pclzf_dir_; diff --git a/test/io/test_io.cpp b/test/io/test_io.cpp index 75e780aae6d..2b065666cc2 100644 --- a/test/io/test_io.cpp +++ b/test/io/test_io.cpp @@ -1319,7 +1319,7 @@ TEST (PCL, Locale) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template class AutoIOTest : public testing::Test { }; -typedef ::testing::Types PCLXyzNormalPointTypes; +using PCLXyzNormalPointTypes = ::testing::Types; TYPED_TEST_CASE (AutoIOTest, PCLXyzNormalPointTypes); TYPED_TEST (AutoIOTest, AutoLoadCloudFiles) { diff --git a/test/io/test_iterators.cpp b/test/io/test_iterators.cpp index 3d053efd356..2612d12c9c9 100644 --- a/test/io/test_iterators.cpp +++ b/test/io/test_iterators.cpp @@ -43,8 +43,8 @@ #include #include -typedef pcl::PointXYZ Point; -typedef pcl::PointCloud PointCloud; +using Point = pcl::PointXYZ; +using PointCloud = pcl::PointCloud; PointCloud cloud; diff --git a/test/io/test_ply_io.cpp b/test/io/test_ply_io.cpp index 116431ccb91..0207aed50d0 100644 --- a/test/io/test_ply_io.cpp +++ b/test/io/test_ply_io.cpp @@ -287,7 +287,7 @@ TEST_F (PLYColorTest, LoadPLYFileColoredASCIIIntoPolygonMesh) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template class PLYPointCloudTest : public PLYColorTest { }; -typedef ::testing::Types RGBPointTypes; +using RGBPointTypes = ::testing::Types; TYPED_TEST_CASE (PLYPointCloudTest, RGBPointTypes); TYPED_TEST (PLYPointCloudTest, LoadPLYFileColoredASCIIIntoPointCloud) { @@ -315,7 +315,7 @@ TYPED_TEST (PLYPointCloudTest, LoadPLYFileColoredASCIIIntoPointCloud) template struct PLYCoordinatesIsDenseTest : public PLYTest {}; -typedef ::testing::Types XYZPointTypes; +using XYZPointTypes = ::testing::Types; TYPED_TEST_CASE (PLYCoordinatesIsDenseTest, XYZPointTypes); TYPED_TEST (PLYCoordinatesIsDenseTest, NaNInCoordinates) @@ -409,7 +409,7 @@ TYPED_TEST (PLYCoordinatesIsDenseTest, InfInCoordinates) template struct PLYNormalsIsDenseTest : public PLYTest {}; -typedef ::testing::Types NormalPointTypes; +using NormalPointTypes = ::testing::Types; TYPED_TEST_CASE (PLYNormalsIsDenseTest, NormalPointTypes); TYPED_TEST (PLYNormalsIsDenseTest, NaNInNormals) diff --git a/test/io/test_point_cloud_image_extractors.cpp b/test/io/test_point_cloud_image_extractors.cpp index add0db737bf..3152bd9c476 100644 --- a/test/io/test_point_cloud_image_extractors.cpp +++ b/test/io/test_point_cloud_image_extractors.cpp @@ -49,7 +49,7 @@ using namespace pcl::io; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, PointCloudImageExtractorFromNormalField) { - typedef PointNormal PointT; + using PointT = PointNormal; PointCloud cloud; cloud.width = 2; cloud.height = 2; @@ -87,7 +87,7 @@ TEST (PCL, PointCloudImageExtractorFromNormalField) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, PointCloudImageExtractorFromRGBField) { - typedef PointXYZRGB PointT; + using PointT = PointXYZRGB; PointCloud cloud; cloud.width = 2; cloud.height = 2; @@ -125,7 +125,7 @@ TEST (PCL, PointCloudImageExtractorFromRGBField) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, PointCloudImageExtractorFromRGBAField) { - typedef PointXYZRGBA PointT; + using PointT = PointXYZRGBA; PointCloud cloud; cloud.width = 2; cloud.height = 2; @@ -164,7 +164,7 @@ TEST (PCL, PointCloudImageExtractorFromRGBAField) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, PointCloudImageExtractorFromLabelFieldMono) { - typedef PointXYZL PointT; + using PointT = PointXYZL; PointCloud cloud; cloud.width = 2; cloud.height = 2; @@ -191,7 +191,7 @@ TEST (PCL, PointCloudImageExtractorFromLabelFieldMono) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, PointCloudImageExtractorFromLabelFieldRGB) { - typedef PointXYZL PointT; + using PointT = PointXYZL; PointCloud cloud; cloud.width = 2; cloud.height = 2; @@ -229,7 +229,7 @@ TEST (PCL, PointCloudImageExtractorFromLabelFieldRGB) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, PointCloudImageExtractorFromLabelFieldGlasbey) { - typedef PointXYZL PointT; + using PointT = PointXYZL; PointCloud cloud; cloud.width = 2; cloud.height = 2; @@ -266,7 +266,7 @@ TEST (PCL, PointCloudImageExtractorFromLabelFieldGlasbey) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, PointCloudImageExtractorFromZField) { - typedef PointXYZL PointT; + using PointT = PointXYZL; PointCloud cloud; cloud.width = 2; cloud.height = 2; @@ -293,7 +293,7 @@ TEST (PCL, PointCloudImageExtractorFromZField) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, PointCloudImageExtractorFromCurvatureField) { - typedef PointNormal PointT; + using PointT = PointNormal; PointCloud cloud; cloud.width = 2; cloud.height = 2; @@ -325,7 +325,7 @@ TEST (PCL, PointCloudImageExtractorFromCurvatureField) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, PointCloudImageExtractorFromIntensityField) { - typedef PointXYZI PointT; + using PointT = PointXYZI; PointCloud cloud; cloud.width = 2; cloud.height = 2; @@ -355,7 +355,7 @@ TEST (PCL, PointCloudImageExtractorFromIntensityField) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, PointCloudImageExtractorBadInput) { - typedef PointXY PointT; // none of point cloud image extractors support this + using PointT = PointXY; // none of point cloud image extractors support this PointCloud cloud; cloud.width = 2; cloud.height = 2; @@ -392,7 +392,7 @@ TEST (PCL, PointCloudImageExtractorBadInput) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, PointCloudImageExtractorBlackNaNs) { - typedef PointNormal PointT; + using PointT = PointNormal; PointCloud cloud; cloud.width = 2; cloud.height = 2; diff --git a/test/octree/test_octree_iterator.cpp b/test/octree/test_octree_iterator.cpp index 222122079bc..3c516b6e9d5 100644 --- a/test/octree/test_octree_iterator.cpp +++ b/test/octree/test_octree_iterator.cpp @@ -53,8 +53,8 @@ using pcl::octree::OctreeKey; struct OctreeIteratorBaseTest : public testing::Test { // types - typedef OctreeBase OctreeBaseT; - typedef OctreeIteratorBase OctreeIteratorBaseT; + using OctreeBaseT = OctreeBase; + using OctreeIteratorBaseT = OctreeIteratorBase; // methods @@ -103,7 +103,7 @@ template struct OctreeIteratorTest : public OctreeIteratorBaseTest { // types - typedef OctreeKey OctreeKeyT; + using OctreeKeyT = OctreeKey; // methods OctreeIteratorTest () : it_ (&octree_, tree_depth_) {} @@ -148,11 +148,12 @@ using pcl::octree::OctreeLeafNodeDepthFirstIterator; using pcl::octree::OctreeFixedDepthIterator; using pcl::octree::OctreeLeafNodeBreadthFirstIterator; -typedef testing::Types >, - OctreeBreadthFirstIterator >, - OctreeLeafNodeDepthFirstIterator >, - OctreeFixedDepthIterator >, - OctreeLeafNodeBreadthFirstIterator > > OctreeIteratorTypes; +using OctreeIteratorTypes = testing::Types + >, + OctreeBreadthFirstIterator >, + OctreeLeafNodeDepthFirstIterator >, + OctreeFixedDepthIterator >, + OctreeLeafNodeBreadthFirstIterator > >; TYPED_TEST_CASE (OctreeIteratorTest, OctreeIteratorTypes); TYPED_TEST (OctreeIteratorTest, CopyConstructor) @@ -207,7 +208,7 @@ TYPED_TEST (OctreeIteratorTest, CopyAssignment) struct OctreeBaseBeginEndIteratorsTest : public testing::Test { // Types - typedef OctreeBase OctreeT; + using OctreeT = OctreeBase; // Methods void SetUp () override @@ -761,7 +762,7 @@ TEST_F (OctreeBaseIteratorsForLoopTest, LeafNodeBreadthFirstIterator) struct OctreeBaseWalkThroughIteratorsTest : public testing::Test { // Types - typedef OctreeBase OctreeT; + using OctreeT = OctreeBase; // Methods void SetUp () override @@ -986,7 +987,7 @@ struct OctreeBaseIteratorsPrePostTest : public OctreeBaseBeginEndIteratorsTest TEST_F (OctreeBaseIteratorsPrePostTest, DefaultIterator) { // Useful types - typedef OctreeT::Iterator IteratorT; + using IteratorT = OctreeT::Iterator; // Default initialization IteratorT it_a_pre; @@ -1008,7 +1009,7 @@ TEST_F (OctreeBaseIteratorsPrePostTest, DefaultIterator) TEST_F (OctreeBaseIteratorsPrePostTest, LeafNodeDepthFirstIterator) { // Useful types - typedef OctreeT::LeafNodeDepthFirstIterator IteratorT; + using IteratorT = OctreeT::LeafNodeDepthFirstIterator; // Default initialization IteratorT it_a_pre; @@ -1030,7 +1031,7 @@ TEST_F (OctreeBaseIteratorsPrePostTest, LeafNodeDepthFirstIterator) TEST_F (OctreeBaseIteratorsPrePostTest, DepthFirstIterator) { // Useful types - typedef OctreeT::DepthFirstIterator IteratorT; + using IteratorT = OctreeT::DepthFirstIterator; // Default initialization IteratorT it_a_pre; @@ -1052,7 +1053,7 @@ TEST_F (OctreeBaseIteratorsPrePostTest, DepthFirstIterator) TEST_F (OctreeBaseIteratorsPrePostTest, BreadthFirstIterator) { // Useful types - typedef OctreeT::BreadthFirstIterator IteratorT; + using IteratorT = OctreeT::BreadthFirstIterator; // Default initialization IteratorT it_a_pre; @@ -1074,7 +1075,7 @@ TEST_F (OctreeBaseIteratorsPrePostTest, BreadthFirstIterator) TEST_F (OctreeBaseIteratorsPrePostTest, FixedDepthIterator) { // Useful types - typedef OctreeT::FixedDepthIterator IteratorT; + using IteratorT = OctreeT::FixedDepthIterator; // Default initialization IteratorT it_a_pre; @@ -1103,7 +1104,7 @@ TEST_F (OctreeBaseIteratorsPrePostTest, FixedDepthIterator) TEST_F (OctreeBaseIteratorsPrePostTest, LeafNodeBreadthFirstIterator) { // Useful types - typedef OctreeT::LeafNodeBreadthFirstIterator IteratorT; + using IteratorT = OctreeT::LeafNodeBreadthFirstIterator; // Default initialization IteratorT it_a_pre; @@ -1130,9 +1131,9 @@ struct OctreePointCloudAdjacencyBeginEndIteratorsTest : public testing::Test { // Types - typedef pcl::PointXYZ PointT; - typedef pcl::PointCloud PointCloudT; - typedef pcl::octree::OctreePointCloudAdjacency OctreeT; + using PointT = pcl::PointXYZ; + using PointCloudT = pcl::PointCloud; + using OctreeT = pcl::octree::OctreePointCloudAdjacency; // Methods OctreePointCloudAdjacencyBeginEndIteratorsTest () @@ -1348,9 +1349,9 @@ struct OctreePointCloudSierpinskiTest : public testing::Test { // Types - typedef pcl::PointXYZ PointT; - typedef pcl::PointCloud PointCloudT; - typedef pcl::octree::OctreePointCloud OctreeT; + using PointT = pcl::PointXYZ; + using PointCloudT = pcl::PointCloud; + using OctreeT = pcl::octree::OctreePointCloud; // Methods OctreePointCloudSierpinskiTest () diff --git a/test/outofcore/test_outofcore.cpp b/test/outofcore/test_outofcore.cpp index d5f83c9d7c4..f8c0f30dd00 100644 --- a/test/outofcore/test_outofcore.cpp +++ b/test/outofcore/test_outofcore.cpp @@ -83,16 +83,16 @@ const static boost::filesystem::path filename_otreeB_LOD = "treeB_LOD/tree_test. const static boost::filesystem::path outofcore_path ("point_cloud_octree/tree_test.oct_idx"); -typedef pcl::PointXYZ PointT; +using PointT = pcl::PointXYZ; // UR Typedefs -typedef OutofcoreOctreeBase , PointT > octree_disk; -typedef OutofcoreOctreeBaseNode , PointT > octree_disk_node; +using octree_disk = OutofcoreOctreeBase , PointT >; +using octree_disk_node = OutofcoreOctreeBaseNode , PointT >; -typedef OutofcoreOctreeBase , PointT> octree_ram; -typedef OutofcoreOctreeBaseNode , PointT> octree_ram_node; +using octree_ram = OutofcoreOctreeBase , PointT>; +using octree_ram_node = OutofcoreOctreeBaseNode , PointT>; -typedef std::vector > AlignedPointTVector; +using AlignedPointTVector = std::vector >; AlignedPointTVector points; diff --git a/test/people/test_people_groundBasedPeopleDetectionApp.cpp b/test/people/test_people_groundBasedPeopleDetectionApp.cpp index eb5d9bea3ac..641f02941bd 100644 --- a/test/people/test_people_groundBasedPeopleDetectionApp.cpp +++ b/test/people/test_people_groundBasedPeopleDetectionApp.cpp @@ -52,8 +52,8 @@ #include #include -typedef pcl::PointXYZRGB PointT; -typedef pcl::PointCloud PointCloudT; +using PointT = pcl::PointXYZRGB; +using PointCloudT = pcl::PointCloud; enum { COLS = 640, ROWS = 480 }; PointCloudT::Ptr cloud; diff --git a/test/recognition/test_recognition_cg.cpp b/test/recognition/test_recognition_cg.cpp index 1c5051784a1..37dd69e5a79 100644 --- a/test/recognition/test_recognition_cg.cpp +++ b/test/recognition/test_recognition_cg.cpp @@ -53,10 +53,10 @@ using namespace std; using namespace pcl; using namespace pcl::io; -typedef PointXYZ PointType; -typedef Normal NormalType; -typedef ReferenceFrame RFType; -typedef SHOT352 DescriptorType; +using PointType = PointXYZ; +using NormalType = Normal; +using RFType = ReferenceFrame; +using DescriptorType = SHOT352; PointCloud::Ptr model_ (new PointCloud ()); PointCloud::Ptr model_downsampled_ (new PointCloud ()); diff --git a/test/registration/test_ndt.cpp b/test/registration/test_ndt.cpp index ad98174b664..82ab4974373 100644 --- a/test/registration/test_ndt.cpp +++ b/test/registration/test_ndt.cpp @@ -52,7 +52,7 @@ PointCloud cloud_source, cloud_target; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, NormalDistributionsTransform) { - typedef PointNormal PointT; + using PointT = PointNormal; PointCloud::Ptr src (new PointCloud); copyPointCloud (cloud_source, *src); PointCloud::Ptr tgt (new PointCloud); diff --git a/test/registration/test_registration.cpp b/test/registration/test_registration.cpp index fe98f430830..7b27e7a584d 100644 --- a/test/registration/test_registration.cpp +++ b/test/registration/test_registration.cpp @@ -88,8 +88,8 @@ class RegistrationWrapper : public Registration ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, findFeatureCorrespondences) { - typedef Histogram<2> FeatureT; - typedef PointCloud FeatureCloud; + using FeatureT = Histogram<2>; + using FeatureCloud = PointCloud; RegistrationWrapper reg; @@ -315,7 +315,7 @@ TEST (PCL, JointIterativeClosestPoint) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, IterativeClosestPointNonLinear) { - typedef PointXYZRGB PointT; + using PointT = PointXYZRGB; PointCloud::Ptr temp_src (new PointCloud); copyPointCloud (cloud_source, *temp_src); PointCloud::Ptr temp_tgt (new PointCloud); @@ -386,7 +386,7 @@ TEST (PCL, IterativeClosestPointNonLinear) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, IterativeClosestPoint_PointToPlane) { - typedef PointNormal PointT; + using PointT = PointNormal; PointCloud::Ptr src (new PointCloud); copyPointCloud (cloud_source, *src); PointCloud::Ptr tgt (new PointCloud); @@ -400,7 +400,7 @@ TEST (PCL, IterativeClosestPoint_PointToPlane) norm_est.compute (*tgt); IterativeClosestPoint reg; - typedef registration::TransformationEstimationPointToPlane PointToPlane; + using PointToPlane = registration::TransformationEstimationPointToPlane; boost::shared_ptr point_to_plane (new PointToPlane); reg.setTransformationEstimation (point_to_plane); reg.setInputSource (src); @@ -475,7 +475,7 @@ TEST (PCL, IterativeClosestPoint_PointToPlane) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, GeneralizedIterativeClosestPoint) { - typedef PointXYZ PointT; + using PointT = PointXYZ; PointCloud::Ptr src (new PointCloud); copyPointCloud (cloud_source, *src); PointCloud::Ptr tgt (new PointCloud); @@ -536,7 +536,7 @@ TEST (PCL, GeneralizedIterativeClosestPoint) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, GeneralizedIterativeClosestPoint6D) { - typedef PointXYZRGBA PointT; + using PointT = PointXYZRGBA; Eigen::Affine3f delta_transform; PointCloud::Ptr src_full (new PointCloud); copyPointCloud (cloud_with_color, *src_full); diff --git a/test/registration/test_registration_api.cpp b/test/registration/test_registration_api.cpp index 362631f8cc6..3fc6d9a6c0a 100644 --- a/test/registration/test_registration_api.cpp +++ b/test/registration/test_registration_api.cpp @@ -62,15 +62,15 @@ #include "test_registration_api_data.h" -typedef pcl::PointXYZ PointXYZ; -typedef pcl::PointCloud CloudXYZ; -typedef CloudXYZ::Ptr CloudXYZPtr; -typedef CloudXYZ::ConstPtr CloudXYZConstPtr; - -typedef pcl::PointNormal PointNormal; -typedef pcl::PointCloud CloudNormal; -typedef CloudNormal::Ptr CloudNormalPtr; -typedef CloudNormal::ConstPtr CloudNormalConstPtr; +using PointXYZ = pcl::PointXYZ; +using CloudXYZ = pcl::PointCloud; +using CloudXYZPtr = CloudXYZ::Ptr; +using CloudXYZConstPtr = CloudXYZ::ConstPtr; + +using PointNormal = pcl::PointNormal; +using CloudNormal = pcl::PointCloud; +using CloudNormalPtr = CloudNormal::Ptr; +using CloudNormalConstPtr = CloudNormal::ConstPtr; CloudXYZ cloud_source, cloud_target, cloud_reg; diff --git a/test/registration/test_sac_ia.cpp b/test/registration/test_sac_ia.cpp index 12c205ee08c..1e8025f0a19 100644 --- a/test/registration/test_sac_ia.cpp +++ b/test/registration/test_sac_ia.cpp @@ -112,7 +112,7 @@ TEST (PCL, SampleConsensusInitialAlignment) EXPECT_LT (reg.getFitnessScore (), 0.0005); // Check again, for all possible caching schemes - typedef pcl::PointXYZ PointT; + using PointT = pcl::PointXYZ; for (int iter = 0; iter < 4; iter++) { bool force_cache = (bool) iter/2; @@ -209,7 +209,7 @@ TEST (PCL, SampleConsensusPrerejective) EXPECT_GT (inlier_fraction, 0.95f); // Check again, for all possible caching schemes - typedef pcl::PointXYZ PointT; + using PointT = pcl::PointXYZ; for (int iter = 0; iter < 4; iter++) { bool force_cache = (bool) iter/2; diff --git a/test/sample_consensus/test_sample_consensus.cpp b/test/sample_consensus/test_sample_consensus.cpp index 65891ca2640..438f70507f0 100644 --- a/test/sample_consensus/test_sample_consensus.cpp +++ b/test/sample_consensus/test_sample_consensus.cpp @@ -54,7 +54,7 @@ using namespace pcl; -typedef SampleConsensusModelSphere::Ptr SampleConsensusModelSpherePtr; +using SampleConsensusModelSpherePtr = SampleConsensusModelSphere::Ptr; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (SampleConsensus, Base) diff --git a/test/sample_consensus/test_sample_consensus_line_models.cpp b/test/sample_consensus/test_sample_consensus_line_models.cpp index c6a59a9708f..941a1a2501e 100644 --- a/test/sample_consensus/test_sample_consensus_line_models.cpp +++ b/test/sample_consensus/test_sample_consensus_line_models.cpp @@ -47,8 +47,8 @@ using namespace pcl; -typedef SampleConsensusModelLine::Ptr SampleConsensusModelLinePtr; -typedef SampleConsensusModelParallelLine::Ptr SampleConsensusModelParallelLinePtr; +using SampleConsensusModelLinePtr = SampleConsensusModelLine::Ptr; +using SampleConsensusModelParallelLinePtr = SampleConsensusModelParallelLine::Ptr; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (SampleConsensusModelLine, RANSAC) diff --git a/test/sample_consensus/test_sample_consensus_plane_models.cpp b/test/sample_consensus/test_sample_consensus_plane_models.cpp index f05f98ec12c..f52bfb2414a 100644 --- a/test/sample_consensus/test_sample_consensus_plane_models.cpp +++ b/test/sample_consensus/test_sample_consensus_plane_models.cpp @@ -55,9 +55,9 @@ using namespace pcl; using namespace pcl::io; -typedef SampleConsensusModelPlane::Ptr SampleConsensusModelPlanePtr; -typedef SampleConsensusModelNormalPlane::Ptr SampleConsensusModelNormalPlanePtr; -typedef SampleConsensusModelNormalParallelPlane::Ptr SampleConsensusModelNormalParallelPlanePtr; +using SampleConsensusModelPlanePtr = SampleConsensusModelPlane::Ptr; +using SampleConsensusModelNormalPlanePtr = SampleConsensusModelNormalPlane::Ptr; +using SampleConsensusModelNormalParallelPlanePtr = SampleConsensusModelNormalParallelPlane::Ptr; PointCloud::Ptr cloud_ (new PointCloud ()); PointCloud::Ptr normals_ (new PointCloud ()); diff --git a/test/sample_consensus/test_sample_consensus_quadric_models.cpp b/test/sample_consensus/test_sample_consensus_quadric_models.cpp index 3ed050db771..8751c9a99d2 100644 --- a/test/sample_consensus/test_sample_consensus_quadric_models.cpp +++ b/test/sample_consensus/test_sample_consensus_quadric_models.cpp @@ -48,12 +48,12 @@ using namespace pcl; -typedef SampleConsensusModelSphere::Ptr SampleConsensusModelSpherePtr; -typedef SampleConsensusModelCone::Ptr SampleConsensusModelConePtr; -typedef SampleConsensusModelCircle2D::Ptr SampleConsensusModelCircle2DPtr; -typedef SampleConsensusModelCircle3D::Ptr SampleConsensusModelCircle3DPtr; -typedef SampleConsensusModelCylinder::Ptr SampleConsensusModelCylinderPtr; -typedef SampleConsensusModelNormalSphere::Ptr SampleConsensusModelNormalSpherePtr; +using SampleConsensusModelSpherePtr = SampleConsensusModelSphere::Ptr; +using SampleConsensusModelConePtr = SampleConsensusModelCone::Ptr; +using SampleConsensusModelCircle2DPtr = SampleConsensusModelCircle2D::Ptr; +using SampleConsensusModelCircle3DPtr = SampleConsensusModelCircle3D::Ptr; +using SampleConsensusModelCylinderPtr = SampleConsensusModelCylinder::Ptr; +using SampleConsensusModelNormalSpherePtr = SampleConsensusModelNormalSphere::Ptr; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (SampleConsensusModelSphere, RANSAC) diff --git a/test/segmentation/test_random_walker.cpp b/test/segmentation/test_random_walker.cpp index 1e5b930f168..b18728778a0 100644 --- a/test/segmentation/test_random_walker.cpp +++ b/test/segmentation/test_random_walker.cpp @@ -51,28 +51,28 @@ std::string TEST_DATA_DIR; -typedef float Weight; -typedef uint32_t Color; -typedef boost::adjacency_list +using Weight = float; +using Color = uint32_t; +using Graph = boost::adjacency_list >, - boost::property > Graph; -typedef boost::graph_traits GraphTraits; -typedef GraphTraits::edge_descriptor EdgeDescriptor; -typedef GraphTraits::vertex_descriptor VertexDescriptor; -typedef GraphTraits::edge_iterator EdgeIterator; -typedef GraphTraits::vertex_iterator VertexIterator; -typedef boost::property_map::type EdgeWeightMap; -typedef boost::property_map::type VertexColorMap; -typedef Eigen::SparseMatrix SparseMatrix; -typedef Eigen::Matrix Matrix; -typedef Eigen::Matrix Vector; -typedef boost::bimap VertexDescriptorBimap; -typedef boost::bimap ColorBimap; -typedef pcl::segmentation::detail::RandomWalker RandomWalker; + boost::property >; +using GraphTraits = boost::graph_traits; +using EdgeDescriptor = GraphTraits::edge_descriptor; +using VertexDescriptor = GraphTraits::vertex_descriptor; +using EdgeIterator = GraphTraits::edge_iterator; +using VertexIterator = GraphTraits::vertex_iterator; +using EdgeWeightMap = boost::property_map::type; +using VertexColorMap = boost::property_map::type; +using SparseMatrix = Eigen::SparseMatrix; +using Matrix = Eigen::Matrix; +using Vector = Eigen::Matrix; +using VertexDescriptorBimap = boost::bimap; +using ColorBimap = boost::bimap; +using RandomWalker = pcl::segmentation::detail::RandomWalker; struct GraphInfo diff --git a/test/test_recognition_ransac_based_ORROctree.cpp b/test/test_recognition_ransac_based_ORROctree.cpp index e9c624862a1..4cb4fb2a403 100644 --- a/test/test_recognition_ransac_based_ORROctree.cpp +++ b/test/test_recognition_ransac_based_ORROctree.cpp @@ -50,11 +50,11 @@ using namespace pcl; using namespace pcl::io; using namespace pcl::recognition; -typedef pcl::PointXYZ PointT; -typedef pcl::PointCloud PointCloudT; -typedef pcl::PointCloud PointCloudTN; -typedef pcl::PointCloud::Ptr PointCloudTPtr; -typedef pcl::PointCloud::Ptr PointCloudTNPtr; +using PointT = pcl::PointXYZ; +using PointCloudT = pcl::PointCloud; +using PointCloudTN = pcl::PointCloud; +using PointCloudTPtr = pcl::PointCloud::Ptr; +using PointCloudTNPtr = pcl::PointCloud::Ptr; PointCloud::Ptr cloud_; PointCloudTPtr model_cloud(new pcl::PointCloud);