瀏覽代碼

C4703 workaround for msvc++

`error C4703: potentially uninitialized local pointer variable 'pcFirstFrame'` in debug mode
Matthias Moulin 6 年之前
父節點
當前提交
48ee14c64e
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      code/MDLLoader.cpp

+ 2 - 1
code/MDLLoader.cpp

@@ -413,8 +413,9 @@ void MDLImporter::InternReadFile_Quake1() {
 
 
 #if 1
 #if 1
         // FIXME: the cast is wrong and cause a warning on clang 5.0
         // FIXME: the cast is wrong and cause a warning on clang 5.0
-        // disable thi code for now, fix it later
+        // disable this code for now, fix it later
         ai_assert(false && "Bad pointer cast");
         ai_assert(false && "Bad pointer cast");
+        pcFirstFrame = NULL;
 #else
 #else
         BE_NCONST MDL::GroupFrame* pcFrames2 = (BE_NCONST MDL::GroupFrame*)pcFrames;
         BE_NCONST MDL::GroupFrame* pcFrames2 = (BE_NCONST MDL::GroupFrame*)pcFrames;
         pcFirstFrame = (BE_NCONST MDL::SimpleFrame*)(&pcFrames2->time + pcFrames->type);
         pcFirstFrame = (BE_NCONST MDL::SimpleFrame*)(&pcFrames2->time + pcFrames->type);