Skip to content

Commit

Permalink
Fix ScanGraph.h c++20 compilation error (#398)
Browse files Browse the repository at this point in the history
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)'
  • Loading branch information
eladm-ultrawis authored May 21, 2023
1 parent 09f3b4b commit 5a54ff4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions octomap/include/octomap/ScanGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace octomap {

~ScanNode();

bool operator == (const ScanNode& other) {
bool operator == (const ScanNode& other) const {
return (id == other.id);
}

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

bool operator == (const ScanEdge& other) {
bool operator == (const ScanEdge& other) const {
return ( (*first == *(other.first) ) && ( *second == *(other.second) ) );
}

Expand Down

0 comments on commit 5a54ff4

Please sign in to comment.