diff options
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/idprop.c | 9 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 10 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/unit.c | 3 |
4 files changed, 13 insertions, 17 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 47627d09b97..131b16b319e 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -514,11 +514,12 @@ static void buildchar(Curve *cu, unsigned long character, CharInfo *info, float float *fp, fsize, shear, x, si, co; VFontData *vfd = NULL; VChar *che = NULL; - int i, sel=0; + int i; vfd= vfont_get_data(which_vfont(cu, info)); if (!vfd) return; + /* if (cu->selend < cu->selstart) { if ((charidx >= (cu->selend)) && (charidx <= (cu->selstart-2))) sel= 1; @@ -527,6 +528,7 @@ static void buildchar(Curve *cu, unsigned long character, CharInfo *info, float if ((charidx >= (cu->selstart-1)) && (charidx <= (cu->selend-1))) sel= 1; } + */ /* make a copy at distance ofsx,ofsy with shear*/ fsize= cu->fsize; @@ -1148,14 +1150,12 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode) if(mode == FO_EDIT) { /* make nurbdata */ - unsigned long cha; - freeNurblist(&cu->nurb); ct= chartransdata; if (cu->sepchar==0) { for (i= 0; i<slen; i++) { - cha = (uintptr_t) mem[i]; + unsigned long cha = (uintptr_t) mem[i]; info = &(custrinfo[i]); if (info->mat_nr > (ob->totcol)) { /* printf("Error: Illegal material index (%d) in text object, setting to 0\n", info->mat_nr); */ diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c index a0df73d6c42..639e2062f83 100644 --- a/source/blender/blenkernel/intern/idprop.c +++ b/source/blender/blenkernel/intern/idprop.c @@ -421,9 +421,7 @@ void IDP_SyncGroupValues(IDProperty *dest, IDProperty *src) IDProperty *loop, *prop; for (prop=src->data.group.first; prop; prop=prop->next) { for (loop=dest->data.group.first; loop; loop=loop->next) { - if (BSTR_EQ(loop->name, prop->name)) { - int copy_done= 0; - + if (strcmp(loop->name, prop->name)==0) { if(prop->type==loop->type) { switch (prop->type) { @@ -431,11 +429,9 @@ void IDP_SyncGroupValues(IDProperty *dest, IDProperty *src) case IDP_FLOAT: case IDP_DOUBLE: loop->data= prop->data; - copy_done= 1; break; case IDP_GROUP: IDP_SyncGroupValues(loop, prop); - copy_done= 1; break; default: { @@ -702,7 +698,6 @@ IDProperty *IDP_New(int type, IDPropertyTemplate val, const char *name) case IDP_STRING: { char *st = val.str; - int stlen; prop = MEM_callocN(sizeof(IDProperty), "IDProperty string"); if (st == NULL) { @@ -710,7 +705,7 @@ IDProperty *IDP_New(int type, IDPropertyTemplate val, const char *name) prop->totallen = DEFAULT_ALLOC_FOR_NULL_STRINGS; prop->len = 1; /*NULL string, has len of 1 to account for null byte.*/ } else { - stlen = strlen(st) + 1; + int stlen = strlen(st) + 1; prop->data.pointer = MEM_callocN(stlen, "id property string 2"); prop->len = prop->totallen = stlen; strcpy(prop->data.pointer, st); diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index cb2261932ce..6dd1d4280ec 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -596,7 +596,7 @@ void BKE_image_free_all_textures(void) { Tex *tex; Image *ima; - unsigned int totsize= 0; + /* unsigned int totsize= 0; */ for(ima= G.main->image.first; ima; ima= ima->id.next) ima->id.flag &= ~LIB_DOIT; @@ -607,13 +607,14 @@ void BKE_image_free_all_textures(void) for(ima= G.main->image.first; ima; ima= ima->id.next) { if(ima->ibufs.first && (ima->id.flag & LIB_DOIT)) { + /* ImBuf *ibuf; for(ibuf= ima->ibufs.first; ibuf; ibuf= ibuf->next) { if(ibuf->mipmap[0]) totsize+= 1.33*ibuf->x*ibuf->y*4; else totsize+= ibuf->x*ibuf->y*4; - } + } */ image_free_buffers(ima); } } @@ -2183,7 +2184,7 @@ ImBuf *BKE_image_get_ibuf(Image *ima, ImageUser *iuser) void BKE_image_user_calc_frame(ImageUser *iuser, int cfra, int fieldnr) { - int imanr, len; + int len; /* here (+fie_ima/2-1) makes sure that division happens correctly */ len= (iuser->fie_ima*iuser->frames)/2; @@ -2192,8 +2193,9 @@ void BKE_image_user_calc_frame(ImageUser *iuser, int cfra, int fieldnr) iuser->framenr= 0; } else { + int imanr; cfra= cfra - iuser->sfra+1; - + /* cyclic */ if(iuser->cycl) { cfra= ( (cfra) % len ); diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index 3d984c7e877..25aab77ba9b 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -398,7 +398,6 @@ void bUnit_AsString(char *str, int len_max, double value, int prec, int system, /* split output makes sense only for length, mass and time */ if(split && (type==B_UNIT_LENGTH || type==B_UNIT_MASS || type==B_UNIT_TIME)) { - int i; bUnitDef *unit_a, *unit_b; double value_a, value_b; @@ -406,7 +405,7 @@ void bUnit_AsString(char *str, int len_max, double value, int prec, int system, /* check the 2 is a smaller unit */ if(unit_b > unit_a) { - i= unit_as_string(str, len_max, value_a, prec, usys, unit_a, '\0'); + int i= unit_as_string(str, len_max, value_a, prec, usys, unit_a, '\0'); /* is there enough space for at least 1 char of the next unit? */ if(i+2 < len_max) { |