diff --git a/opencog/query/VirtualMatch.cc b/opencog/query/VirtualMatch.cc index bb2c2897175..9b9eceb9d9a 100644 --- a/opencog/query/VirtualMatch.cc +++ b/opencog/query/VirtualMatch.cc @@ -23,7 +23,6 @@ #include #include -#include #include #include "Instantiator.h" @@ -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());