code cleanup: remove unused code
authorCampbell Barton <ideasman42@gmail.com>
Sat, 27 Jul 2013 18:17:19 +0000 (18:17 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 27 Jul 2013 18:17:19 +0000 (18:17 +0000)
source/blender/blenlib/intern/fileops.c
source/blender/modifiers/intern/MOD_cloth.c

index af0359c00872a8a52cebb4e187686a643d6533a8..4809ba59aaf7c4412310ffea5fc79c7afd667bc8 100644 (file)
@@ -911,18 +911,15 @@ void BLI_dir_create_recursive(const char *dirname)
        char static_buf[MAXPATHLEN];
 #endif
        char *tmp;
-       int needs_free;
 
        if (BLI_exists(dirname)) return;
 
 #ifdef MAXPATHLEN
        size = MAXPATHLEN;
        tmp = static_buf;
-       needs_free = 0;
 #else
        size = strlen(dirname) + 1;
-       tmp = MEM_callocN(size, "BLI_dir_create_recursive tmp");
-       needs_free = 1;
+       tmp = MEM_callocN(size, __func__);
 #endif
 
        BLI_strncpy(tmp, dirname, size);
@@ -934,8 +931,9 @@ void BLI_dir_create_recursive(const char *dirname)
                BLI_dir_create_recursive(tmp);
        }
 
-       if (needs_free)
-               MEM_freeN(tmp);
+#ifndef MAXPATHLEN
+       MEM_freeN(tmp);
+#endif
 
        mkdir(dirname, 0777);
 }
index ec3212d4cbb57b0cf45820d39b84b2d8d5c9055d..81f139e48ce364c936012e47d7aff85469b64915 100644 (file)
@@ -72,7 +72,6 @@ static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData,
 {
        DerivedMesh *dm;
        ClothModifierData *clmd = (ClothModifierData *) md;
-       DerivedMesh *result = NULL;
        
        /* check for alloc failing */
        if (!clmd->sim_parms || !clmd->coll_parms) {
@@ -92,11 +91,6 @@ static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData,
 
        clothModifier_do(clmd, md->scene, ob, dm, vertexCos);
 
-       if (result) {
-               result->getVertCos(result, vertexCos);
-               result->release(result);
-       }
-
        dm->release(dm);
 }