summaryrefslogtreecommitdiff
path: root/themes/newsboat.h
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2022-06-06 11:00:26 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2022-06-06 11:03:29 +0200
commit8737035999474283a28faa5780f43138f96ab82c (patch)
tree1cda39629165027d8f2fc7f6c1f0b38780d59bd7 /themes/newsboat.h
parentcc3dd4534bcbbc750d563992b93b1131410a2a76 (diff)
themes: simplify empty macros, remove do { } while(0)
Multiple function calls should still be nested in a do { } while(0), but this is hopefully obvious looking at the other lines. While testing, gcc with -O0 created the same binary. clang added a single jmp instruction.
Diffstat (limited to 'themes/newsboat.h')
-rw-r--r--themes/newsboat.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/themes/newsboat.h b/themes/newsboat.h
index b00111d..79e9dd2 100644
--- a/themes/newsboat.h
+++ b/themes/newsboat.h
@@ -1,6 +1,6 @@
/* newsboat-like (blue, yellow) */
-#define THEME_ITEM_NORMAL() do { } while(0)
-#define THEME_ITEM_FOCUS() do { } while(0)
+#define THEME_ITEM_NORMAL()
+#define THEME_ITEM_FOCUS()
#define THEME_ITEM_BOLD() do { attrmode(ATTR_BOLD_ON); } while(0)
#define THEME_ITEM_SELECTED() do { if (p->focused) ttywrite("\x1b[93;44m"); } while(0) /* bright yellow fg, blue bg */
#define THEME_SCROLLBAR_FOCUS() do { ttywrite("\x1b[34m"); } while(0) /* blue fg */
@@ -9,5 +9,5 @@
#define THEME_SCROLLBAR_TICK_NORMAL() do { ttywrite("\x1b[44m"); } while(0)
#define THEME_LINEBAR() do { ttywrite("\x1b[34m"); } while(0)
#define THEME_STATUSBAR() do { attrmode(ATTR_BOLD_ON); ttywrite("\x1b[93;44m"); } while(0)
-#define THEME_INPUT_LABEL() do { } while(0)
-#define THEME_INPUT_NORMAL() do { } while(0)
+#define THEME_INPUT_LABEL()
+#define THEME_INPUT_NORMAL()