Skip to content

Commit

Permalink
Update map_helpers.h
Browse files Browse the repository at this point in the history
update equality operator to be `const`
  • Loading branch information
Apolo151 authored May 4, 2024
1 parent 5b8d5cc commit 86bb127
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/map_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class RoadProperties {
RoadProperties(int, transportations);
RoadProperties(const RoadProperties&);

bool operator==(const RoadProperties &other) {
bool operator==(const RoadProperties &other) const {
return other.cost == cost && other.transport == transport;
}
};
Expand All @@ -54,4 +54,4 @@ class Route {
Route(const Route&);
//
void addRoad(RoadProperties);
};
};

0 comments on commit 86bb127

Please sign in to comment.