瀏覽代碼

removed assert

Dave Schuyler 23 年之前
父節點
當前提交
4b245a4394
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      panda/src/putil/uniqueIdAllocator.cxx

+ 3 - 2
panda/src/putil/uniqueIdAllocator.cxx

@@ -97,8 +97,9 @@ allocate() {
   }
   }
   U32 id=_min+_next_free;
   U32 id=_min+_next_free;
   _next_free=_table[_next_free];
   _next_free=_table[_next_free];
-  // This assert will not fire because it is assigning not comparing.  This is intentional.
-  nassertr(_table[id-_min]=IndexAllocated, IndexEnd); // this assignment is debug only.
+  #ifndef NDEBUG //[
+    _table[id-_min]=IndexAllocated;
+  #endif //]
   --_free;
   --_free;
   uniqueIdAllocator_debug("allocate() returning "<<id);
   uniqueIdAllocator_debug("allocate() returning "<<id);
   return id;
   return id;