Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of the Visual C++ warnings #355

Merged
merged 6 commits into from
Nov 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pointmatcher/.#IO.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
afabri@MALEVICH.7828:1566821008
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

4 changes: 2 additions & 2 deletions pointmatcher/DataPointsFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ void PointMatcher<T>::DataPointsFilters::apply(DataPoints& cloud)
cloud.assertDescriptorConsistency();

const int nbPointsOut(cloud.features.cols());
LOG_INFO_STREAM("* " << (*it)->className << " - " << nbPointsOut << " points out (-" << (100 - double(nbPointsOut*100.)/nbPointsIn) << "\%)");
LOG_INFO_STREAM("* " << (*it)->className << " - " << nbPointsOut << " points out (-" << (100 - double(nbPointsOut*100.)/nbPointsIn) << "%)");
}

const int nbPointsAfterFilters(cloud.features.cols());
LOG_INFO_STREAM("Applied " << this->size() << " filters - " << nbPointsAfterFilters << " points out (-" << (100 - double(nbPointsAfterFilters*100.)/nbPointsBeforeFilters) << "\%)");
LOG_INFO_STREAM("Applied " << this->size() << " filters - " << nbPointsAfterFilters << " points out (-" << (100 - double(nbPointsAfterFilters*100.)/nbPointsBeforeFilters) << "%)");
}

template struct PointMatcher<float>::DataPointsFilters;
Expand Down
2 changes: 1 addition & 1 deletion pointmatcher/DataPointsFilters/CovarianceSampling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ CovarianceSamplingDataPointsFilter<T>::CovarianceSamplingDataPointsFilter(const
const std::uint8_t tnm = this->template get<std::uint8_t>("torqueNorm");
normalizationMethod = TorqueNormMethod(tnm);
}
catch (const InvalidParameter& e)
catch (const InvalidParameter&)
{
normalizationMethod = TorqueNormMethod::Lavg;
}
Expand Down
2 changes: 1 addition & 1 deletion pointmatcher/DataPointsFilters/MaxPointCount.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ MaxPointCountDataPointsFilter<T>::MaxPointCountDataPointsFilter(const Parameters
{
seed = this->template get<size_t>("seed");
}
catch (const InvalidParameter& e)
catch (const InvalidParameter&)
{
seed = static_cast<size_t>(1); // rand default seed number
}
Expand Down
2 changes: 1 addition & 1 deletion pointmatcher/DataPointsFilters/OctreeGrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ OctreeGridDataPointsFilter<T>::OctreeGridDataPointsFilter(const Parameters& para
const int sm = this->template get<int>("samplingMethod");
samplingMethod = SamplingMethod(sm);
}
catch (const InvalidParameter& e)
catch (const InvalidParameter&)
{
samplingMethod = SamplingMethod::FIRST_PTS;
}
Expand Down
2 changes: 1 addition & 1 deletion pointmatcher/ICP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ typename PointMatcher<T>::TransformationParameters PointMatcher<T>::ICP::compute
{
this->transformationCheckers.check(T_iter, iterate);
}
catch(const typename TransformationCheckersImpl<T>::CounterTransformationChecker::MaxNumIterationsReached & e)
catch(const typename TransformationCheckersImpl<T>::CounterTransformationChecker::MaxNumIterationsReached &)
{
iterate = false;
this->maxNumIterationsReached = true;
Expand Down
10 changes: 5 additions & 5 deletions pointmatcher/IO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ typename PointMatcherIO<T>::DataPoints PointMatcherIO<T>::loadPLY(std::istream&
{
elem_num = boost::lexical_cast<unsigned>(elem_num_s);
}
catch (boost::bad_lexical_cast& e)
catch (boost::bad_lexical_cast&)
{
throw runtime_error(string("PLY parse error: bad number of elements ") + elem_num_s + string(" for element ") + elem_name);
}
Expand Down Expand Up @@ -1983,7 +1983,7 @@ typename PointMatcherIO<T>::DataPoints PointMatcherIO<T>::loadPCD(std::istream&
{
header.width = boost::lexical_cast<unsigned int >(tokens[1]);
}
catch (boost::bad_lexical_cast& e)
catch (boost::bad_lexical_cast&)
{
throw runtime_error("PCD Parse Error: invalid WIDTH");
}
Expand All @@ -1996,7 +1996,7 @@ typename PointMatcherIO<T>::DataPoints PointMatcherIO<T>::loadPCD(std::istream&
{
header.height= boost::lexical_cast<unsigned int >(tokens[1]);
}
catch (boost::bad_lexical_cast& e)
catch (boost::bad_lexical_cast&)
{
throw runtime_error("PCD Parse Error: invalid HEIGHT");
}
Expand All @@ -2014,7 +2014,7 @@ typename PointMatcherIO<T>::DataPoints PointMatcherIO<T>::loadPCD(std::istream&
{
header.viewPoint(i-1, 0) = boost::lexical_cast<T>(tokens[i]);
}
catch (boost::bad_lexical_cast& e)
catch (boost::bad_lexical_cast&)
{
stringstream ss;
ss << "PCD Parse Error: invalid value(" << tokens[i] << ") of VIEWPOINT";
Expand All @@ -2030,7 +2030,7 @@ typename PointMatcherIO<T>::DataPoints PointMatcherIO<T>::loadPCD(std::istream&
{
header.nbPoints = boost::lexical_cast<unsigned int>(tokens[1]);
}
catch (boost::bad_lexical_cast& e)
catch (boost::bad_lexical_cast&)
{
stringstream ss;
ss << "PCD Parse Error: the value in the element POINTS (" << tokens[1] << ") could not be cast as unsigned int";
Expand Down