diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-13 07:53:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-13 07:53:55 +0300 |
commit | 8227b3d463955d887a987fe546d8eefa2757a982 (patch) | |
tree | 47be10b02d3418b579dc95ca796f2d7c596571e9 /source/blender/editors/interface | |
parent | 57ce3072d191480ab8bdfcb1f4b841452819467a (diff) |
remove/comment unused vars
also removed unnecessary NULL checks (where the pointer was used later without checking).
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface.c | 10 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 5 |
2 files changed, 6 insertions, 9 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index d74a907d785..2620db30b39 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1801,7 +1801,7 @@ static double soft_range_round_down(double value, double max) void ui_set_but_soft_range(uiBut *but, double value) { PropertyType type; - double softmin, softmax, step, precision; + double softmin, softmax /*, step, precision*/; if(but->rnaprop) { type= RNA_property_type(but->rnaprop); @@ -1814,8 +1814,8 @@ void ui_set_but_soft_range(uiBut *but, double value) RNA_property_int_ui_range(&but->rnapoin, but->rnaprop, &imin, &imax, &istep); softmin= (imin == INT_MIN)? -1e4: imin; softmax= (imin == INT_MAX)? 1e4: imax; - step= istep; - precision= 1; + /*step= istep;*/ /*UNUSED*/ + /*precision= 1;*/ /*UNUSED*/ } else if(type == PROP_FLOAT) { float fmin, fmax, fstep, fprecision; @@ -1823,8 +1823,8 @@ void ui_set_but_soft_range(uiBut *but, double value) RNA_property_float_ui_range(&but->rnapoin, but->rnaprop, &fmin, &fmax, &fstep, &fprecision); softmin= (fmin == -FLT_MAX)? -1e4: fmin; softmax= (fmax == FLT_MAX)? 1e4: fmax; - step= fstep; - precision= fprecision; + /*step= fstep;*/ /*UNUSED*/ + /*precision= fprecision;*/ /*UNUSED*/ } else return; diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 1f25f968213..e96740d6353 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -1893,15 +1893,12 @@ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, const char *propname, int groups, cols, layers; int group, col, layer, row; int cols_per_group = 5; - const char *desc; - + prop= RNA_struct_find_property(ptr, propname); if (!prop) { printf("uiTemplateLayer: layers property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname); return; } - - desc= RNA_property_description(prop); /* the number of layers determines the way we group them * - we want 2 rows only (for now) |