From 5b7ff35c4d8b41e3d08305b91b0e5973f2e3906b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 16 May 2015 07:29:36 +0200 Subject: [PATCH] cmMakefile: Don't expect the VarStack iterator to support size(). --- Source/cmMakefile.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index e84ea4e51..1a192f5f0 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -105,9 +105,8 @@ public: bool RaiseScope(std::string const& var, const char* varDef, cmMakefile* mf) { - assert(this->VarStack.size() > 0); - std::list::reverse_iterator it = this->VarStack.rbegin(); + assert(it != this->VarStack.rend()); ++it; if(it == this->VarStack.rend()) {