Skip to content

Commit

Permalink
ParameterMetadata::operator== should be const
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoferigo committed May 7, 2018
1 parent 825c2b5 commit 44a5cfc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions toolbox/include/base/Parameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ class wbt::ParameterMetadata

ParameterMetadata& operator=(const ParameterMetadata& paramMD);
ParameterMetadata& operator=(ParameterMetadata&& paramMD);
bool operator==(const ParameterMetadata& rhs);
inline bool operator!=(const ParameterMetadata& rhs) { return !(*this == rhs); }
bool operator==(const ParameterMetadata& rhs) const;
inline bool operator!=(const ParameterMetadata& rhs) const { return !(*this == rhs); }
};

/**
Expand Down
2 changes: 1 addition & 1 deletion toolbox/src/base/Parameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ParameterMetadata& ParameterMetadata::operator=(ParameterMetadata&& other)
return *this;
}

bool ParameterMetadata::operator==(const ParameterMetadata& rhs)
bool ParameterMetadata::operator==(const ParameterMetadata& rhs) const
{
bool ok = true;
ok = ok && (this->index == rhs.index);
Expand Down

0 comments on commit 44a5cfc

Please sign in to comment.