Skip to content

Commit f3b45f9

Browse files
SunBlacktaketwo
authored andcommitted
Use using instead of typedef [common] (#3118)
Changes are done by: run-clang-tidy -header-filter='.' -checks='-,modernize-use-using' -fix
1 parent 3914730 commit f3b45f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+219
-224
lines changed

common/include/pcl/ModelCoefficients.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ namespace pcl
2020
std::vector<float> values;
2121

2222
public:
23-
typedef boost::shared_ptr< ::pcl::ModelCoefficients> Ptr;
24-
typedef boost::shared_ptr< ::pcl::ModelCoefficients const> ConstPtr;
23+
using Ptr = boost::shared_ptr< ::pcl::ModelCoefficients>;
24+
using ConstPtr = boost::shared_ptr<const ::pcl::ModelCoefficients>;
2525
}; // struct ModelCoefficients
2626

27-
typedef boost::shared_ptr< ::pcl::ModelCoefficients> ModelCoefficientsPtr;
28-
typedef boost::shared_ptr< ::pcl::ModelCoefficients const> ModelCoefficientsConstPtr;
27+
using ModelCoefficientsPtr = boost::shared_ptr< ::pcl::ModelCoefficients>;
28+
using ModelCoefficientsConstPtr = boost::shared_ptr<const ::pcl::ModelCoefficients>;
2929

3030
inline std::ostream& operator<<(std::ostream& s, const ::pcl::ModelCoefficients & v)
3131
{

common/include/pcl/PCLHeader.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ namespace pcl
2727
/** \brief Coordinate frame ID */
2828
std::string frame_id;
2929

30-
typedef boost::shared_ptr<PCLHeader> Ptr;
31-
typedef boost::shared_ptr<PCLHeader const> ConstPtr;
30+
using Ptr = boost::shared_ptr<PCLHeader>;
31+
using ConstPtr = boost::shared_ptr<const PCLHeader>;
3232
}; // struct PCLHeader
3333

34-
typedef boost::shared_ptr<PCLHeader> HeaderPtr;
35-
typedef boost::shared_ptr<PCLHeader const> HeaderConstPtr;
34+
using HeaderPtr = boost::shared_ptr<PCLHeader>;
35+
using HeaderConstPtr = boost::shared_ptr<const PCLHeader>;
3636

3737
inline std::ostream& operator << (std::ostream& out, const PCLHeader &h)
3838
{

common/include/pcl/PCLImage.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ namespace pcl
3030

3131
std::vector<pcl::uint8_t> data;
3232

33-
typedef boost::shared_ptr< ::pcl::PCLImage> Ptr;
34-
typedef boost::shared_ptr< ::pcl::PCLImage const> ConstPtr;
33+
using Ptr = boost::shared_ptr< ::pcl::PCLImage>;
34+
using ConstPtr = boost::shared_ptr<const ::pcl::PCLImage>;
3535
}; // struct PCLImage
3636

37-
typedef boost::shared_ptr< ::pcl::PCLImage> PCLImagePtr;
38-
typedef boost::shared_ptr< ::pcl::PCLImage const> PCLImageConstPtr;
37+
using PCLImagePtr = boost::shared_ptr< ::pcl::PCLImage>;
38+
using PCLImageConstPtr = boost::shared_ptr<const ::pcl::PCLImage>;
3939

4040
inline std::ostream& operator<<(std::ostream& s, const ::pcl::PCLImage & v)
4141
{

common/include/pcl/PCLPointCloud2.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ namespace pcl
4747
pcl::uint8_t is_dense;
4848

4949
public:
50-
typedef boost::shared_ptr< ::pcl::PCLPointCloud2> Ptr;
51-
typedef boost::shared_ptr< ::pcl::PCLPointCloud2 const> ConstPtr;
50+
using Ptr = boost::shared_ptr< ::pcl::PCLPointCloud2>;
51+
using ConstPtr = boost::shared_ptr<const ::pcl::PCLPointCloud2>;
5252
}; // struct PCLPointCloud2
5353

54-
typedef boost::shared_ptr< ::pcl::PCLPointCloud2> PCLPointCloud2Ptr;
55-
typedef boost::shared_ptr< ::pcl::PCLPointCloud2 const> PCLPointCloud2ConstPtr;
54+
using PCLPointCloud2Ptr = boost::shared_ptr< ::pcl::PCLPointCloud2>;
55+
using PCLPointCloud2ConstPtr = boost::shared_ptr<const ::pcl::PCLPointCloud2>;
5656

5757
inline std::ostream& operator<<(std::ostream& s, const ::pcl::PCLPointCloud2 &v)
5858
{

common/include/pcl/PCLPointField.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ namespace pcl
3333
FLOAT64 = 8 };
3434

3535
public:
36-
typedef boost::shared_ptr< ::pcl::PCLPointField> Ptr;
37-
typedef boost::shared_ptr< ::pcl::PCLPointField const> ConstPtr;
36+
using Ptr = boost::shared_ptr< ::pcl::PCLPointField>;
37+
using ConstPtr = boost::shared_ptr<const ::pcl::PCLPointField>;
3838
}; // struct PCLPointField
3939

