Skip to content

Commit

Permalink
fix const correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed May 17, 2019
1 parent 674b574 commit 78ca396
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libs/containers/include/mrpt/containers/CDynamicGrid3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,13 @@ class CDynamicGrid3D
if (cidx == INVALID_VOXEL_IDX) return nullptr;
return &m_map[cidx];
}
inline const T* cellByIndex(
unsigned int cx, unsigned int cy, unsigned int cz) const
{
const size_t cidx = cellAbsIndexFromCXCYCZ(cx, cy, cz);
if (cidx == INVALID_VOXEL_IDX) return nullptr;
return &m_map[cidx];
}

/** Returns a pointer to the contents of a voxel given by its absolute voxel
* index, or nullptr if it is out of range.
Expand Down

0 comments on commit 78ca396

Please sign in to comment.