diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-01-01 15:26:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-01-01 15:42:28 +0300 |
commit | aab4f2b76253936d1ba09562f1b1a21661860bf7 (patch) | |
tree | e558b355cd2fc153c8e5d1ef94963eb1f18454f7 /source/blender/editors/space_node | |
parent | 4bdd4aa63371bdd73f3a9484f92348f1bf13b4e5 (diff) |
cleanup: redundant casts & const cast correctness
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/node_add.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c index 83015228b78..f046670f387 100644 --- a/source/blender/editors/space_node/node_add.c +++ b/source/blender/editors/space_node/node_add.c @@ -453,8 +453,8 @@ static int new_node_tree_exec(bContext *C, wmOperator *op) PointerRNA ptr, idptr; PropertyRNA *prop; const char *idname; - char _treename[MAX_ID_NAME - 2]; - char *treename = _treename; + char treename_buf[MAX_ID_NAME - 2]; + const char *treename; if (RNA_struct_property_is_set(op->ptr, "type")) { prop = RNA_struct_find_property(op->ptr, "type"); @@ -466,10 +466,11 @@ static int new_node_tree_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; if (RNA_struct_property_is_set(op->ptr, "name")) { - RNA_string_get(op->ptr, "name", treename); + RNA_string_get(op->ptr, "name", treename_buf); + treename = treename_buf; } else { - treename = (char *)DATA_("NodeTree"); + treename = DATA_("NodeTree"); } if (!ntreeTypeFind(idname)) { |