Commit ef142c5e authored by Michael Ott's avatar Michael Ott
Browse files

Add <= operator for SensorId class

parent d3be0573
......@@ -131,6 +131,13 @@ public:
return data.raw[0] < rhs.data.raw[0];
}
inline bool operator <= (const SensorId& rhs) const {
if (data.raw[0] == rhs.data.raw[0])
return data.raw[1] <= rhs.data.raw[1];
else
return data.raw[0] < rhs.data.raw[0];
}
SensorId();
SensorId(std::string mqttTopic);
virtual ~SensorId();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment