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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-11-23 07:45:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-11-23 09:40:49 +0300
commit6e4cb463c44ab57331cda7ded645b4faa573bbb3 (patch)
tree8da615bcb135c1f52872a9a9b34a888a0ccf064f /source/blender/makesrna/intern/rna_access.c
parentdaa90de3fdb5b9971b713c13a67b9c0a0990b3d7 (diff)
Cleanup: shadowing (rna, modifiers, *misc*)
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 3ec649afcc9..5e4ea749b22 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -3396,7 +3396,7 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
void *inarray, RawPropertyType intype, int inlen, int set)
{
StructRNA *ptype;
- PointerRNA itemptr;
+ PointerRNA itemptr_base;
PropertyRNA *itemprop, *iprop;
PropertyType itemtype = 0;
RawArray in;
@@ -3411,8 +3411,8 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
ptype = RNA_property_pointer_type(ptr, prop);
/* try to get item property pointer */
- RNA_pointer_create(NULL, ptype, NULL, &itemptr);
- itemprop = RNA_struct_find_property(&itemptr, propname);
+ RNA_pointer_create(NULL, ptype, NULL, &itemptr_base);
+ itemprop = RNA_struct_find_property(&itemptr_base, propname);
if (itemprop) {
/* we have item property pointer */
@@ -3427,7 +3427,7 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
}
/* check item array */
- itemlen = RNA_property_array_length(&itemptr, itemprop);
+ itemlen = RNA_property_array_length(&itemptr_base, itemprop);
/* dynamic array? need to get length per item */
if (itemprop->getlength) {
@@ -4222,7 +4222,7 @@ static bool rna_path_parse(PointerRNA *ptr, const char *path,
*r_index = index;
if (prop_elem && (prop_elem->ptr.data != curptr.data || prop_elem->prop != prop || prop_elem->index != index)) {
- PropertyElemRNA *prop_elem = MEM_mallocN(sizeof(PropertyElemRNA), __func__);
+ prop_elem = MEM_mallocN(sizeof(PropertyElemRNA), __func__);
prop_elem->ptr = curptr;
prop_elem->prop = prop;
prop_elem->index = index;
@@ -4505,12 +4505,12 @@ static char *rna_idp_path(PointerRNA *ptr, IDProperty *haystack, IDProperty *nee
break;
}
else {
- int i;
+ int j;
link.name = iter->name;
- for (i = 0; i < iter->len; i++, array++) {
+ for (j = 0; j < iter->len; j++, array++) {
PointerRNA child_ptr;
- if (RNA_property_collection_lookup_int(ptr, prop, i, &child_ptr)) {
- link.index = i;
+ if (RNA_property_collection_lookup_int(ptr, prop, j, &child_ptr)) {
+ link.index = j;
if ((path = rna_idp_path(&child_ptr, array, needle, &link))) {
break;
}
@@ -5459,7 +5459,6 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop, in
{
int type = RNA_property_type(prop);
int len = RNA_property_array_length(ptr, prop);
- int i;
DynStr *dynstr = BLI_dynstr_new();
char *cstring;
@@ -5481,7 +5480,7 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop, in
RNA_property_boolean_get_array(ptr, prop, buf);
BLI_dynstr_append(dynstr, "(");
- for (i = 0; i < len; i++) {
+ for (int i = 0; i < len; i++) {
BLI_dynstr_appendf(dynstr, i ? ", %s" : "%s", bool_as_py_string(buf[i]));
}
if (len == 1)
@@ -5507,7 +5506,7 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop, in
RNA_property_int_get_array(ptr, prop, buf);
BLI_dynstr_append(dynstr, "(");
- for (i = 0; i < len; i++) {
+ for (int i = 0; i < len; i++) {
BLI_dynstr_appendf(dynstr, i ? ", %d" : "%d", buf[i]);
}
if (len == 1)
@@ -5533,7 +5532,7 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop, in
RNA_property_float_get_array(ptr, prop, buf);
BLI_dynstr_append(dynstr, "(");
- for (i = 0; i < len; i++) {
+ for (int i = 0; i < len; i++) {
BLI_dynstr_appendf(dynstr, i ? ", %g" : "%g", buf[i]);
}
if (len == 1)