diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-22 02:56:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-22 02:56:06 +0400 |
commit | 96bd647c4f9eff5fe21308228808ad8cd992ba68 (patch) | |
tree | 88eea953e1a63dc231b35261c61d393ba0d70d3c /source/blender/blenkernel | |
parent | d53034d9c9c35d957fc29ebfbbf0e6979cd16f52 (diff) |
split some >120 lines, no functional changes
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/unit.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index aa914998a72..81c526e45a6 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -299,7 +299,8 @@ static bUnitDef *unit_best_fit(double value, bUnitCollection *usys, bUnitDef *un if(suppress && (unit->flag & B_UNIT_DEF_SUPPRESS)) continue; - if (value_abs >= unit->scalar*(1.0-EPS)) /* scale down scalar so 1cm doesnt convert to 10mm because of float error */ + /* scale down scalar so 1cm doesnt convert to 10mm because of float error */ + if (value_abs >= unit->scalar*(1.0-EPS)) return unit; } @@ -481,11 +482,14 @@ static int ch_is_op(char op) } } -static int unit_scale_str(char *str, int len_max, char *str_tmp, double scale_pref, bUnitDef *unit, const char *replace_str) +static int unit_scale_str(char *str, int len_max, char *str_tmp, + double scale_pref, bUnitDef *unit, const char *replace_str) { char *str_found; - if((len_max>0) && (str_found= (char *)unit_find_str(str, replace_str))) { /* XXX - investigate, does not respect len_max properly */ + if((len_max>0) && (str_found= (char *)unit_find_str(str, replace_str))) { + /* XXX - investigate, does not respect len_max properly */ + int len, len_num, len_name, len_move, found_ofs; found_ofs = (int)(str_found-str); |