Skip to content

Commit

Permalink
Merge pull request #3070 from SunBlack/readability-redundant-member-init
Browse files Browse the repository at this point in the history
Remove redundant member init
  • Loading branch information
taketwo authored May 8, 2019
2 parents 257d56f + 1d1429a commit 6c3bbea
Show file tree
Hide file tree
Showing 195 changed files with 183 additions and 594 deletions.
2 changes: 1 addition & 1 deletion apps/3d_rec_framework/src/tools/openni_frame_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace OpenNIFrameSource
{

OpenNIFrameSource::OpenNIFrameSource (const std::string& device_id) :
grabber_ (device_id), most_recent_frame_ (), frame_counter_ (0), active_ (true)
grabber_ (device_id), frame_counter_ (0), active_ (true)
{
boost::function<void
(const PointCloudConstPtr&)> frame_cb = boost::bind (&OpenNIFrameSource::onNewFrame, this, _1);
Expand Down
3 changes: 1 addition & 2 deletions apps/cloud_composer/src/cloud_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ pcl::cloud_composer::CloudView::CloudView (ProjectModel* model, QWidget* parent)
}

pcl::cloud_composer::CloudView::CloudView (const CloudView& to_copy)
: QWidget ()
, vis_ (to_copy.vis_)
: vis_ (to_copy.vis_)
, model_ (to_copy.model_)
, qvtk_ (to_copy.qvtk_)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ namespace pcl
}

pcl::cloud_composer::ClickTrackballStyleInteractor::ClickTrackballStyleInteractor ()
: vtkInteractorStyleTrackballActor ()
{
manipulation_complete_event_ = interactor_events::MANIPULATION_COMPLETE_EVENT;
start_matrix_= vtkSmartPointer<vtkMatrix4x4>::New ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace pcl
}

pcl::cloud_composer::RectangularFrustumSelector::RectangularFrustumSelector ()
: vtkInteractorStyleRubberBandPick ()
{
selection_complete_event_ = interactor_events::SELECTION_COMPLETE_EVENT;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ namespace pcl
}

pcl::cloud_composer::SelectedTrackballStyleInteractor::SelectedTrackballStyleInteractor ()
: vtkInteractorStyleTrackballActor ()
{
manipulation_complete_event_ = interactor_events::MANIPULATION_COMPLETE_EVENT;
}
Expand Down
1 change: 0 additions & 1 deletion apps/cloud_composer/src/project_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ pcl::cloud_composer::ProjectModel::ProjectModel (QObject* parent)
}

pcl::cloud_composer::ProjectModel::ProjectModel (const ProjectModel&)
: QStandardItemModel ()
{
}

Expand Down
1 change: 0 additions & 1 deletion apps/cloud_composer/src/properties_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ pcl::cloud_composer::PropertiesModel::PropertiesModel (CloudComposerItem* parent
}

