Skip to content

Commit

Permalink
fix(wto): add const&
Browse files Browse the repository at this point in the history
  • Loading branch information
caballa committed Jul 27, 2023
1 parent 14af6d6 commit b63cb25
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions include/crab/fixpoint/wto.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ template <typename G> class wto_nesting {
private:
wto_nesting(node_list_ptr l) : _nodes(std::make_shared<node_list_t>(*l)) {}

int compare(wto_nesting_t &other) const {
int compare(const wto_nesting_t &other) const {
const_iterator this_it = this->begin(), other_it = other.begin();
while (this_it != this->end()) {
if (other_it == other.end()) {
Expand Down Expand Up @@ -135,7 +135,7 @@ template <typename G> class wto_nesting {

const_iterator end() const { return _nodes->end(); }

wto_nesting_t operator^(wto_nesting_t other) const {
wto_nesting_t operator^(const wto_nesting_t &other) const {
wto_nesting_t res;
for (const_iterator this_it = this->begin(), other_it = other.begin();
this_it != this->end() && other_it != other.end();
Expand All @@ -149,19 +149,19 @@ template <typename G> class wto_nesting {
return res;
}

bool operator<=(wto_nesting_t other) const {
bool operator<=(const wto_nesting_t &other) const {
return this->compare(other) <= 0;
}

bool operator==(wto_nesting_t other) const {
bool operator==(const wto_nesting_t &other) const {
return this->compare(other) == 0;
}

bool operator>=(wto_nesting_t other) const {
return this->operator<=(other, *this);
bool operator>=(const wto_nesting_t &other) const {
return other.operator<=(*this);
}

bool operator>(wto_nesting_t other) const {
bool operator>(const wto_nesting_t &other) const {
return this->compare(other) == 1;
}

Expand Down

0 comments on commit b63cb25

Please sign in to comment.