diff options
Diffstat (limited to 'proto_lib/utilities.cpp')
-rw-r--r-- | proto_lib/utilities.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/proto_lib/utilities.cpp b/proto_lib/utilities.cpp index b54e45a..ee5e9b4 100644 --- a/proto_lib/utilities.cpp +++ b/proto_lib/utilities.cpp @@ -82,7 +82,7 @@ const unsigned char *to_internal_type(packet_type t) } #ifdef DEBUG -bool service_s::cmd::operator==(const cmd& c) +bool service_s::cmd::operator==(const cmd& c) const { if(c.command != command) return false; @@ -91,18 +91,18 @@ bool service_s::cmd::operator==(const cmd& c) return true; } -bool service_s::operator==(service_s& s) +bool service_s::operator==(const service_s& s) const { if(s.service != service) return false; - for(std::list<service_s::cmd>::iterator i = s.cmds.begin(), end = s.cmds.end(); i != end; ++i) + for(std::list<service_s::cmd>::const_iterator i = s.cmds.begin(), end = s.cmds.end(); i != end; ++i) { if(std::find(cmds.begin(), cmds.end(), *i) == cmds.end()) return false; } return true; } -bool service_s::operator!=(service_s& s) +bool service_s::operator!=(const service_s& s) const { return !(*this == s); } |