Skip to content

Commit

Permalink
Replace foreach by C++11 range for
Browse files Browse the repository at this point in the history
  • Loading branch information
ngeiswei committed Dec 23, 2014
1 parent e70a242 commit dc87067
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions opencog/query/VirtualMatch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

#include <opencog/atomspace/ClassServer.h>
#include <opencog/atomspace/SimpleTruthValue.h>
#include <opencog/util/foreach.h>
#include <opencog/util/Logger.h>

#include "Instantiator.h"
Expand Down Expand Up @@ -355,11 +354,11 @@ void PatternMatch::do_match(PatternMatchCallback *cb,
ss << "Pattern is not connected! Found "
<< components.size() << " components:\n";
int cnt = 0;
foreach (auto comp, components)
for (auto comp : components)
{
ss << "Connected component " << cnt
<< " consists of ----------------: \n";
foreach (Handle h, comp) ss << h->toString();
for (Handle h : comp) ss << h->toString();
cnt++;
}
throw InvalidParamException(TRACE_INFO, ss.str().c_str());
Expand Down

0 comments on commit dc87067

Please sign in to comment.