From 7fe32301c448ecff3af578faa44a8f2cc326110c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 12 Nov 2021 19:23:09 +0530 Subject: [PATCH] Use __func__ instead of manually specifying function names --- kitty/screen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kitty/screen.c b/kitty/screen.c index 8918cb5b2..d81e887a7 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -760,11 +760,11 @@ restore_overlay_line(struct SaveOverlayLine *sol) { } } -#define SAVE_OVERLAY_LINE(func) struct SaveOverlayLine __attribute__ ((__cleanup__(restore_overlay_line))) _sol_ = {.screen=self,.func_name=#func}; save_overlay_line(&_sol_); +#define SAVE_OVERLAY_LINE struct SaveOverlayLine __attribute__ ((__cleanup__(restore_overlay_line))) _sol_ = {.screen=self,.func_name=__func__}; save_overlay_line(&_sol_); void screen_draw(Screen *self, uint32_t och, bool from_input_stream) { - SAVE_OVERLAY_LINE(screen_draw); + SAVE_OVERLAY_LINE; draw_codepoint(self, och, from_input_stream); } @@ -1211,7 +1211,7 @@ screen_set_tab_stop(Screen *self) { void screen_cursor_back(Screen *self, unsigned int count/*=1*/, int move_direction/*=-1*/) { - SAVE_OVERLAY_LINE(screen_cursor_back); + SAVE_OVERLAY_LINE; if (count == 0) count = 1; if (move_direction < 0 && count > self->cursor->x) self->cursor->x = 0; else self->cursor->x += move_direction * count;