diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-04-05 06:53:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-04-05 06:53:32 +0300 |
commit | 9fe0505db00f450333518238db6813ede046f45e (patch) | |
tree | f8d3feec11659a545aac2b419a223120dfafea1d /source/blender/editors/space_text | |
parent | 93806ba82b30683f3e459f0c77ea9b162e1287ec (diff) |
Cleanup: macro hygiene, parenthesize arguments
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r-- | source/blender/editors/space_text/text_intern.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h index d5114d8f6b5..d6588dda797 100644 --- a/source/blender/editors/space_text/text_intern.h +++ b/source/blender/editors/space_text/text_intern.h @@ -48,13 +48,13 @@ void text_update_cursor_moved(struct bContext *C); #define TXT_NUMCOL_PAD 1.0f /* Total width of the optional line numbers column. */ #define TXT_NUMCOL_WIDTH(st) \ - (st->runtime.cwidth_px * (st->runtime.line_number_display_digits + (2 * TXT_NUMCOL_PAD))) + ((st)->runtime.cwidth_px * ((st)->runtime.line_number_display_digits + (2 * TXT_NUMCOL_PAD))) /* Padding on left of body text in character units. */ #define TXT_BODY_LPAD 1.0f /* Left position of body text. */ #define TXT_BODY_LEFT(st) \ - (st->showlinenrs ? TXT_NUMCOL_WIDTH(st) : 0) + (TXT_BODY_LPAD * st->runtime.cwidth_px) + ((st)->showlinenrs ? TXT_NUMCOL_WIDTH(st) : 0) + (TXT_BODY_LPAD * (st)->runtime.cwidth_px) #define TXT_SCROLL_WIDTH U.widget_unit #define TXT_SCROLL_SPACE ((int)(0.1f * U.widget_unit)) |