diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-07-21 20:02:13 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-07-21 20:02:13 +0300 |
commit | b453e9e3a4b069cfb61b6806617fa452fe34b02d (patch) | |
tree | 87b30946fd240bdd0d4840711b63763fad52472e /source/blender | |
parent | f8cc01595d1181b9a8adcb6aa930d4cbfebdc8bf (diff) |
Cleanup: move 'int i' declaration
It is preferable that the value used for interators is defined
close to where it is used.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/transform/transform_mode_translate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_mode_translate.c b/source/blender/editors/transform/transform_mode_translate.c index cde06a9eaac..c083e1654dc 100644 --- a/source/blender/editors/transform/transform_mode_translate.c +++ b/source/blender/editors/transform/transform_mode_translate.c @@ -67,9 +67,9 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_ dist = len_v3(t->num.val); } else { - int i = 0; float dvec[3]; if (!(t->flag & T_2D_EDIT) && t->con.mode & CON_APPLY) { + int i = 0; zero_v3(dvec); if (t->con.mode & CON_AXIS0) { dvec[i++] = vec[0]; @@ -88,7 +88,7 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_ dist = len_v3(vec); if (!(t->flag & T_2D_EDIT) && t->scene->unit.system) { - for (i = 0; i < 3; i++) { + for (int i = 0; i < 3; i++) { bUnit_AsString2(&tvec[NUM_STR_REP_LEN * i], NUM_STR_REP_LEN, dvec[i] * t->scene->unit.scale_length, |