From 319a8a2f04aa3dec1eb41f9aa29690bf68bdcfbd Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 3 Oct 2012 14:51:45 +0200 Subject: ICE-4824 - Fixed VC6 style loops --- cpp/src/IceGrid/ServerCache.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'cpp/src/IceGrid/ServerCache.cpp') diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp index d9be593a4af..c7b3835eeb0 100644 --- a/cpp/src/IceGrid/ServerCache.cpp +++ b/cpp/src/IceGrid/ServerCache.cpp @@ -167,8 +167,7 @@ ServerCache::addCommunicator(const CommunicatorDescriptorPtr& comm, assert(!q->id.empty()); _adapterCache.addServerAdapter(*q, server, application); - ObjectDescriptorSeq::const_iterator r; - for(r = q->objects.begin(); r != q->objects.end(); ++r) + for(ObjectDescriptorSeq::const_iterator r = q->objects.begin(); r != q->objects.end(); ++r) { ObjectInfo info; info.type = r->type; @@ -176,7 +175,7 @@ ServerCache::addCommunicator(const CommunicatorDescriptorPtr& comm, _objectCache.add(info, application); } - for(r = q->allocatables.begin(); r != q->allocatables.end(); ++r) + for(ObjectDescriptorSeq::const_iterator r = q->allocatables.begin(); r != q->allocatables.end(); ++r) { ObjectInfo info; info.type = r->type; @@ -191,12 +190,11 @@ ServerCache::removeCommunicator(const CommunicatorDescriptorPtr& comm, const Ser { for(AdapterDescriptorSeq::const_iterator q = comm->adapters.begin() ; q != comm->adapters.end(); ++q) { - ObjectDescriptorSeq::const_iterator r; - for(r = q->objects.begin(); r != q->objects.end(); ++r) + for(ObjectDescriptorSeq::const_iterator r = q->objects.begin(); r != q->objects.end(); ++r) { _objectCache.remove(r->id); } - for(r = q->allocatables.begin(); r != q->allocatables.end(); ++r) + for(ObjectDescriptorSeq::const_iterator r = q->allocatables.begin(); r != q->allocatables.end(); ++r) { _allocatableObjectCache.remove(r->id); } -- cgit v1.2.3