浏览代码

cmMakefile: Don't expect the VarStack iterator to support size().

Stephen Kelly 10 年之前
父节点
当前提交
5b7ff35c4d
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      Source/cmMakefile.cxx

+ 1 - 2
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<cmDefinitions>::reverse_iterator it = this->VarStack.rbegin();
+    assert(it != this->VarStack.rend());
     ++it;
     if(it == this->VarStack.rend())
       {