From d4c92e2f8a7856e6cd51d9173c88092e014a4d1d Mon Sep 17 00:00:00 2001 From: yabause Date: Fri, 16 Oct 2009 15:46:36 +0000 Subject: [PATCH] Fixed two compilation errors with g++: - added typename to iterator definitions - g++ doesn't like using an anonymous variable as a reference, added a local variable to make it happy --- desmume/src/lua-engine.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/desmume/src/lua-engine.h b/desmume/src/lua-engine.h index d9db3b4ae..e2594279a 100644 --- a/desmume/src/lua-engine.h +++ b/desmume/src/lua-engine.h @@ -139,8 +139,8 @@ struct TieredRegion bool Contains(unsigned int address, int size) const { - std::vector::const_iterator iter = islands.begin(); - std::vector::const_iterator end = islands.end(); + typename std::vector::const_iterator iter = islands.begin(); + typename std::vector::const_iterator end = islands.end(); for(; iter != end; ++iter) if(iter->Contains(address, size)) return true; @@ -163,7 +163,8 @@ struct TieredRegion TieredRegion() { - Calculate(std::vector()); + std::vector somevector; + Calculate(somevector); } FORCEINLINE int NotEmpty()