diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-11-25 23:39:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-11-25 23:39:14 +0400 |
commit | 63caaa2b12edf0e0a47764156416fac9d43d3664 (patch) | |
tree | 39d9455df141edc2f232240da34514b0468dcc28 /source/blender/blenkernel/intern/unit.c | |
parent | 5928af11ef97d6d9318d3a06fe32f0d77fc48e9c (diff) |
Code Cleanup: rename vars for detecting change to be more consistent
rename change/is_change/is_changed/modified -> changed
also use bools over int/short/char and once accidental float.
Diffstat (limited to 'source/blender/blenkernel/intern/unit.c')
-rw-r--r-- | source/blender/blenkernel/intern/unit.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index 64470542844..8e92f86502e 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -599,7 +599,7 @@ int bUnit_ReplaceString(char *str, int len_max, const char *str_prev, double sca bUnitDef *unit; char str_tmp[TEMP_STR_SIZE]; - int change = 0; + int changed = 0; if (usys == NULL || usys->units[0].name == NULL) { return 0; @@ -618,7 +618,7 @@ int bUnit_ReplaceString(char *str, int len_max, const char *str_prev, double sca for (unit = usys->units; unit->name; unit++) { /* in case there are multiple instances */ while (unit_replace(str, len_max, str_tmp, scale_pref, unit)) - change = 1; + changed = true; } unit = NULL; @@ -635,7 +635,7 @@ int bUnit_ReplaceString(char *str, int len_max, const char *str_prev, double sca int ofs = 0; /* in case there are multiple instances */ while ((ofs = unit_replace(str + ofs, len_max - ofs, str_tmp, scale_pref, unit))) - change = 1; + changed = true; } } } @@ -643,7 +643,7 @@ int bUnit_ReplaceString(char *str, int len_max, const char *str_prev, double sca } unit = NULL; - if (change == 0) { + if (changed == 0) { /* no units given so infer a unit from the previous string or default */ if (str_prev) { /* see which units the original value had */ @@ -701,7 +701,7 @@ int bUnit_ReplaceString(char *str, int len_max, const char *str_prev, double sca } } - return change; + return changed; } /* 45µm --> 45um */ |