• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revisãob2b74aecc457102d34c62088d1a5e32a1d0b098d (tree)
Hora2020-03-22 16:12:03
AutorHourier <hourier@user...>
CommiterHourier

Mensagem de Log

[Refactor] #40236 Changed return type of init_*() from bool to void because they return true always

Mudança Sumário

Diff

--- a/src/main-win.c
+++ b/src/main-win.c
@@ -32,10 +32,6 @@
3232 * </p>
3333 *
3434 * <p>
35-* <del>See also "main-dos.c" and "main-ibm.c".</del>
36-* </p>
37-*
38-* <p>
3935 * The "lib/user/pref-win.prf" file contains keymaps, macro definitions,
4036 * and/or color redefinitions.
4137 * </p>
@@ -1351,18 +1347,15 @@ static bool init_graphics(void)
13511347
13521348
13531349 /*
1354- * todo 戻り値は常にtrueなのでvoidに変更する
13551350 * Initialize music
13561351 */
1357-static bool init_music(void)
1352+static void init_music(void)
13581353 {
13591354 if (!can_use_music)
13601355 {
13611356 load_music_prefs();
13621357 can_use_music = TRUE;
13631358 }
1364-
1365- return (can_use_music);
13661359 }
13671360
13681361 /*
@@ -1376,18 +1369,15 @@ static void stop_music(void)
13761369
13771370
13781371 /*
1379- * todo 戻り値は常にtrueなのでvoidに変更する
13801372 * Initialize sound
13811373 */
1382-static bool init_sound(void)
1374+static void init_sound(void)
13831375 {
13841376 if (!can_use_sound)
13851377 {
13861378 load_sound_prefs();
13871379 can_use_sound = TRUE;
13881380 }
1389-
1390- return (can_use_sound);
13911381 }
13921382
13931383
@@ -1561,27 +1551,16 @@ static errr term_xtra_win_react(player_type *player_ptr)
15611551
15621552 if (use_sound != arg_sound)
15631553 {
1564- if (arg_sound && !init_sound())
1565- {
1566- plog(_("サウンドを初期化できません!", "Cannot initialize sound!"));
1567- arg_sound = FALSE;
1568- }
1569-
1554+ init_sound();
15701555 use_sound = arg_sound;
15711556 }
15721557
15731558 if (use_music != arg_music)
15741559 {
1575- if (arg_music && !init_music())
1576- {
1577- plog(_("BGMを初期化できません!", "Cannot initialize BGM!"));
1578- arg_music = FALSE;
1579- }
1580-
1560+ init_music();
15811561 use_music = arg_music;
15821562 if (!arg_music) stop_music();
15831563 else select_floor_music(player_ptr);
1584-
15851564 }
15861565
15871566 if (use_graphics != arg_graphics)
Show on old repository browser