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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-05-10 18:15:16 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-05-10 18:15:16 +0300
commite343e4a5baf0d608b81093debbdb9f8ca835bb18 (patch)
tree0fd322c228d7e2f8ae1296471d92f656729b6ebc /source/blender/blenkernel/intern/constraint.c
parent2786b0bc9d64416817a25ab7e86f5b6cf5ef25b2 (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/intern/constraint.c')
-rw-r--r--source/blender/blenkernel/intern/constraint.c2
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);
}