From 49729a7593320662545b7c795f028d0f87827b0f Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Wed, 13 Feb 2013 18:05:13 +0200 Subject: proto lib fixes --- proto_lib/utilities.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'proto_lib/utilities.cpp') 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::iterator i = s.cmds.begin(), end = s.cmds.end(); i != end; ++i) + for(std::list::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); } -- cgit v1.2.3