[Bf-blender-cvs] [29fa0ea] compositor-2016: Cleanup: avoid temp string edit
Campbell Barton
noreply at git.blender.org
Wed Jun 8 21:52:53 CEST 2016
Commit: 29fa0ea1d34d009e83cd81397c82704a16f77ca7
Author: Campbell Barton
Date: Sat Jun 4 10:51:34 2016 +1000
Branches: compositor-2016
https://developer.blender.org/rB29fa0ea1d34d009e83cd81397c82704a16f77ca7
Cleanup: avoid temp string edit
===================================================================
M source/blender/blenkernel/intern/anim_sys.c
===================================================================
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index c85a288..99aae62 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -730,14 +730,10 @@ static char *rna_path_rename_fix(ID *owner_id, const char *prefix, const char *o
DynStr *ds = BLI_dynstr_new();
const char *postfixPtr = oldNamePtr + oldNameLen;
char *newPath = NULL;
- char oldChar;
-
+
/* add the part of the string that goes up to the start of the prefix */
if (prefixPtr > oldpath) {
- oldChar = prefixPtr[0];
- prefixPtr[0] = 0;
- BLI_dynstr_append(ds, oldpath);
- prefixPtr[0] = oldChar;
+ BLI_dynstr_nappend(ds, oldpath, prefixPtr - oldpath);
}
/* add the prefix */
More information about the Bf-blender-cvs
mailing list