clang.patch 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. diff --git a/registration/include/pcl/registration/correspondence_rejection_features.h b/registration/include/pcl/registration/correspondence_rejection_features.h
  2. index 44835c379..f3bab8fef 100644
  3. --- a/registration/include/pcl/registration/correspondence_rejection_features.h
  4. +++ b/registration/include/pcl/registration/correspondence_rejection_features.h
  5. @@ -269,9 +269,9 @@ protected:
  6. // Check if the representations are valid
  7. if (!feature_representation_->isValid(feat_src) ||
  8. !feature_representation_->isValid(feat_tgt)) {
  9. - PCL_ERROR("[pcl::registration::%s::getCorrespondenceScore] Invalid feature "
  10. - "representation given!\n",
  11. - this->getClassName().c_str());
  12. + PCL_ERROR(
  13. + "[pcl::registration::CorrespondenceRejectorFeatures::FeatureContainer::"
  14. + "getCorrespondenceScore] Invalid feature representation given!\n");
  15. return (std::numeric_limits<double>::max());
  16. }
  17. diff --git a/surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp b/surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp
  18. index 7ed8aaf9d..e7f45b650 100644
  19. --- a/surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp
  20. +++ b/surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp
  21. @@ -746,7 +746,10 @@ namespace pcl
  22. Real temp,dist2;
  23. if(!children){return this;}
  24. for(int i=0;i<Cube::CORNERS;i++){
  25. - temp=SquareDistance(children[i].center,p);
  26. + Point3D<Real> child_center;
  27. + Real child_width;
  28. + children[i].centerAndWidth(child_center, child_width);
  29. + temp=SquareDistance(child_center,p);
  30. if(!i || temp<dist2){
  31. dist2=temp;
  32. nearest=i;
  33. @@ -807,7 +810,7 @@ namespace pcl
  34. children=NULL;
  35. d=node.depth ();
  36. - for(i=0;i<DIMENSION;i++){this->offset[i] = node.offset[i];}
  37. + for(i=0;i<DIMENSION;i++){this->off[i] = node.off[i];}
  38. if(node.children){
  39. initChildren();
  40. for(i=0;i<Cube::CORNERS;i++){children[i] = node.children[i];}
  41. @@ -817,7 +820,7 @@ namespace pcl
  42. template <class NodeData,class Real>
  43. int OctNode<NodeData,Real>::CompareForwardDepths(const void* v1,const void* v2){
  44. - return ((const OctNode<NodeData,Real>*)v1)->depth-((const OctNode<NodeData,Real>*)v2)->depth;
  45. + return ((const OctNode<NodeData,Real>*)v1)->depth()-((const OctNode<NodeData,Real>*)v2)->depth();
  46. }
  47. template< class NodeData , class Real >
  48. @@ -874,7 +877,7 @@ namespace pcl
  49. template <class NodeData,class Real>
  50. int OctNode<NodeData,Real>::CompareBackwardDepths(const void* v1,const void* v2){
  51. - return ((const OctNode<NodeData,Real>*)v2)->depth-((const OctNode<NodeData,Real>*)v1)->depth;
  52. + return ((const OctNode<NodeData,Real>*)v2)->depth()-((const OctNode<NodeData,Real>*)v1)->depth();
  53. }
  54. template <class NodeData,class Real>
  55. diff --git a/surface/include/pcl/surface/3rdparty/poisson4/sparse_matrix.hpp b/surface/include/pcl/surface/3rdparty/poisson4/sparse_matrix.hpp
  56. index 24f0a5402..5e54ac786 100644
  57. --- a/surface/include/pcl/surface/3rdparty/poisson4/sparse_matrix.hpp
  58. +++ b/surface/include/pcl/surface/3rdparty/poisson4/sparse_matrix.hpp
  59. @@ -228,14 +228,18 @@ namespace pcl
  60. template<class T>
  61. void SparseMatrix<T>::SetZero()
  62. {
  63. - Resize(this->m_N, this->m_M);
  64. + // copied from operator *=
  65. + for (int i=0; i<rows; i++)
  66. + {
  67. + for(int ii=0;ii<rowSizes[i];ii++){m_ppElements[i][ii].Value=T(0);}
  68. + }
  69. }
  70. template<class T>
  71. void SparseMatrix<T>::SetIdentity()
  72. {
  73. SetZero();
  74. - for(int ij=0; ij < Min( this->Rows(), this->Columns() ); ij++)
  75. + for(int ij=0; ij < std::min<int>( rows, _maxEntriesPerRow ); ij++)
  76. (*this)(ij,ij) = T(1);
  77. }
  78. @@ -388,7 +392,7 @@ namespace pcl
  79. T alpha,beta,rDotR;
  80. int i;
  81. - solution.Resize(M.Columns());
  82. + solution.Resize(bb.Dimensions());
  83. solution.SetZero();
  84. d=r=bb;
  85. diff --git a/visualization/include/pcl/visualization/impl/registration_visualizer.hpp b/visualization/include/pcl/visualization/impl/registration_visualizer.hpp
  86. index 884735e4a..83d63906d 100644
  87. --- a/visualization/include/pcl/visualization/impl/registration_visualizer.hpp
  88. +++ b/visualization/include/pcl/visualization/impl/registration_visualizer.hpp
  89. @@ -39,6 +39,7 @@
  90. #pragma once
  91. #include <thread>
  92. +#include <chrono>
  93. namespace pcl