瀏覽代碼

Review PR formatting

Ray 6 年之前
父節點
當前提交
741afde3bc
共有 1 個文件被更改,包括 3 次插入7 次删除
  1. 3 7
      src/models.c

+ 3 - 7
src/models.c

@@ -669,9 +669,7 @@ Model LoadModel(const char *fileName)
         model.materials = (Material *)RL_CALLOC(model.materialCount, sizeof(Material));
         model.materials[0] = LoadMaterialDefault();
 
-        if (model.meshMaterial==NULL) {
-            model.meshMaterial = (int *)RL_CALLOC(model.meshCount, sizeof(int));
-        }
+        if (model.meshMaterial == NULL) model.meshMaterial = (int *)RL_CALLOC(model.meshCount, sizeof(int));
     }
 
     return model;
@@ -2863,10 +2861,8 @@ static Model LoadOBJ(const char *fileName)
             // Assign mesh material for current mesh
             model.meshMaterial[m] = attrib.material_ids[m];
 
-            // set unfound materials to default
-            if (model.meshMaterial[m] == -1) {
-                model.meshMaterial[m] = 0;
-            }
+            // Set unfound materials to default
+            if (model.meshMaterial[m] == -1) model.meshMaterial[m] = 0;
         }
 
         // Init model materials