From d61b285a1e38346c36259adb64d5b7309823b041 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Fri, 15 Feb 2019 19:20:25 +0100 Subject: Apply clang-tidy readability-redundant-control-flow fix --- src/cmd4.cc | 4 ---- src/cmd6.cc | 2 -- src/cmd7.cc | 5 ----- src/generate.cc | 2 -- src/melee2.cc | 1 - src/notes.cc | 6 ------ src/store.cc | 8 -------- src/util.cc | 6 +----- src/xtra2.cc | 3 --- 9 files changed, 1 insertion(+), 36 deletions(-) diff --git a/src/cmd4.cc b/src/cmd4.cc index f99055f6..8994ed2a 100644 --- a/src/cmd4.cc +++ b/src/cmd4.cc @@ -2745,7 +2745,6 @@ void do_cmd_feeling() else msg_print(do_cmd_feeling_text[feeling]); } - return; } @@ -3673,9 +3672,6 @@ void do_cmd_knowledge_notes() { /* Spawn */ show_notes_file(); - - /* Done */ - return; } diff --git a/src/cmd6.cc b/src/cmd6.cc index 86b5faeb..0deb3953 100644 --- a/src/cmd6.cc +++ b/src/cmd6.cc @@ -2414,8 +2414,6 @@ static void do_cmd_fill_bottle() { cave_set_feat(p_ptr->py, p_ptr->px, FEAT_EMPTY_FOUNTAIN); } - - return; } diff --git a/src/cmd7.cc b/src/cmd7.cc index 61c25a73..0b9a8a82 100644 --- a/src/cmd7.cc +++ b/src/cmd7.cc @@ -2615,9 +2615,6 @@ void summon_true(int r_idx, int item) /* Eliminate the totem */ inc_stack_size(item, -1); } - - /* Done */ - return; } @@ -2797,8 +2794,6 @@ void use_ability_blade() { msg_format("You will usually dodge successfully a level %d monster.", dun_level); } - - return; } /* diff --git a/src/generate.cc b/src/generate.cc index 6d92b208..7ab2ecf5 100644 --- a/src/generate.cc +++ b/src/generate.cc @@ -3752,8 +3752,6 @@ static void store_height(int x, int y, int x0, int y0, byte val, /* Store the value in height-map format */ /* Meant to be temporary, hence no cave_set_feat */ cave[y + y0 - yhsize][x + x0 - xhsize].feat = val; - - return; } diff --git a/src/melee2.cc b/src/melee2.cc index 087d2b27..9ad37306 100644 --- a/src/melee2.cc +++ b/src/melee2.cc @@ -6347,7 +6347,6 @@ void summon_maint(int m_idx) /* Well, then I'll take my wages from you. */ p_ptr->maintain_sum += cost; } - return; } diff --git a/src/notes.cc b/src/notes.cc index 0210de8c..50e0844d 100644 --- a/src/notes.cc +++ b/src/notes.cc @@ -43,9 +43,6 @@ void show_notes_file() /* Invoke show_file */ show_file(p.c_str(), caption.c_str()); - - /* Done */ - return; } /* @@ -65,9 +62,6 @@ void output_note(const char *final_note) /* Close the handle */ my_fclose(fff); - - /* Done */ - return; } diff --git a/src/store.cc b/src/store.cc index 50a1bcf4..c607b6f2 100644 --- a/src/store.cc +++ b/src/store.cc @@ -2123,9 +2123,6 @@ void store_stole() /* Kicked out for a LONG time */ st_ptr->store_open = turn + 500000 + randint(500000); } - - /* Not kicked out */ - return; } /* @@ -2433,9 +2430,6 @@ void store_purchase() display_inventory(); } } - - /* Not kicked out */ - return; } @@ -2802,13 +2796,11 @@ void store_examine() do_cmd_browse_aux(o_ptr); } - return; } - /* * Hack -- set this to leave the store */ diff --git a/src/util.cc b/src/util.cc index 8628fdb2..ff6c93c5 100644 --- a/src/util.cc +++ b/src/util.cc @@ -707,8 +707,7 @@ static void trigger_text_to_ascii(char **bufptr, const char **strptr) *s++ = (char)13; *bufptr = s; - *strptr = str; /* where **strptr == ']' */ - return; + *strptr = str; } @@ -2287,9 +2286,6 @@ void text_out_to_file(byte a, const char *str) /* Skip whitespace */ while (*s == ' ') s++; } - - /* We are done */ - return; } diff --git a/src/xtra2.cc b/src/xtra2.cc index a0f87d02..21c76dc3 100644 --- a/src/xtra2.cc +++ b/src/xtra2.cc @@ -5302,9 +5302,6 @@ static void corrupt_corrupted() { gain_random_corruption(); } - - /* We are done. */ - return; } /* -- cgit v1.2.3