瀏覽代碼

fix compile warning

rdb 14 年之前
父節點
當前提交
ee03d5c45d
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      panda/src/pgraph/nodePath.cxx

+ 4 - 1
panda/src/pgraph/nodePath.cxx

@@ -3921,13 +3921,16 @@ get_shader_input(InternalName *id) const {
 ////////////////////////////////////////////////////////////////////
 const int NodePath::
 get_instance_count() const {
-  nassertr_always(!is_empty(), NULL);
+  nassertr_always(!is_empty(), 0);
+
   const RenderAttrib *attrib =
     node()->get_attrib(ShaderAttrib::get_class_slot());
+
   if (attrib != (const RenderAttrib *)NULL) {
     const ShaderAttrib *sa = DCAST(ShaderAttrib, attrib);
     return sa->get_instance_count();
   }
+
   return 0;
 }