pcl::cloud_composer::PropertiesModel::PropertiesModel (const PropertiesModel& to_copy)
: QStandardItemModel ()
{
for (int i=0; i < to_copy.rowCount (); ++i){
QList <QStandardItem*> new_row;
Expand Down
1 change: 0 additions & 1 deletion apps/cloud_composer/src/toolbox_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ pcl::cloud_composer::ToolBoxModel::ToolBoxModel (QTreeView* tool_view, QTreeView
}

pcl::cloud_composer::ToolBoxModel::ToolBoxModel (const ToolBoxModel&)
: QStandardItemModel ()
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,15 @@ namespace pcl
class ComputationFPS : public Base::FPS
{
public:
ComputationFPS () : Base::FPS () {}
ComputationFPS () {}
~ComputationFPS () {}
};

/** \brief Helper object for the visualization thread. Please have a look at the documentation of calcFPS. */
class VisualizationFPS : public Base::FPS
{
public:
VisualizationFPS () : Base::FPS () {}
VisualizationFPS () {}
~VisualizationFPS () {}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ namespace pcl
class ComputationFPS : public Base::FPS
{
public:
ComputationFPS () : Base::FPS () {}
ComputationFPS () {}
~ComputationFPS () {}
};

Expand All @@ -140,7 +140,7 @@ namespace pcl
class VisualizationFPS : public Base::FPS
{
public:
VisualizationFPS () : Base::FPS () {}
VisualizationFPS () {}
~VisualizationFPS () {}
};

Expand Down
5 changes: 0 additions & 5 deletions apps/in_hand_scanner/src/in_hand_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,9 @@

pcl::ihs::InHandScanner::InHandScanner (Base* parent)
: Base (parent),
mutex_ (),
computation_fps_ (),
visualization_fps_ (),
running_mode_ (RM_UNPROCESSED),
iteration_ (0),
grabber_ (),
starting_grabber_ (false),
new_data_connection_ (),
input_data_processing_ (new InputDataProcessing ()),
icp_ (new ICP ()),
transformation_ (Eigen::Matrix4f::Identity ()),
Expand Down
5 changes: 0 additions & 5 deletions apps/in_hand_scanner/src/offline_integration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@

pcl::ihs::OfflineIntegration::OfflineIntegration (Base* parent)
: Base (parent),
mutex_ (),
mutex_quit_ (),
computation_fps_ (),
visualization_fps_ (),
path_dir_ (),
mesh_model_ (new Mesh ()),
normal_estimation_ (new NormalEstimation ()),
integration_ (new Integration ()),
Expand Down
8 changes: 1 addition & 7 deletions apps/in_hand_scanner/src/opengl_viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,14 @@
////////////////////////////////////////////////////////////////////////////////

pcl::ihs::detail::FaceVertexMesh::FaceVertexMesh ()
: vertices (),
triangles (),
transformation (Eigen::Isometry3d::Identity ())
: transformation (Eigen::Isometry3d::Identity ())
{
}

////////////////////////////////////////////////////////////////////////////////

pcl::ihs::detail::FaceVertexMesh::FaceVertexMesh (const Mesh& mesh, const Eigen::Isometry3d& T)
: vertices (mesh.getVertexDataCloud ()),
triangles (),
transformation (T)
{
if (typeid (Mesh::MeshTag) != typeid (pcl::geometry::TriangleMeshTag))
Expand Down Expand Up @@ -108,15 +105,12 @@ pcl::ihs::detail::FaceVertexMesh::FaceVertexMesh (const Mesh& mesh, const Eigen:

pcl::ihs::OpenGLViewer::OpenGLViewer (QWidget* parent)
: QGLWidget (parent),
mutex_vis_ (),
timer_vis_ (new QTimer (this)),
colormap_ (Colormap::Constant (255)),
vis_conf_norm_ (1),
drawn_meshes_ (),
mesh_representation_ (MR_POINTS),
coloring_ (COL_RGB),
draw_box_ (false),
box_coefficients_ (),
scaling_factor_ (1.),
R_cam_ (1., 0., 0., 0.),
t_cam_ (0., 0., 0.),
Expand Down
2 changes: 1 addition & 1 deletion apps/include/pcl/apps/nn_classification.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ namespace pcl

public:

NNClassification () : tree_ (), classes_ (), labels_idx_ () {}
NNClassification () : tree_ () {}

/** \brief Result is a list of class labels and scores */
typedef std::pair<std::vector<std::string>, std::vector<float> > Result;
Expand Down
2 changes: 1 addition & 1 deletion apps/include/pcl/apps/vfh_nn_classifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ namespace pcl

public:

VFHClassifierNN () : training_features_ (), labels_ (), classifier_ ()
VFHClassifierNN ()
{
reset ();
}
Expand Down
2 changes: 1 addition & 1 deletion apps/modeler/include/pcl/apps/modeler/main_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ namespace pcl
friend class AbstractItem;

MainWindow();
MainWindow(const MainWindow &) : QMainWindow () {} // copy ctor hidden
MainWindow(const MainWindow &) {} // copy ctor hidden
MainWindow& operator=(const MainWindow &) { return (*this); } // assign op. hidden
~MainWindow();

Expand Down
1 change: 0 additions & 1 deletion apps/modeler/src/channel_actor_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ pcl::modeler::ChannelActorItem::ChannelActorItem(QTreeWidgetItem* parent,
const vtkSmartPointer<vtkActor>& actor,
const std::string& channel_name)
:QTreeWidgetItem(parent),
AbstractItem(),
cloud_mesh_(cloud_mesh),
poly_data_(vtkSmartPointer<vtkPolyData>::New()),
render_window_(render_window),
Expand Down
3 changes: 0 additions & 3 deletions apps/modeler/src/cloud_mesh_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
//////////////////////////////////////////////////////////////////////////////////////////////
pcl::modeler::CloudMeshItem::CloudMeshItem (QTreeWidgetItem* parent, const std::string& filename)
:QTreeWidgetItem(parent),
AbstractItem(),
filename_(filename),
cloud_mesh_(new CloudMesh),
translation_x_(new DoubleParameter("Translation X", "Translation X", 0.0, -1.0, 1.0)),
Expand All @@ -68,7 +67,6 @@ pcl::modeler::CloudMeshItem::CloudMeshItem (QTreeWidgetItem* parent, const std::
//////////////////////////////////////////////////////////////////////////////////////////////
pcl::modeler::CloudMeshItem::CloudMeshItem (QTreeWidgetItem* parent, CloudMesh::PointCloudPtr cloud)
:QTreeWidgetItem(parent),
AbstractItem(),
filename_("unnamed point cloud"),
cloud_mesh_(new CloudMesh (cloud)),
translation_x_(new DoubleParameter("Translation X", "Translation X", 0.0, -1.0, 1.0)),
Expand All @@ -89,7 +87,6 @@ pcl::modeler::CloudMeshItem::CloudMeshItem (QTreeWidgetItem* parent, CloudMesh::
//////////////////////////////////////////////////////////////////////////////////////////////
pcl::modeler::CloudMeshItem::CloudMeshItem(QTreeWidgetItem* parent, const CloudMeshItem& cloud_mesh_item)
:QTreeWidgetItem(parent),
AbstractItem(),
filename_(cloud_mesh_item.filename_),
cloud_mesh_(cloud_mesh_item.cloud_mesh_),
translation_x_(new DoubleParameter("Translation X", "Translation X", 0.0, -1.0, 1.0)),
Expand Down
1 change: 0 additions & 1 deletion apps/modeler/src/render_window_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
//////////////////////////////////////////////////////////////////////////////////////////////
pcl::modeler::RenderWindowItem::RenderWindowItem(QTreeWidget * parent)
: QTreeWidgetItem(parent),
AbstractItem(),
render_window_(new RenderWindow(this)),
background_color_(new ColorParameter("Background Color", "The background color of the render window", QColor(0, 0, 0))),
show_axes_(new BoolParameter("Show Axes", "Show Axes", true))
Expand Down
2 changes: 1 addition & 1 deletion apps/src/face_detection/openni_frame_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace OpenNIFrameSource
{

OpenNIFrameSource::OpenNIFrameSource(const std::string& device_id) :
grabber_ (device_id), most_recent_frame_ (), frame_counter_ (0), active_ (true)
grabber_ (device_id), frame_counter_ (0), active_ (true)
{
boost::function<void(const PointCloudConstPtr&)> frame_cb = boost::bind (&OpenNIFrameSource::onNewFrame, this, _1);
grabber_.registerCallback (frame_cb);
Expand Down
1 change: 0 additions & 1 deletion apps/src/ni_agast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class AGASTDemo
, bmax_ (255)
, threshold_ (30)
, detector_type_ (0)
, timer_ ()
{
}

Expand Down
2 changes: 1 addition & 1 deletion apps/src/openni_fast_mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class OpenNIFastMesh
typedef typename Cloud::ConstPtr CloudConstPtr;

OpenNIFastMesh (const std::string& device_id = "")
: device_id_(device_id), vertices_ ()
: device_id_(device_id)
{
ofm.setTrianglePixelSize (3);
ofm.setTriangulationType (pcl::OrganizedFastMesh<PointType>::QUAD_MESH);
Expand Down
3 changes: 1 addition & 2 deletions apps/src/openni_klt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ class OpenNIViewer
typedef typename Cloud::ConstPtr CloudConstPtr;

OpenNIViewer (pcl::Grabber& grabber)
: image_viewer_ ()
, grabber_ (grabber)
: grabber_ (grabber)
, rgb_data_ (nullptr), rgb_data_size_ (0)
{ }

Expand Down
7 changes: 1 addition & 6 deletions apps/src/openni_passthrough.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,7 @@ using namespace std::chrono_literals;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
OpenNIPassthrough::OpenNIPassthrough (pcl::OpenNIGrabber& grabber)
: vis_ ()
, grabber_(grabber)
, device_id_ ()
, cloud_pass_()
, pass_ ()
, mtx_ ()
: grabber_(grabber)
, ui_ (new Ui::MainWindow)
, vis_timer_ (new QTimer (this))
{
Expand Down
2 changes: 1 addition & 1 deletion common/include/pcl/ModelCoefficients.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace pcl
{
struct ModelCoefficients
{
ModelCoefficients () : header (), values ()
ModelCoefficients ()
{
}

Expand Down
2 changes: 1 addition & 1 deletion common/include/pcl/PCLHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace pcl
{
struct PCLHeader
{
PCLHeader (): seq (0), stamp (), frame_id ()
PCLHeader (): seq (0), stamp ()
{}

/** \brief Sequence number */
Expand Down
4 changes: 2 additions & 2 deletions common/include/pcl/PCLImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ namespace pcl
{
struct PCLImage
{
PCLImage () : header (), height (0), width (0), encoding (),
is_bigendian (0), step (0), data ()
PCLImage () : height (0), width (0),
is_bigendian (0), step (0)
{}

::pcl::PCLHeader header;
Expand Down
4 changes: 2 additions & 2 deletions common/include/pcl/PCLPointCloud2.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ namespace pcl

struct PCLPointCloud2
{
PCLPointCloud2 () : header (), height (0), width (0), fields (),
PCLPointCloud2 () : height (0), width (0),
is_bigendian (false), point_step (0), row_step (0),
data (), is_dense (false)
is_dense (false)
{
#if BOOST_ENDIAN_BIG_BYTE
is_bigendian = true;
Expand Down
2 changes: 1 addition & 1 deletion common/include/pcl/PCLPointField.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace pcl
{
struct PCLPointField
{
PCLPointField () : name (), offset (0), datatype (0), count (0)
PCLPointField () : offset (0), datatype (0), count (0)
{}

std::string name;
Expand Down
2 changes: 1 addition & 1 deletion common/include/pcl/PointIndices.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace pcl
{
struct PointIndices
{
PointIndices () : header (), indices ()
PointIndices ()
{}

::pcl::PCLHeader header;
Expand Down
2 changes: 1 addition & 1 deletion common/include/pcl/PolygonMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace pcl
{
struct PolygonMesh
{
PolygonMesh () : header (), cloud (), polygons ()
PolygonMesh ()
{}

::pcl::PCLHeader header;
Expand Down
5 changes: 2 additions & 3 deletions common/include/pcl/TextureMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace pcl
/** \author Khai Tran */
struct TexMaterial
{
TexMaterial () : tex_name (), tex_file (), tex_Ka (), tex_Kd (), tex_Ks (), tex_d (), tex_Ns (), tex_illum () {}
TexMaterial () : tex_Ka (), tex_Kd (), tex_Ks (), tex_d (), tex_Ns (), tex_illum () {}

struct RGB
{
Expand Down Expand Up @@ -89,8 +89,7 @@ namespace pcl
/** \author Khai Tran */
struct TextureMesh
{
TextureMesh () :
cloud (), tex_polygons (), tex_coordinates (), tex_materials () {}
TextureMesh () {}

pcl::PCLPointCloud2 cloud;
pcl::PCLHeader header;
Expand Down
2 changes: 1 addition & 1 deletion common/include/pcl/Vertices.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace pcl
*/
struct Vertices
{
Vertices () : vertices ()
Vertices ()
{}

std::vector<uint32_t> vertices;
Expand Down
4 changes: 0 additions & 4 deletions common/include/pcl/common/pca.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ namespace pcl
: Base ()
, compute_done_ (false)
, basis_only_ (basis_only)
, eigenvectors_ ()
, coefficients_ ()
, mean_ ()
, eigenvalues_ ()
{}

/** Copy Constructor
Expand Down
2 changes: 1 addition & 1 deletion common/include/pcl/common/synchronizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace pcl
int callback_counter;
public:

Synchronizer () : mutex1_ (), mutex2_ (), publish_mutex_ (), queueT1 (), queueT2 (), cb_ (), callback_counter (0) { };
Synchronizer () : queueT1 (), queueT2 (), cb_ (), callback_counter (0) { };

int
addCallback (const CallbackFunction& callback)
Expand Down
Loading

0 comments on commit 6c3bbea

Please sign in to comment.