OSDN Git Service

Merge pull request #3688 from Hourier/Fix-Compilation-Warnings-Beta
authorHourier <66951241+Hourier@users.noreply.github.com>
Sat, 28 Oct 2023 09:30:05 +0000 (18:30 +0900)
committerGitHub <noreply@github.com>
Sat, 28 Oct 2023 09:30:05 +0000 (18:30 +0900)
コンパイル警告の解消 β (予定)

src/dungeon/quest.h
src/info-reader/fixed-map-parser.h
src/knowledge/knowledge-quests.h
src/main-win.cpp
src/main-win/graphics-win.cpp
src/util/flag-group.h

index 0e0142b..612a6fb 100644 (file)
@@ -11,7 +11,7 @@
 /*
  * Quest constants
  */
-enum class QuestId : int16_t{
+enum class QuestId : short{
        NONE = 0, /* クエストなし */
        THIEF = 1, /*<! 盗賊の隠れ家 */
        SEWER = 2, /*<! 下水道 */
index 8669a3f..6e9a845 100644 (file)
@@ -5,6 +5,6 @@
 
 class PlayerType;
 enum parse_error_type : int;
-enum class QuestId : int16_t;
+enum class QuestId : short;
 parse_error_type parse_fixed_map(PlayerType *player_ptr, std::string_view name, int ymin, int xmin, int ymax, int xmax);
 std::set<QuestId> parse_quest_info(std::string_view file_name);
index 756cfe4..2094a6a 100644 (file)
@@ -5,7 +5,7 @@
 #include <vector>
 
 class PlayerType;
-enum class QuestId : int16_t;
+enum class QuestId : short;
 void do_cmd_checkquest(PlayerType *player_ptr);
 void do_cmd_knowledge_quests_completed(PlayerType *player_ptr, FILE *fff, const std::vector<QuestId> &quest_numbers);
 void do_cmd_knowledge_quests_failed(PlayerType *player_ptr, FILE *fff, const std::vector<QuestId> &quest_numbers);
index d75b2d3..0f90252 100644 (file)
@@ -359,7 +359,7 @@ static void save_prefs_aux(int i)
     wsprintfA(buf, "%d", td->tile_hgt);
     WritePrivateProfileStringA(sec_name, "TileHgt", buf, ini_file);
 
-    WINDOWPLACEMENT lpwndpl;
+    WINDOWPLACEMENT lpwndpl{};
     lpwndpl.length = sizeof(WINDOWPLACEMENT);
     GetWindowPlacement(td->w, &lpwndpl);
 
@@ -1022,7 +1022,7 @@ static errr term_curs_win(int x, int y)
     tile_wid = td->tile_wid;
     tile_hgt = td->tile_hgt;
 
-    RECT rc;
+    RECT rc{};
     rc.left = x * tile_wid + td->size_ow1;
     rc.right = rc.left + tile_wid;
     rc.top = y * tile_hgt + td->size_oh1;
@@ -1046,7 +1046,7 @@ static errr term_bigcurs_win(int x, int y)
     tile_wid = td->tile_wid;
     tile_hgt = td->tile_hgt;
 
-    RECT rc;
+    RECT rc{};
     rc.left = x * tile_wid + td->size_ow1;
     rc.right = rc.left + 2 * tile_wid;
     rc.top = y * tile_hgt + td->size_oh1;
@@ -1066,7 +1066,7 @@ static errr term_bigcurs_win(int x, int y)
 static errr term_wipe_win(int x, int y, int n)
 {
     term_data *td = (term_data *)(game_term->data);
-    RECT rc;
+    RECT rc{};
     rc.left = x * td->tile_wid + td->size_ow1;
     rc.right = rc.left + n * td->tile_wid;
     rc.top = y * td->tile_hgt + td->size_oh1;
index 12251af..857788e 100644 (file)
@@ -8,11 +8,7 @@
 #include "main-win/main-win-utils.h"
 #include "system/system-variables.h"
 #include "util/angband-files.h"
-
-#pragma warning(push)
-#pragma warning(disable : 4458)
 #include <gdiplus.h>
-#pragma warning(pop)
 
 // Flag set once "GDI+" has been initialized
 bool gdi_plus_started = false;
index 9a92da9..e59cc3d 100644 (file)
@@ -4,6 +4,7 @@
 #include <concepts>
 #include <iterator>
 #include <optional>
+#include <stdint.h>
 #include <type_traits>
 
 template <typename T>