diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-05-10 18:15:16 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-05-10 18:15:16 +0300 |
commit | e343e4a5baf0d608b81093debbdb9f8ca835bb18 (patch) | |
tree | 0fd322c228d7e2f8ae1296471d92f656729b6ebc /source/blender/blenkernel | |
parent | 2786b0bc9d64416817a25ab7e86f5b6cf5ef25b2 (diff) |
Avoid per-constraint-target call of strlen
It's enough to do one single comparison to see if the string is empty or not.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 569efd73fe0..7144e25ba7f 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -538,7 +538,7 @@ static void contarget_get_lattice_mat(Object *ob, const char *substring, float m static void constraint_target_to_mat4(Object *ob, const char *substring, float mat[4][4], short from, short to, float headtail) { /* Case OBJECT */ - if (!strlen(substring)) { + if (substring[0] == '\0') { copy_m4_m4(mat, ob->obmat); BKE_constraint_mat_convertspace(ob, NULL, mat, from, to, false); } |