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>2011-10-21 12:16:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-21 12:16:15 +0400
commit04db8ad282ec305ab61245b7556e15121d9cdcc5 (patch)
tree49bb50c8598051771b572b3ebfbfdc76ccff26a1 /source/blender/makesrna
parentf9f5daed9bb0b1f239b3b3d3de7e6ff95b56e3d2 (diff)
misc cleanup
- remove redundant casts - replace strcmp's with "" to just check first char. - added WM_event_print(), debug mode only to print events since the structs values are not that meaningful. - added warnings if locale/font dirs cant be found.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/makesrna.c96
-rw-r--r--source/blender/makesrna/intern/rna_access.c20
-rw-r--r--source/blender/makesrna/intern/rna_particle.c2
3 files changed, 59 insertions, 59 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index bb4d6d3a330..871cbad6152 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -544,9 +544,9 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
rna_print_data_get(f, dp);
if(dp->dnapointerlevel == 0)
- fprintf(f, " return rna_pointer_inherit_refine(ptr, &RNA_%s, &data->%s);\n", (char*)pprop->type, dp->dnaname);
+ fprintf(f, " return rna_pointer_inherit_refine(ptr, &RNA_%s, &data->%s);\n", (const char*)pprop->type, dp->dnaname);
else
- fprintf(f, " return rna_pointer_inherit_refine(ptr, &RNA_%s, data->%s);\n", (char*)pprop->type, dp->dnaname);
+ fprintf(f, " return rna_pointer_inherit_refine(ptr, &RNA_%s, data->%s);\n", (const char*)pprop->type, dp->dnaname);
}
fprintf(f, "}\n\n");
break;
@@ -560,7 +560,7 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
if(strcmp(manualfunc, "rna_iterator_listbase_get") == 0 ||
strcmp(manualfunc, "rna_iterator_array_get") == 0 ||
strcmp(manualfunc, "rna_iterator_array_dereference_get") == 0)
- fprintf(f, " return rna_pointer_inherit_refine(&iter->parent, &RNA_%s, %s(iter));\n", (cprop->item_type)? (char*)cprop->item_type: "UnknownType", manualfunc);
+ fprintf(f, " return rna_pointer_inherit_refine(&iter->parent, &RNA_%s, %s(iter));\n", (cprop->item_type)? (const char*)cprop->item_type: "UnknownType", manualfunc);
else
fprintf(f, " return %s(iter);\n", manualfunc);
}
@@ -707,7 +707,7 @@ static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
fprintf(f, "value;\n");
}
-static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, char *manualfunc)
+static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc)
{
char *func;
@@ -771,7 +771,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
}
else {
PointerPropertyRNA *pprop= (PointerPropertyRNA*)dp->prop;
- StructRNA *type= rna_find_struct((char*)pprop->type);
+ StructRNA *type= rna_find_struct((const char*)pprop->type);
if(type && (type->flag & STRUCT_ID)) {
fprintf(f, " if(value.data)\n");
fprintf(f, " id_lib_extern((ID*)value.data);\n\n");
@@ -883,7 +883,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
return func;
}
-static char *rna_def_property_length_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, char *manualfunc)
+static char *rna_def_property_length_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc)
{
char *func= NULL;
@@ -941,7 +941,7 @@ static char *rna_def_property_length_func(FILE *f, StructRNA *srna, PropertyRNA
return func;
}
-static char *rna_def_property_begin_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, char *manualfunc)
+static char *rna_def_property_begin_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc)
{
char *func, *getfunc;
@@ -999,7 +999,7 @@ static char *rna_def_property_begin_func(FILE *f, StructRNA *srna, PropertyRNA *
return func;
}
-static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, char *manualfunc, char *nextfunc)
+static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc, const char *nextfunc)
{
/* note on indices, this is for external functions and ignores skipped values.
* so the the index can only be checked against the length when there is no 'skip' funcion. */
@@ -1078,7 +1078,7 @@ static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, Property
#if 0
rna_print_data_get(f, dp);
- item_type= (cprop->item_type)? (char*)cprop->item_type: "UnknownType";
+ item_type= (cprop->item_type)? (const char*)cprop->item_type: "UnknownType";
if(dp->dnalengthname || dp->dnalengthfixed) {
if(dp->dnalengthname)
@@ -1099,7 +1099,7 @@ static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, Property
return func;
}
-static char *rna_def_property_next_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, char *manualfunc)
+static char *rna_def_property_next_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc)
{
char *func, *getfunc;
@@ -1125,7 +1125,7 @@ static char *rna_def_property_next_func(FILE *f, StructRNA *srna, PropertyRNA *p
return func;
}
-static char *rna_def_property_end_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, char *manualfunc)
+static char *rna_def_property_end_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc)
{
char *func;
@@ -1193,12 +1193,12 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
if(!bprop->get && !bprop->set && !dp->booleanbit)
rna_set_raw_property(dp, prop);
- bprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)bprop->get);
- bprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)bprop->set);
+ bprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)bprop->get);
+ bprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)bprop->set);
}
else {
- bprop->getarray= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)bprop->getarray);
- bprop->setarray= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)bprop->setarray);
+ bprop->getarray= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)bprop->getarray);
+ bprop->setarray= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)bprop->setarray);
}
break;
}
@@ -1209,15 +1209,15 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
if(!iprop->get && !iprop->set)
rna_set_raw_property(dp, prop);
- iprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)iprop->get);
- iprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)iprop->set);
+ iprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)iprop->get);
+ iprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)iprop->set);
}
else {
if(!iprop->getarray && !iprop->setarray)
rna_set_raw_property(dp, prop);
- iprop->getarray= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)iprop->getarray);
- iprop->setarray= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)iprop->setarray);
+ iprop->getarray= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)iprop->getarray);
+ iprop->setarray= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)iprop->setarray);
}
break;
}
@@ -1228,38 +1228,38 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
if(!fprop->get && !fprop->set)
rna_set_raw_property(dp, prop);
- fprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)fprop->get);
- fprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)fprop->set);
+ fprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)fprop->get);
+ fprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)fprop->set);
}
else {
if(!fprop->getarray && !fprop->setarray)
rna_set_raw_property(dp, prop);
- fprop->getarray= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)fprop->getarray);
- fprop->setarray= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)fprop->setarray);
+ fprop->getarray= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)fprop->getarray);
+ fprop->setarray= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)fprop->setarray);
}
break;
}
case PROP_ENUM: {
EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
- eprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)eprop->get);
- eprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)eprop->set);
+ eprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)eprop->get);
+ eprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)eprop->set);
break;
}
case PROP_STRING: {
StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
- sprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)sprop->get);
- sprop->length= (void*)rna_def_property_length_func(f, srna, prop, dp, (char*)sprop->length);
- sprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)sprop->set);
+ sprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)sprop->get);
+ sprop->length= (void*)rna_def_property_length_func(f, srna, prop, dp, (const char*)sprop->length);
+ sprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)sprop->set);
break;
}
case PROP_POINTER: {
PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
- pprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)pprop->get);
- pprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)pprop->set);
+ pprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)pprop->get);
+ pprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)pprop->set);
if(!pprop->type) {
fprintf(stderr, "rna_def_property_funcs: %s.%s, pointer must have a struct type.\n", srna->identifier, prop->identifier);
DefRNA.error= 1;
@@ -1268,24 +1268,24 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
}
case PROP_COLLECTION: {
CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
- char *nextfunc= (char*)cprop->next;
+ const char *nextfunc= (const char*)cprop->next;
if(dp->dnatype && strcmp(dp->dnatype, "ListBase")==0);
else if(dp->dnalengthname || dp->dnalengthfixed)
- cprop->length= (void*)rna_def_property_length_func(f, srna, prop, dp, (char*)cprop->length);
+ cprop->length= (void*)rna_def_property_length_func(f, srna, prop, dp, (const char*)cprop->length);
/* test if we can allow raw array access, if it is using our standard
* array get/next function, we can be sure it is an actual array */
if(cprop->next && cprop->get)
- if(strcmp((char*)cprop->next, "rna_iterator_array_next") == 0 &&
- strcmp((char*)cprop->get, "rna_iterator_array_get") == 0)
+ if(strcmp((const char*)cprop->next, "rna_iterator_array_next") == 0 &&
+ strcmp((const char*)cprop->get, "rna_iterator_array_get") == 0)
prop->flag |= PROP_RAW_ARRAY;
- cprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)cprop->get);
- cprop->begin= (void*)rna_def_property_begin_func(f, srna, prop, dp, (char*)cprop->begin);
- cprop->next= (void*)rna_def_property_next_func(f, srna, prop, dp, (char*)cprop->next);
- cprop->end= (void*)rna_def_property_end_func(f, srna, prop, dp, (char*)cprop->end);
- cprop->lookupint= (void*)rna_def_property_lookup_int_func(f, srna, prop, dp, (char*)cprop->lookupint, nextfunc);
+ cprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)cprop->get);
+ cprop->begin= (void*)rna_def_property_begin_func(f, srna, prop, dp, (const char*)cprop->begin);
+ cprop->next= (void*)rna_def_property_next_func(f, srna, prop, dp, (const char*)cprop->next);
+ cprop->end= (void*)rna_def_property_end_func(f, srna, prop, dp, (const char*)cprop->end);
+ cprop->lookupint= (void*)rna_def_property_lookup_int_func(f, srna, prop, dp, (const char*)cprop->lookupint, nextfunc);
if(!(prop->flag & PROP_IDPROPERTY)) {
if(!cprop->begin) {
@@ -1414,7 +1414,7 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
if(prop->flag & (PROP_IDPROPERTY|PROP_BUILTIN))
return;
- if(prop->name && prop->description && strcmp(prop->description, "") != 0)
+ if(prop->name && prop->description && prop->description[0] != '\0')
fprintf(f, "\t/* %s: %s */\n", prop->name, prop->description);
else if(prop->name)
fprintf(f, "\t/* %s */\n", prop->name);
@@ -1468,7 +1468,7 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
PointerPropertyRNA *pprop= (PointerPropertyRNA*)dp->prop;
if(pprop->type)
- fprintf(f, "\tinline %s %s(void);", (char*)pprop->type, rna_safe_id(prop->identifier));
+ fprintf(f, "\tinline %s %s(void);", (const char*)pprop->type, rna_safe_id(prop->identifier));
else
fprintf(f, "\tinline %s %s(void);", "UnknownType", rna_safe_id(prop->identifier));
break;
@@ -1477,7 +1477,7 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)dp->prop;
if(cprop->item_type)
- fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (char*)cprop->item_type, srna->identifier, rna_safe_id(prop->identifier));
+ fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (const char*)cprop->item_type, srna->identifier, rna_safe_id(prop->identifier));
else
fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier, rna_safe_id(prop->identifier));
break;
@@ -1531,7 +1531,7 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
PointerPropertyRNA *pprop= (PointerPropertyRNA*)dp->prop;
if(pprop->type)
- fprintf(f, "\tPOINTER_PROPERTY(%s, %s, %s)", (char*)pprop->type, srna->identifier, rna_safe_id(prop->identifier));
+ fprintf(f, "\tPOINTER_PROPERTY(%s, %s, %s)", (const char*)pprop->type, srna->identifier, rna_safe_id(prop->identifier));
else
fprintf(f, "\tPOINTER_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier, rna_safe_id(prop->identifier));
break;
@@ -1540,7 +1540,7 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
/*CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)dp->prop;
if(cprop->type)
- fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (char*)cprop->type, srna->identifier, prop->identifier);
+ fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (const char*)cprop->type, srna->identifier, prop->identifier);
else
fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier, prop->identifier);*/
break;
@@ -1763,7 +1763,7 @@ static void rna_auto_types(void)
pprop->type= (StructRNA*)rna_find_type(dp->dnatype);
if(pprop->type) {
- type= rna_find_struct((char*)pprop->type);
+ type= rna_find_struct((const char*)pprop->type);
if(type && (type->flag & STRUCT_ID_REFCOUNT))
pprop->property.flag |= PROP_ID_REFCOUNT;
}
@@ -2214,7 +2214,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
else fprintf(f, "\t0, -1");
/* our own type - collections/arrays only */
- if(prop->srna) fprintf(f, ", &RNA_%s", (char*)prop->srna);
+ if(prop->srna) fprintf(f, ", &RNA_%s", (const char*)prop->srna);
else fprintf(f, ", NULL");
fprintf(f, "},\n");
@@ -2273,14 +2273,14 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
case PROP_POINTER: {
PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, %s,", rna_function_string(pprop->get), rna_function_string(pprop->set), rna_function_string(pprop->typef), rna_function_string(pprop->poll));
- if(pprop->type) fprintf(f, "&RNA_%s\n", (char*)pprop->type);
+ if(pprop->type) fprintf(f, "&RNA_%s\n", (const char*)pprop->type);
else fprintf(f, "NULL\n");
break;
}
case PROP_COLLECTION: {
CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, %s, %s, %s, %s, %s, ", rna_function_string(cprop->begin), rna_function_string(cprop->next), rna_function_string(cprop->end), rna_function_string(cprop->get), rna_function_string(cprop->length), rna_function_string(cprop->lookupint), rna_function_string(cprop->lookupstring), rna_function_string(cprop->assignint));
- if(cprop->item_type) fprintf(f, "&RNA_%s\n", (char*)cprop->item_type);
+ if(cprop->item_type) fprintf(f, "&RNA_%s\n", (const char*)cprop->item_type);
else fprintf(f, "NULL\n");
break;
}
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 8047b2df226..422ee6f31dc 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -1614,7 +1614,7 @@ void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, int value)
group= RNA_struct_idprops(ptr, 1);
if(group)
- IDP_AddToGroup(group, IDP_New(IDP_INT, val, (char*)prop->identifier));
+ IDP_AddToGroup(group, IDP_New(IDP_INT, val, prop->identifier));
}
}
@@ -1693,7 +1693,7 @@ void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const in
group= RNA_struct_idprops(ptr, 1);
if(group) {
- idprop= IDP_New(IDP_ARRAY, val, (char*)prop->identifier);
+ idprop= IDP_New(IDP_ARRAY, val, prop->identifier);
IDP_AddToGroup(group, idprop);
memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
}
@@ -1811,7 +1811,7 @@ void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
group= RNA_struct_idprops(ptr, 1);
if(group)
- IDP_AddToGroup(group, IDP_New(IDP_INT, val, (char*)prop->identifier));
+ IDP_AddToGroup(group, IDP_New(IDP_INT, val, prop->identifier));
}
}
@@ -1927,7 +1927,7 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v
group= RNA_struct_idprops(ptr, 1);
if(group) {
- idprop= IDP_New(IDP_ARRAY, val, (char*)prop->identifier);
+ idprop= IDP_New(IDP_ARRAY, val, prop->identifier);
IDP_AddToGroup(group, idprop);
memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
}
@@ -2047,7 +2047,7 @@ void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
group= RNA_struct_idprops(ptr, 1);
if(group)
- IDP_AddToGroup(group, IDP_New(IDP_FLOAT, val, (char*)prop->identifier));
+ IDP_AddToGroup(group, IDP_New(IDP_FLOAT, val, prop->identifier));
}
}
@@ -2181,7 +2181,7 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
group= RNA_struct_idprops(ptr, 1);
if(group) {
- idprop= IDP_New(IDP_ARRAY, val, (char*)prop->identifier);
+ idprop= IDP_New(IDP_ARRAY, val, prop->identifier);
IDP_AddToGroup(group, idprop);
memcpy(IDP_Array(idprop), values, sizeof(float)*idprop->len);
}
@@ -2328,7 +2328,7 @@ void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *val
BLI_assert(RNA_property_type(prop) == PROP_STRING);
if((idprop=rna_idproperty_check(&prop, ptr)))
- IDP_AssignString(idprop, (char*)value, RNA_property_string_maxlength(prop) - 1);
+ IDP_AssignString(idprop, value, RNA_property_string_maxlength(prop) - 1);
else if(sprop->set)
sprop->set(ptr, value); /* set function needs to clamp its self */
else if(prop->flag & PROP_EDITABLE) {
@@ -2336,7 +2336,7 @@ void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *val
group= RNA_struct_idprops(ptr, 1);
if(group)
- IDP_AddToGroup(group, IDP_NewString((char*)value, (char*)prop->identifier, RNA_property_string_maxlength(prop) - 1));
+ IDP_AddToGroup(group, IDP_NewString(value, prop->identifier, RNA_property_string_maxlength(prop) - 1));
}
}
@@ -2413,7 +2413,7 @@ void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
group= RNA_struct_idprops(ptr, 1);
if(group)
- IDP_AddToGroup(group, IDP_New(IDP_INT, val, (char*)prop->identifier));
+ IDP_AddToGroup(group, IDP_New(IDP_INT, val, prop->identifier));
}
}
@@ -2509,7 +2509,7 @@ void RNA_property_pointer_add(PointerRNA *ptr, PropertyRNA *prop)
group= RNA_struct_idprops(ptr, 1);
if(group)
- IDP_AddToGroup(group, IDP_New(IDP_GROUP, val, (char*)prop->identifier));
+ IDP_AddToGroup(group, IDP_New(IDP_GROUP, val, prop->identifier));
}
else
printf("%s %s.%s: only supported for id properties.\n", __func__, ptr->type->identifier, prop->identifier);
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 43d5f87f0d5..a1d156a2b2a 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -820,7 +820,7 @@ static void psys_vg_name_set__internal(PointerRNA *ptr, const char *value, int i
psys->vgroup[index]= 0;
}
else {
- int vgroup_num = defgroup_name_index(ob, (char*)value);
+ int vgroup_num = defgroup_name_index(ob, value);
if(vgroup_num == -1)
return;