Skip to content

Commit 3ac9874

Browse files
committed
Cleanup of OcTreeKey arguments (const refs)
1 parent 27092e2 commit 3ac9874

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

octomap/include/octomap/OcTreeKey.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ namespace octomap {
7777
bool operator== (const OcTreeKey &other) const {
7878
return ((k[0] == other[0]) && (k[1] == other[1]) && (k[2] == other[2]));
7979
}
80-
bool operator!= (const OcTreeKey &other) const {
80+
bool operator!= (const OcTreeKey& other) const {
8181
return( (k[0] != other[0]) || (k[1] != other[1]) || (k[2] != other[2]) );
8282
}
8383
OcTreeKey& operator=(const OcTreeKey& other){
@@ -131,7 +131,7 @@ namespace octomap {
131131
void reset() {
132132
end_of_ray = begin();
133133
}
134-
void addKey(OcTreeKey& k) {
134+
void addKey(const OcTreeKey& k) {
135135
assert(end_of_ray != ray.end());
136136
*end_of_ray = k;
137137
end_of_ray++;
@@ -167,7 +167,7 @@ namespace octomap {
167167
* @param[in] parent_key current (parent) key
168168
* @param[out] child_key computed child key
169169
*/
170-
inline void computeChildKey (const unsigned int& pos, const unsigned short int& center_offset_key,
170+
inline void computeChildKey (unsigned int pos, unsigned short int center_offset_key,
171171
const OcTreeKey& parent_key, OcTreeKey& child_key) {
172172
// x-axis
173173
if (pos & 1) child_key[0] = parent_key[0] + center_offset_key;

0 commit comments

Comments
 (0)