freebsd-ports/net/netmap/files/patch-netmap::misc.h
Alexey Dokuchaev 1f16f5e923 Fix bad C++ code, to unbreak on 5.X and -CURRENT.
Reported by:	kris
Approved by:	portmgr (marcus), fjoe (mentor, implicit)
2004-09-20 19:34:58 +00:00

28 lines
756 B
C++

--- netmap/misc.h.orig Sun Dec 15 14:54:26 2002
+++ netmap/misc.h Sun Dec 15 14:54:26 2002
@@ -6,6 +6,7 @@
#include <iostream>
#include <list>
+using namespace std;
string indent(unsigned);
@@ -21,7 +22,7 @@
template <class T>
bool contains(list<T>& l, const T& t)
{
- for(list<T>::iterator li = l.begin(); li != l.end(); li++)
+ for(typename list<T>::iterator li = l.begin(); li != l.end(); li++)
if((*li) == t)
return true;
return false;
@@ -31,7 +32,7 @@
list<T> intersect(list<T>& l1, list<T>& l2)
{
list<T> result;
- for(list<T>::iterator li = l1.begin(); li != l1.end(); li++)
+ for(typename list<T>::iterator li = l1.begin(); li != l1.end(); li++)
if(contains(l2, *li))
result.push_back(*li);