40-
typedef boost::shared_ptr< ::pcl::PCLPointField> PCLPointFieldPtr;
41-
typedef boost::shared_ptr< ::pcl::PCLPointField const> PCLPointFieldConstPtr;
40+
using PCLPointFieldPtr = boost::shared_ptr< ::pcl::PCLPointField>;
41+
using PCLPointFieldConstPtr = boost::shared_ptr<const ::pcl::PCLPointField>;
4242

4343
inline std::ostream& operator<<(std::ostream& s, const ::pcl::PCLPointField & v)
4444
{

common/include/pcl/PointIndices.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ namespace pcl
1919
std::vector<int> indices;
2020

2121
public:
22-
typedef boost::shared_ptr< ::pcl::PointIndices> Ptr;
23-
typedef boost::shared_ptr< ::pcl::PointIndices const> ConstPtr;
22+
using Ptr = boost::shared_ptr< ::pcl::PointIndices>;
23+
using ConstPtr = boost::shared_ptr<const ::pcl::PointIndices>;
2424
}; // struct PointIndices
2525

26-
typedef boost::shared_ptr< ::pcl::PointIndices> PointIndicesPtr;
27-
typedef boost::shared_ptr< ::pcl::PointIndices const> PointIndicesConstPtr;
26+
using PointIndicesPtr = boost::shared_ptr< ::pcl::PointIndices>;
27+
using PointIndicesConstPtr = boost::shared_ptr<const ::pcl::PointIndices>;
2828

2929
inline std::ostream& operator << (std::ostream& s, const ::pcl::PointIndices &v)
3030
{

common/include/pcl/PolygonMesh.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ namespace pcl
2525

2626

2727
public:
28-
typedef boost::shared_ptr< ::pcl::PolygonMesh> Ptr;
29-
typedef boost::shared_ptr< ::pcl::PolygonMesh const> ConstPtr;
28+
using Ptr = boost::shared_ptr< ::pcl::PolygonMesh>;
29+
using ConstPtr = boost::shared_ptr<const ::pcl::PolygonMesh>;
3030
}; // struct PolygonMesh
3131

32-
typedef boost::shared_ptr< ::pcl::PolygonMesh> PolygonMeshPtr;
33-
typedef boost::shared_ptr< ::pcl::PolygonMesh const> PolygonMeshConstPtr;
32+
using PolygonMeshPtr = boost::shared_ptr< ::pcl::PolygonMesh>;
33+
using PolygonMeshConstPtr = boost::shared_ptr<const ::pcl::PolygonMesh>;
3434

3535
inline std::ostream& operator<<(std::ostream& s, const ::pcl::PolygonMesh &v)
3636
{

common/include/pcl/TextureMesh.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ namespace pcl
100100
std::vector<pcl::TexMaterial> tex_materials; // define texture material
101101

102102
public:
103-
typedef boost::shared_ptr<pcl::TextureMesh> Ptr;
104-
typedef boost::shared_ptr<pcl::TextureMesh const> ConstPtr;
103+
using Ptr = boost::shared_ptr<pcl::TextureMesh>;
104+
using ConstPtr = boost::shared_ptr<const pcl::TextureMesh>;
105105
}; // struct TextureMesh
106106

107-
typedef boost::shared_ptr<pcl::TextureMesh> TextureMeshPtr;
108-
typedef boost::shared_ptr<pcl::TextureMesh const> TextureMeshConstPtr;
107+
using TextureMeshPtr = boost::shared_ptr<pcl::TextureMesh>;
108+
using TextureMeshConstPtr = boost::shared_ptr<const pcl::TextureMesh>;
109109
} // namespace pcl

common/include/pcl/Vertices.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ namespace pcl
1919
std::vector<uint32_t> vertices;
2020

2121
public:
22-
typedef boost::shared_ptr<Vertices> Ptr;
23-
typedef boost::shared_ptr<Vertices const> ConstPtr;
22+
using Ptr = boost::shared_ptr<Vertices>;
23+
using ConstPtr = boost::shared_ptr<const Vertices>;
2424
}; // struct Vertices
2525

2626

27-
typedef boost::shared_ptr<Vertices> VerticesPtr;
28-
typedef boost::shared_ptr<Vertices const> VerticesConstPtr;
27+
using VerticesPtr = boost::shared_ptr<Vertices>;
28+
using VerticesConstPtr = boost::shared_ptr<const Vertices>;
2929

3030
inline std::ostream& operator<<(std::ostream& s, const ::pcl::Vertices & v)
3131
{

common/include/pcl/common/bivariate_polynomial.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ namespace pcl
133133
std::ostream&
134134
operator<< (std::ostream& os, const BivariatePolynomialT<real>& p);
135135

136-
typedef BivariatePolynomialT<double> BivariatePolynomiald;
137-
typedef BivariatePolynomialT<float> BivariatePolynomial;
136+
using BivariatePolynomiald = BivariatePolynomialT<double>;
137+
using BivariatePolynomial = BivariatePolynomialT<float>;
138138

139139
} // end namespace
140140

0 commit comments

Comments
 (0)