Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-10-06 01:22:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-06 01:22:33 +0400
commit8408997c84d6c4a8b47808422ed73d7d754ff509 (patch)
tree883873cb6892476a6c8b4d1e648f46f4752448df /source
parentde1c5de70814c2eba5d273ac4ce4c73e38d3f309 (diff)
remove some unused code and reduced the scope if some vars (no functional change).
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/font.c8
-rw-r--r--source/blender/blenkernel/intern/idprop.c9
-rw-r--r--source/blender/blenkernel/intern/image.c10
-rw-r--r--source/blender/blenkernel/intern/unit.c3
-rw-r--r--source/blender/python/intern/bpy_rna.c3
5 files changed, 14 insertions, 19 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) {
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 93106d5400f..166213fa07c 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -3459,10 +3459,9 @@ PyObject *pyrna_param_to_py(PointerRNA *ptr, ParameterList *parms, PropertyRNA *
PyObject *ret;
int type = RNA_property_type(prop);
int flag = RNA_property_flag(prop);
- int a;
if(RNA_property_array_check(ptr, prop)) {
- int len;
+ int a, len;
if (flag & PROP_DYNAMIC) {
ParameterDynAlloc *data_alloc= data;