diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2013-02-13 18:05:13 +0200 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2013-02-13 18:05:13 +0200 |
commit | 49729a7593320662545b7c795f028d0f87827b0f (patch) | |
tree | 7bba69ac6cca15c29d1187c7267bf917fae14fa3 /proto_lib/utilities.cpp | |
parent | e255c37eca94d4d9c23f689b473b106575b9e2fa (diff) |
proto lib fixes
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); } |