Fix implicit typenames.

This commit is contained in:
Steve Checkoway
2005-12-19 04:20:58 +00:00
parent cfecb44f71
commit 06d3eb564b
+4 -2
View File
@@ -4,6 +4,7 @@
#define RAGE_UTIL_H
#include <map>
#include <vector>
#include "Foreach.h"
#define SAFE_DELETE(p) { delete (p); (p)=NULL; }
@@ -484,9 +485,10 @@ template<class T>
void GetAsNotInBs( const vector<T> &as, const vector<T> &bs, vector<T> &difference )
{
vector<T> bsUnmatched = bs;
FOREACH_CONST( T, as, a )
// Cannot use FOREACH_CONST here because vector<T>::const_iterator is an implicit type.
for( typename vector<T>::const_iterator a = as.begin(); a != as.end(); ++a )
{
vector<T>::iterator iter = find( bsUnmatched.begin(), bsUnmatched.end(), *a );
typename vector<T>::iterator iter = find( bsUnmatched.begin(), bsUnmatched.end(), *a );
if( iter != bsUnmatched.end() )
bsUnmatched.erase( iter );
else