remove duplicate code

Here, `then` clause and `else` clause is identical.
This commit is contained in:
SHIRAKATA Kentaro
2022-09-21 17:00:01 -07:00
committed by PatR
parent f679a537d4
commit 2a8ddf1145
+4 -11
View File
@@ -1388,17 +1388,10 @@ root_plselection_prompt(
if (alignnum != ROLE_NONE && alignnum != ROLE_RANDOM if (alignnum != ROLE_NONE && alignnum != ROLE_RANDOM
&& ok_align(rolenum, racenum, gendnum, alignnum)) { && ok_align(rolenum, racenum, gendnum, alignnum)) {
/* if race specified, and multiple choice of alignments for it */ /* if race specified, and multiple choice of alignments for it */
if ((racenum >= 0) && (aligncount > 1)) { if (donefirst)
if (donefirst) Strcat(buf, " ");
Strcat(buf, " "); Strcat(buf, aligns[alignnum].adj);
Strcat(buf, aligns[alignnum].adj); donefirst = TRUE;
donefirst = TRUE;
} else {
if (donefirst)
Strcat(buf, " ");
Strcat(buf, aligns[alignnum].adj);
donefirst = TRUE;
}
} else { } else {
/* in case we got here by failing the ok_align() test */ /* in case we got here by failing the ok_align() test */
if (alignnum != ROLE_RANDOM) if (alignnum != ROLE_RANDOM)