remove redundant cases. no functional change.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 9 Dec 2011 01:27:59 +0000 (01:27 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 9 Dec 2011 01:27:59 +0000 (01:27 +0000)
source/blender/editors/animation/anim_ipo_utils.c
source/blender/editors/animation/keyframing.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/makesrna/intern/rna_access.c

index d18a3c320f77c19bac14b6b94b88423e4877e718..8e36e02bbb469ba4c15109d578a8e290051d3abf 100644 (file)
@@ -78,7 +78,8 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
                
                /* try to resolve the path */
                if (RNA_path_resolve(&id_ptr, fcu->rna_path, &ptr, &prop)) {
-                       char *structname=NULL, *propname=NULL, arrayindbuf[16];
+                       const char *structname=NULL, *propname=NULL;
+                       char arrayindbuf[16];
                        const char *arrayname=NULL;
                        short free_structname = 0;
                        
@@ -122,11 +123,11 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
                                        free_structname= 1;
                                }
                                else
-                                       structname= (char *)RNA_struct_ui_name(ptr.type);
+                                       structname= RNA_struct_ui_name(ptr.type);
                        }
                        
                        /* Property Name is straightforward */
-                       propname= (char *)RNA_property_ui_name(prop);
+                       propname= RNA_property_ui_name(prop);
                        
                        /* Array Index - only if applicable */
                        if (RNA_property_array_length(&ptr, prop)) {
@@ -153,7 +154,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
                        
                        /* free temp name if nameprop is set */
                        if (free_structname)
-                               MEM_freeN(structname);
+                               MEM_freeN((void *)structname);
                        
                        
                        /* Icon for this property's owner:
index 4595bf3f64fd0d0917e8462406eb7db769c9463f..54314980e03eefbdfaffdef93f0b46e43f616860 100644 (file)
@@ -524,7 +524,8 @@ static float setting_get_rna_value (PointerRNA *ptr, PropertyRNA *prop, int inde
 enum {
        VISUALKEY_NONE = 0,
        VISUALKEY_LOC,
-       VISUALKEY_ROT,
+       VISUALKEY_ROT
+       /* VISUALKEY_SCA */ /* TODO - looks like support can be added now */
 };
 
 /* This helper function determines if visual-keyframing should be used when  
@@ -655,7 +656,7 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop)
  */
 static float visualkey_get_value (PointerRNA *ptr, PropertyRNA *prop, int array_index)
 {
-       char *identifier= (char *)RNA_property_identifier(prop);
+       const char *identifier= RNA_property_identifier(prop);
        
        /* handle for Objects or PoseChannels only 
         *      - constraints can be on either Objects or PoseChannels, so we only check if the
index 794f898a1fcc754df251720d5ce4eed486c4ada8..084e48c0d6e9e13305158fce6ace9671ae813bcb 100644 (file)
@@ -977,7 +977,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
                        if(te->name)
                                te->flag |= TE_FREE_NAME;
                        else
-                               te->name= (char*)RNA_struct_ui_name(ptr->type);
+                               te->name= RNA_struct_ui_name(ptr->type);
 
                        /* If searching don't expand RNA entries */
                        if(SEARCHING_OUTLINER(soops) && BLI_strcasecmp("RNA",te->name)==0) tselem->flag &= ~TSE_CHILDSEARCH;
@@ -1007,7 +1007,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
                        prop= propptr.data;
                        proptype= RNA_property_type(prop);
 
-                       te->name= (char*)RNA_property_ui_name(prop);
+                       te->name= RNA_property_ui_name(prop);
                        te->directdata= prop;
                        te->rnaptr= *ptr;
 
index fa2fb061e3eabd70942dcb083271ef9d6e2737c8..a31984dfc29f0d1fcb9e5ac8d91ef8153e72ffd8 100644 (file)
@@ -3751,7 +3751,7 @@ char *RNA_path_append(const char *path, PointerRNA *UNUSED(ptr), PropertyRNA *pr
                        BLI_dynstr_append(dynstr, ".");
        }
 
-       BLI_dynstr_append(dynstr, (char*)RNA_property_identifier(prop));
+       BLI_dynstr_append(dynstr, RNA_property_identifier(prop));
 
        if(RNA_property_type(prop) == PROP_COLLECTION) {
                /* add ["strkey"] or [intkey] */