diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-08-14 16:29:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-08-14 16:32:24 +0300 |
commit | 03b2371387dcae9f801cabbc1819b1d7e3350829 (patch) | |
tree | 0300655f20a06a8e5c807b5fe6263b47c686dedb /source/blender/blenkernel/intern/unit.c | |
parent | bc4fe45aef7e52f9e7a2bd5e370c6791c58af832 (diff) |
Cleanup: move trailing comments to avoid wrapping code
Some statements were split across multiple lines because of their
trailing comments.
In most cases it's clearer to put the comments above.
Diffstat (limited to 'source/blender/blenkernel/intern/unit.c')
-rw-r--r-- | source/blender/blenkernel/intern/unit.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index 375721057c3..e30ea687b13 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -734,8 +734,9 @@ static int unit_scale_str(char *str, len_name = strlen(replace_str); len_move = (len - (found_ofs + len_name)) + 1; /* 1+ to copy the string terminator */ - len_num = BLI_snprintf( - str_tmp, TEMP_STR_SIZE, "*%.9g" SEP_STR, unit->scalar / scale_pref); /* # removed later */ + + /* # removed later */ + len_num = BLI_snprintf(str_tmp, TEMP_STR_SIZE, "*%.9g" SEP_STR, unit->scalar / scale_pref); if (len_num > len_max) { len_num = len_max; @@ -748,8 +749,9 @@ static int unit_scale_str(char *str, if (len_move > 0) { /* resize the last part of the string */ - memmove( - str_found + len_num, str_found + len_name, len_move); /* may grow or shrink the string */ + + /* May grow or shrink the string. */ + memmove(str_found + len_num, str_found + len_name, len_move); } if (found_ofs + len_num > len_max) { |