Compiler warning fixes (how some of this stuff compiled without stopping compiling...
authorJoshua Leung <aligorith@gmail.com>
Tue, 8 Jul 2008 07:30:38 +0000 (07:30 +0000)
committerJoshua Leung <aligorith@gmail.com>
Tue, 8 Jul 2008 07:30:38 +0000 (07:30 +0000)
source/blender/blenkernel/BKE_bmeshCustomData.h
source/blender/blenkernel/intern/BME_Customdata.c
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/src/editsima.c
source/blender/src/view.c

index 423f75e532d582d84003f8e5a94e5288dc0f4571..4f5f2641f548d72596b136ab23048c03d10b5e6f 100644 (file)
@@ -38,7 +38,7 @@
 #ifndef BKE_BMESHCUSTOMDATA_H
 #define BKE_BMESHCUSTOMDATA_H
 
-struct BME_mempool;
+struct BLI_mempool;
 
 /*Custom Data Types and defines
        Eventual plan is to move almost everything to custom data and let caller
@@ -62,7 +62,7 @@ typedef struct BME_CustomDataLayer {
 
 typedef struct BME_CustomData {
        struct BME_CustomDataLayer *layers;     /*Custom Data Layers*/
-       struct BME_mempool *pool;                               /*pool for alloc of blocks*/
+       struct BLI_mempool *pool;                               /*pool for alloc of blocks*/
        int totlayer, totsize;          /*total layers and total size in bytes of each block*/
 } BME_CustomData;
 
index 8b48efbdbd23b740fe49625a410a23aaa01db372..1fc8a4071dc8bf6b760e60e4b084ad367408fb34 100644 (file)
@@ -40,6 +40,7 @@
 #include "bmesh_private.h"
 #include <string.h>
 #include "MEM_guardedalloc.h"
+#include "BLI_mempool.h"
 
 /********************* Layer type information **********************/
 typedef struct BME_LayerTypeInfo {
@@ -83,7 +84,7 @@ void BME_CD_Create(BME_CustomData *data, BME_CustomDataInit *init, int initalloc
        if(data->totlayer){
                /*alloc memory*/
                data->layers = MEM_callocN(sizeof(BME_CustomDataLayer)*data->totlayer, "BMesh Custom Data Layers");
-               data->pool = BME_mempool_create(data->totsize, initalloc, initalloc);
+               data->pool = BLI_mempool_create(data->totsize, initalloc, initalloc);
                /*initialize layer data*/
                for(i=0; i < BME_CD_NUMTYPES; i++){
                        if(init->layout[i]){
@@ -102,7 +103,7 @@ void BME_CD_Create(BME_CustomData *data, BME_CustomDataInit *init, int initalloc
 
 void BME_CD_Free(BME_CustomData *data)
 {
-       if(data->pool) BME_mempool_destroy(data->pool);
+       if(data->pool) BLI_mempool_destroy(data->pool);
 }
 
 /*Block level ops*/
@@ -119,7 +120,7 @@ void BME_CD_free_block(BME_CustomData *data, void **block)
                        typeInfo->free((char*)*block + offset, 1, typeInfo->size);
                }
        }
-       BME_mempool_free(data->pool, *block);
+       BLI_mempool_free(data->pool, *block);
        *block = NULL;
 }
 
@@ -130,7 +131,7 @@ static void BME_CD_alloc_block(BME_CustomData *data, void **block)
        if (*block) BME_CD_free_block(data, block); //if we copy layers that have their own free functions like deformverts
        
        if (data->totsize > 0)
-               *block = BME_mempool_alloc(data->pool); 
+               *block = BLI_mempool_alloc(data->pool); 
        else
                *block = NULL;
 }
index a85883f65728a2000f476db0153bc48978e7cd67..a97b9ca6672bace8f7887ff6d3bfb3a9950615a4 100644 (file)
@@ -523,6 +523,7 @@ static void bvh_div_nodes(BVHTree *tree, BVHNode *node, int start, int end, char
        return;
 }
 
+#if 0
 static void verify_tree(BVHTree *tree)
 {
        int i, j, check = 0;
@@ -569,6 +570,7 @@ static void verify_tree(BVHTree *tree)
        
        printf("branches: %d, leafs: %d, total: %d\n", tree->totbranch, tree->totleaf, tree->totbranch + tree->totleaf);
 }
+#endif
        
 void BLI_bvhtree_balance(BVHTree *tree)
 {
index 7c2edc3e23682f8bc5cb452249b649c0f74c63e4..69070d61bf0e6abab0de8eaab33656fabc65f5b1 100644 (file)
@@ -694,7 +694,7 @@ void mouse_select_sima(void)
        EditFace *efa;
        MTFace *tf, *nearesttf;
        EditFace *nearestefa=NULL;
-       int a, selectsticky, edgeloop, actface, nearestuv, nearestedge, i, shift, island;
+       int a, selectsticky, edgeloop, actface, nearestuv, nearestedge, i, shift, island=0;
        char sticky= 0;
        int flush = 0; /* 0 == dont flush, 1 == sel, -1 == desel;  only use when selection sync is enabled */
        unsigned int hitv[4], nearestv;
index f457f9203fffa17b6c02658b18c30427c9e732f2..12450bee9defebb9deb26afa9a6c4acfc1b1fc4c 100644 (file)
@@ -1154,7 +1154,7 @@ void viewmoveNDOF(int mode)
     float q1[4];
     float obofs[3];
     float reverse;
-    float diff[4];
+    //float diff[4];
     float d, curareaX, curareaY;
     float mat[3][3];
     float upvec[3];