- fix warnings for gcc
authorDaniel Dunbar <daniel@zuster.org>
Thu, 31 Mar 2005 16:08:29 +0000 (16:08 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 31 Mar 2005 16:08:29 +0000 (16:08 +0000)
 - some subsurf settings not correctly changed in editmode

source/blender/blenkernel/intern/CCGSubSurf.c
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/subsurf.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/src/buttons_editing.c

index ae4c802f901b182fbb9dfc6d36ffa9fd7636c89a..27882320d588898079fdf122eada860b20e3d038 100644 (file)
@@ -104,10 +104,10 @@ static void _ehash_insert(EHash *eh, EHEntry *entry) {
 
 static void *_ehash_lookupWithPrev(EHash *eh, void *key, void ***prevp_r) {
        int hash = EHASH_hash(eh, key);
-       void **prevp = &eh->buckets[hash];
+       void **prevp = (void**) &eh->buckets[hash];
        EHEntry *entry;
        
-       for (; (entry = *prevp); prevp = &entry->next) {
+       for (; (entry = *prevp); prevp = (void**) &entry->next) {
                if (entry->key==key) {
                        *prevp_r = (void**) prevp;
                        return entry;
@@ -720,7 +720,7 @@ CCGError ccgSubSurf_syncEdgeDel(CCGSubSurf *ss, CCGEdgeHDL eHDL) {
                return eCCGError_InvalidSyncState;
        } else {
                void **prevp;
-               CCGEdge *e = _ehash_lookupWithPrev(ss->eMap, eHDL, (EHEntry***) &prevp);
+               CCGEdge *e = _ehash_lookupWithPrev(ss->eMap, eHDL, &prevp);
 
                if (!e || e->numFaces) {
                        return eCCGError_InvalidValue;
index 09e038bab7e4d51e02929fc532b0c4ccfee80037..391abe64376b83852c651b8b244ab5ef6e7cf168 100644 (file)
@@ -399,7 +399,7 @@ static DerivedMesh *getMeshDerivedMesh(Object *ob, float *extverts, float *nors)
        mdm->dm.drawFacesTex = meshDM_drawFacesTex;
        mdm->dm.drawMappedFacesEM = NULL;
 
-       mdm->dm.release = MEM_freeN;
+       mdm->dm.release = (void(*)(DerivedMesh*)) MEM_freeN;
        
        mdm->ob = ob;
        mdm->extverts = extverts;
@@ -438,7 +438,6 @@ static void emDM_drawMappedVertsEM(DerivedMesh *dm, int (*setDrawOptions)(void *
 }
 static void emDM_drawMappedEdgeEM(DerivedMesh *dm, void *edge)
 {
-       EditMeshDerivedMesh *emdm= (EditMeshDerivedMesh*) dm;
        EditEdge *eed = edge;
 
        glBegin(GL_LINES);
@@ -556,7 +555,7 @@ static DerivedMesh *getEditMeshDerivedMesh(EditMesh *em)
        emdm->dm.drawFacesTex = NULL;
        emdm->dm.drawMappedFacesEM = emDM_drawMappedFacesEM;
 
-       emdm->dm.release = MEM_freeN;
+       emdm->dm.release = (void(*)(DerivedMesh*)) MEM_freeN;
        
        emdm->em = em;
 
index 44c9f3a13bb8c3a8a9e9add307e2dfd7446570cf..bad13a57adf06eacfd9e4a8fe6d9bf92a233f825 100644 (file)
@@ -592,13 +592,6 @@ static void hypermesh_calc_smooth_vert(HyperVert *v, float co[3])
        
 }
 
-static void hypermesh_calc_sharp_vert(HyperVert *v, float co[3])
-{
-       co[0] = v->co[0];
-       co[1] = v->co[1];
-       co[2] = v->co[2];
-}
-
 static void hypermesh_calc_creased_vert(HyperVert *v, float co[3], float w)
 {
        LinkNode *l;
index 79121022c599d061198566b536f57a2c0a2a4f7f..66062efcd704c223cde7ea7d081fd920fc296145 100644 (file)
@@ -675,11 +675,7 @@ static DispListMesh *ccgDM_convertToDispListMesh(DerivedMesh *dm) {
 }
 
 static void ccgDM_drawVerts(DerivedMesh *dm) {
-       CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
-
-       bglBegin(GL_POINTS);
-       // XXX
-       bglEnd();
+//     CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
 }
 static void ccgDM_drawEdges(DerivedMesh *dm) {
        CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
@@ -823,10 +819,10 @@ static void ccgDM_drawFacesSolid(DerivedMesh *dm, void (*setMaterial)(int)) {
        ccgFaceIterator_free(fi);
 }
 static void ccgDM_drawFacesColored(DerivedMesh *dm, int useTwoSided, unsigned char *col1, unsigned char *col2) {
-       CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
+//     CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
 }
 static void ccgDM_drawFacesTex(DerivedMesh *dm, int (*setDrawParams)(TFace *tf, int matnr)) {
-       CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
+//     CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
 }
 
 static void ccgDM_drawMappedVertsEM(DerivedMesh *dm, int (*setDrawOptions)(void *userData, EditVert *vert), void *userData) {
index 43de0786dc551e5d753f9bde8fc2cef7e73fcb3b..a98c4974973ae1af5d9f7f5d3cc40acca03dd7fe 100644 (file)
@@ -667,12 +667,12 @@ static void editing_panel_mesh_type(Object *ob, Mesh *me)
 
        uiBlockBeginAlign(block);
        uiBlockSetCol(block, TH_BUT_SETTING1);
-       uiDefButS(block, TOG|BIT|7, B_MAKEDISP, "SubSurf",      10,134,70,19, &me->flag, 0, 0, 0, 0, "Treats the active object as a Subdivision Surface");
+       uiDefButS(block, TOG|BIT|7, B_SUBSURFTYPE, "SubSurf",   10,134,70,19, &me->flag, 0, 0, 0, 0, "Treats the active object as a Subdivision Surface");
        uiDefButS(block, MENU, B_SUBSURFTYPE, subsurfmenu,              80,134,84,19, &(me->subsurftype), 0, 0, 0, 0, "Selects type of Subsurf algorithm.");
        uiBlockSetCol(block, TH_AUTO);
-       uiDefButS(block, NUM, B_MAKEDISP, "Subdiv:",            10, 114,110,19, &me->subdiv, 0, 6, 0, 0, "Defines the level of subdivision to display in real time interactively");
+       uiDefButS(block, NUM, B_SUBSURFTYPE, "Subdiv:",         10, 114,110,19, &me->subdiv, 0, 6, 0, 0, "Defines the level of subdivision to display in real time interactively");
        uiDefButS(block, NUM, B_DIFF, "",                               120,114, 44, 19, &me->subdivr, 0, 6, 0, 0, "Defines the level of subdivision to apply during rendering");
-       uiDefButS(block, TOG|BIT|8, B_MAKEDISP, "Optimal",      10, 94,154,19, &me->flag, 0, 0, 0, 0, "Only draws optimal wireframe");
+       uiDefButS(block, TOG|BIT|8, B_SUBSURFTYPE, "Optimal",   10, 94,154,19, &me->flag, 0, 0, 0, 0, "Only draws optimal wireframe");
 
        uiBlockBeginAlign(block);
 
@@ -1087,7 +1087,7 @@ void do_curvebuts(unsigned short event)
                break;
        case B_SUBSURFTYPE:
                        /* Icky, find better system */
-               if(ob->type==OB_MESH && ob->data==G.obedit->data) {
+               if(ob->type==OB_MESH && G.obedit && ob->data==G.obedit->data) {
                        if(G.editMesh->derived) {
                                G.editMesh->derived->release(G.editMesh->derived);
                                G.editMesh->derived= NULL;