aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/types
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/types')
-rw-r--r--host/lib/types/ranges.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/host/lib/types/ranges.cpp b/host/lib/types/ranges.cpp
index ee4546cb8..d22e2fb6a 100644
--- a/host/lib/types/ranges.cpp
+++ b/host/lib/types/ranges.cpp
@@ -63,6 +63,18 @@ const std::string range_t::to_pp_string(void) const{
return ss.str();
}
+bool range_t::operator==(const range_t &other) const{
+ return (other._start == _start and
+ other._step == _step and
+ other._stop == _stop);
+}
+
+bool range_t::operator!=(const range_t &other) const{
+ return (other._start != _start or
+ other._step != _step or
+ other._stop != _stop);
+}
+
/***********************************************************************
* meta_range_t implementation code
**********************************************************************/