Skip to content

Commit

Permalink
Rename delete function
Browse files Browse the repository at this point in the history
Rename delete() to delete_char() to avoid `clang-format` misinterpreting
`delete()` as the C++ the keyword, which cauese an extra space to be
added when running `clang-format`, turning `delete()` to `delete ()`.
  • Loading branch information
jouae committed Nov 23, 2024
1 parent 7231d62 commit f508535
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/font-edit/twin-fedit.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ static void split(char_t *c, cmd_t *first, cmd_t *last)
c->first = c->last = 0;
}

static void delete(char_t *c, cmd_t *first)
static void delete_char(char_t *c, cmd_t *first)
{
push(c);
delete_cmd(&c->cmd, first);
Expand Down Expand Up @@ -512,7 +512,7 @@ static void play(char_t *c)
cmd_t *spline = NULL;
draw_char(c);

for(;;){
for (;;) {
while (SDL_PollEvent(&event)) {
switch (event.type) {
/* If SDL event is detected */
Expand All @@ -523,7 +523,7 @@ static void play(char_t *c)
case SDL_KEYDOWN:
/* If any key event is detected */
key_event = event.key.keysym.sym;

switch (key_event) {
case SDLK_q:
/* To exit play()
Expand Down Expand Up @@ -553,7 +553,7 @@ static void play(char_t *c)
case SDLK_d:
/* To delete the first command */
if (c->first) {
delete (c, c->first);
delete_char(c, c->first);
}
break;
case SDLK_DOWN:
Expand Down

0 comments on commit f508535

Please sign in to comment.