Skip to content

Commit 1186310

Browse files
committed
Address suggestions from copilot.
1 parent 6f2972b commit 1186310

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

common/include/pcl/console/print.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ namespace pcl
287287
va_list ap;
288288
while (true) {
289289
formatted.reset(new char[n]); /* Wrap the plain char array into the unique_ptr */
290-
std::strcpy(&formatted[0], fmt_str.c_str());
291290
va_start(ap, fmt_str);
292291
final_n = vsnprintf(&formatted[0], n, fmt_str.c_str(), ap);
293292
va_end(ap);

sample_consensus/include/pcl/sample_consensus/sac_model.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ namespace pcl
174174

175175
// Get a second point which is different than the first
176176
samples.resize (getSampleSize ());
177-
for (unsigned int iter = 0; iter < getMaxSampleSize(); ++iter)
177+
for (unsigned int iter = 0; iter < getMaxSampleChecks(); ++iter)
178178
{
179179
// Choose the random indices
180180
if (samples_radius_ < std::numeric_limits<double>::epsilon ())
@@ -192,7 +192,7 @@ namespace pcl
192192
PCL_DEBUG("[pcl::SampleConsensusModel::getSamples] WARNING: Could not select "
193193
"%d sample points in %d iterations!\n",
194194
getSampleSize(),
195-
getMaxSampleSize());
195+
getMaxSampleChecks());
196196
samples.clear ();
197197
}
198198

@@ -351,7 +351,7 @@ namespace pcl
351351
}
352352

353353
static unsigned int
354-
getMaxSampleSize()
354+
getMaxSampleChecks()
355355
{
356356
/** The maximum number of samples to try until we get a good one */
357357
static const unsigned int max_sample_checks_ = 1000;
@@ -556,7 +556,7 @@ namespace pcl
556556
IndicesPtr indices_;
557557

558558
/** The maximum number of samples to try until we get a good one */
559-
PCL_DEPRECATED(1, 18, "Use getMaxSampleSize() instead.")
559+
PCL_DEPRECATED(1, 18, "Use getMaxSampleChecks() instead.")
560560
static const unsigned int max_sample_checks_ = 1000;
561561

562562
/** \brief The minimum and maximum radius limits for the model.

test/common/test_console.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
TEST(PCL, printStreamsMacros) {
77
pcl::console::setVerbosityLevel(pcl::console::L_VERBOSE);
88

9-
PCL_ALWAYS_STREAM("Always_stream\n");
9+
PCL_ALWAYS_STREAM("Always_stream\n")
1010
PCL_ERROR_STREAM("Error_stream\n")
11-
PCL_WARN_STREAM("Warn_stream\n");
11+
PCL_WARN_STREAM("Warn_stream\n")
1212
PCL_INFO_STREAM("Info_stream: this is a point: " << pcl::PointXYZ(1.0, 2.0, 3.0)
13-
<< "\n");
14-
PCL_DEBUG_STREAM("Debug_stream\n");
13+
<< "\n")
14+
PCL_DEBUG_STREAM("Debug_stream\n")
1515
PCL_VERBOSE_STREAM("Verbose_stream: an Eigen vector: "
1616
<< "\n"
17-
<< Eigen::Vector3f(1.0, 2.0, 3.0) << "\n");
17+
<< Eigen::Vector3f(1.0, 2.0, 3.0) << "\n")
1818
}
1919

2020
TEST(PCL, printMacros)

0 commit comments

Comments
 (0)