Skip to content

Commit 958e9b6

Browse files
committed
Deprecate getName() in Cylinder and Cone SAC models
The function is obsoleted by getClassName().
1 parent 229976e commit 958e9b6

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

sample_consensus/include/pcl/sample_consensus/sac_model_cone.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
#include <pcl/sample_consensus/sac_model.h>
4343
#include <pcl/sample_consensus/model_types.h>
44+
#include <pcl/pcl_macros.h>
4445
#include <pcl/common/common.h>
4546
#include <pcl/common/distances.h>
4647
#include <limits.h>
@@ -274,8 +275,9 @@ namespace pcl
274275
pointToAxisDistance (const Eigen::Vector4f &pt, const Eigen::VectorXf &model_coefficients);
275276

276277
/** \brief Get a string representation of the name of this class. */
277-
std::string
278-
getName () const { return ("SampleConsensusModelCone"); }
278+
PCL_DEPRECATED ("[pcl::SampleConsensusModelCone::getName] getName is deprecated. Please use getClassName instead.")
279+
std::string
280+
getName () const { return (model_name_); }
279281

280282
protected:
281283
/** \brief Check whether a model is valid given the user constraints.

sample_consensus/include/pcl/sample_consensus/sac_model_cylinder.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343

4444
#include <pcl/sample_consensus/sac_model.h>
4545
#include <pcl/sample_consensus/model_types.h>
46+
#include <pcl/pcl_macros.h>
4647
#include <pcl/common/common.h>
4748
#include <pcl/common/distances.h>
4849

@@ -274,8 +275,9 @@ namespace pcl
274275
Eigen::Vector4f &pt_proj);
275276

276277
/** \brief Get a string representation of the name of this class. */
277-
std::string
278-
getName () const { return ("SampleConsensusModelCylinder"); }
278+
PCL_DEPRECATED ("[pcl::SampleConsensusModelCylinder::getName] getName is deprecated. Please use getClassName instead.")
279+
std::string
280+
getName () const { return (model_name_); }
279281

280282
protected:
281283
/** \brief Check whether a model is valid given the user constraints.

0 commit comments

Comments
 (0)