Skip to content

Commit 6f1105a

Browse files
committed
Compatibility with clang-19
1 parent 13d437b commit 6f1105a

3 files changed

Lines changed: 17 additions & 10 deletions

File tree

registration/include/pcl/registration/correspondence_rejection_features.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,9 @@ class PCL_EXPORTS CorrespondenceRejectorFeatures : public CorrespondenceRejector
269269
// Check if the representations are valid
270270
if (!feature_representation_->isValid(feat_src) ||
271271
!feature_representation_->isValid(feat_tgt)) {
272-
PCL_ERROR("[pcl::registration::%s::getCorrespondenceScore] Invalid feature "
273-
"representation given!\n",
274-
this->getClassName().c_str());
272+
PCL_ERROR(
273+
"[pcl::registration::CorrespondenceRejectorFeatures::FeatureContainer::"
274+
"getCorrespondenceScore] Invalid feature representation given!\n");
275275
return (std::numeric_limits<double>::max());
276276
}
277277

surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,10 @@ namespace pcl
746746
Real temp,dist2;
747747
if(!children){return this;}
748748
for(int i=0;i<Cube::CORNERS;i++){
749-
temp=SquareDistance(children[i].center,p);
749+
Point3D<Real> child_center;
750+
Real child_width;
751+
children[i].centerAndWidth(child_center, child_width);
752+
temp=SquareDistance(child_center,p);
750753
if(!i || temp<dist2){
751754
dist2=temp;
752755
nearest=i;
@@ -807,7 +810,7 @@ namespace pcl
807810
children=NULL;
808811

809812
d=node.depth ();
810-
for(i=0;i<DIMENSION;i++){this->offset[i] = node.offset[i];}
813+
for(i=0;i<DIMENSION;i++){this->off[i] = node.off[i];}
811814
if(node.children){
812815
initChildren();
813816
for(i=0;i<Cube::CORNERS;i++){children[i] = node.children[i];}
@@ -817,7 +820,7 @@ namespace pcl
817820

818821
template <class NodeData,class Real>
819822
int OctNode<NodeData,Real>::CompareForwardDepths(const void* v1,const void* v2){
820-
return ((const OctNode<NodeData,Real>*)v1)->depth-((const OctNode<NodeData,Real>*)v2)->depth;
823+
return ((const OctNode<NodeData,Real>*)v1)->depth()-((const OctNode<NodeData,Real>*)v2)->depth();
821824
}
822825

823826
template< class NodeData , class Real >
@@ -874,7 +877,7 @@ namespace pcl
874877

875878
template <class NodeData,class Real>
876879
int OctNode<NodeData,Real>::CompareBackwardDepths(const void* v1,const void* v2){
877-
return ((const OctNode<NodeData,Real>*)v2)->depth-((const OctNode<NodeData,Real>*)v1)->depth;
880+
return ((const OctNode<NodeData,Real>*)v2)->depth()-((const OctNode<NodeData,Real>*)v1)->depth();
878881
}
879882

880883
template <class NodeData,class Real>

surface/include/pcl/surface/3rdparty/poisson4/sparse_matrix.hpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,18 @@ namespace pcl
228228
template<class T>
229229
void SparseMatrix<T>::SetZero()
230230
{
231-
Resize(this->m_N, this->m_M);
231+
// copied from operator *=
232+
for (int i=0; i<rows; i++)
233+
{
234+
for(int ii=0;ii<rowSizes[i];ii++){m_ppElements[i][ii].Value=T(0);}
235+
}
232236
}
233237

234238
template<class T>
235239
void SparseMatrix<T>::SetIdentity()
236240
{
237241
SetZero();
238-
for(int ij=0; ij < Min( this->Rows(), this->Columns() ); ij++)
242+
for(int ij=0; ij < std::min<int>( rows, _maxEntriesPerRow ); ij++)
239243
(*this)(ij,ij) = T(1);
240244
}
241245

@@ -388,7 +392,7 @@ namespace pcl
388392
T alpha,beta,rDotR;
389393
int i;
390394

391-
solution.Resize(M.Columns());
395+
solution.Resize(bb.Dimensions());
392396
solution.SetZero();
393397

394398
d=r=bb;

0 commit comments

Comments
 (0)