Skip to content

Commit 5a54ff4

Browse files
Fix ScanGraph.h c++20 compilation error (#398)
This fixes the following error on latest msvc compiler: error C2666: 'octomap::ScanNode::operator ==': overloaded functions have similar conversions message : could be 'bool octomap::ScanNode::operator ==(const octomap::ScanNode &)' message : or 'bool octomap::ScanNode::operator ==(const octomap::ScanNode &)' [synthesized expression 'y == x'] message : while trying to match the argument list '(octomap::ScanNode, octomap::ScanNode)'
1 parent 09f3b4b commit 5a54ff4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: octomap/include/octomap/ScanGraph.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ namespace octomap {
6060

6161
~ScanNode();
6262

63-
bool operator == (const ScanNode& other) {
63+
bool operator == (const ScanNode& other) const {
6464
return (id == other.id);
6565
}
6666

@@ -87,7 +87,7 @@ namespace octomap {
8787
: first(_first), second(_second), constraint(_constraint), weight(1.0) { }
8888
ScanEdge() {}
8989

90-
bool operator == (const ScanEdge& other) {
90+
bool operator == (const ScanEdge& other) const {
9191
return ( (*first == *(other.first) ) && ( *second == *(other.second) ) );
9292
}
9393

0 commit comments

Comments
 (0)