OSDN Git Service

[Refactor] C形式のインクルードをC++形式のインクルードに変えた (stdint.h とh-system.h に定義されたもののみ)
authorHourier <66951241+Hourier@users.noreply.github.com>
Sun, 9 Jun 2024 12:48:37 +0000 (21:48 +0900)
committerHourier <66951241+Hourier@users.noreply.github.com>
Mon, 10 Jun 2024 10:20:16 +0000 (19:20 +0900)
13 files changed:
src/external-lib/json.hpp
src/game-option/option-flags.h
src/load/angband-version-comparer.h
src/load/store-loader.cpp
src/room/rooms-vault.h
src/status/action-setter.h
src/system/angband-system.h
src/system/angband-version.h
src/system/h-system.h
src/system/h-type.h
src/target/target-setter.h
src/target/target-types.h
src/util/flag-group.h

index 2f4cdb0..e237c35 100644 (file)
@@ -2095,7 +2095,7 @@ JSON_HEDLEY_DIAGNOSTIC_POP
 #if defined(__INTPTR_TYPE__)
     #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0)), int*)
 #else
-    #include <stdint.h>
+    #include <cstdint>
     #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((intptr_t) ((expr) * 0)) : (int*) 0)), int*)
 #endif
 #  elif \
@@ -2112,7 +2112,7 @@ JSON_HEDLEY_DIAGNOSTIC_POP
 #if defined(__INTPTR_TYPE__)
     #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0), int*: 1, void*: 0)
 #else
-    #include <stdint.h>
+    #include <cstdint>
     #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((intptr_t) * 0) : (int*) 0), int*: 1, void*: 0)
 #endif
 #  elif \
index 33aab4b..9e60ad5 100644 (file)
@@ -3,7 +3,7 @@
 #include "system/redrawing-flags-updater.h"
 #include "util/flag-group.h"
 #include <array>
-#include <stdint.h>
+#include <cstdint>
 
 constexpr auto MAX_WINDOW_ENTITIES = 8;
 
index b0b10f2..0216c13 100644 (file)
@@ -1,6 +1,6 @@
 #pragma once
 
-#include <stdint.h>
+#include <cstdint>
 
 bool h_older_than(uint8_t major, uint8_t minor, uint8_t patch, uint8_t extra);
 bool h_older_than(uint8_t major, uint8_t minor, uint8_t patch);
index c7a6990..0e757a3 100644 (file)
@@ -12,7 +12,7 @@
 #include "system/item-entity.h"
 #include "system/player-type-definition.h"
 #include "util/object-sort.h"
-#include <stdint.h>
+#include <cstdint>
 
 /*!
  * @brief 店置きのアイテムオブジェクトを読み込む / Add the item "o_ptr" to the inventory of the "Home"
index 0f43975..1860bce 100644 (file)
@@ -1,6 +1,6 @@
 #pragma once
 
-#include <stdint.h>
+#include <cstdint>
 #include <string>
 #include <vector>
 
index d49ad7f..78fba09 100644 (file)
@@ -1,6 +1,6 @@
 #pragma once
 
-#include <stdint.h>
+#include <cstdint>
 
 class PlayerType;
 void set_action(PlayerType *player_ptr, uint8_t typ);
index 4efa933..7d8ef0f 100644 (file)
@@ -1,7 +1,7 @@
 #pragma once
 
 #include "util/rng-xoshiro.h"
-#include <stdint.h>
+#include <cstdint>
 #include <string>
 #include <string_view>
 
index e210c14..1dc49eb 100644 (file)
@@ -1,6 +1,6 @@
 #pragma once
 
-#include <stdint.h>
+#include <cstdint>
 #include <string>
 
 /*!
index 9ddb614..fff85a9 100644 (file)
@@ -9,17 +9,17 @@
 
 #pragma once
 
-#include <ctype.h>
-#include <errno.h>
+#include <cctype>
+#include <cerrno>
+#include <cstdarg>
+#include <cstddef>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+#include <cwctype>
 #include <fcntl.h>
 #include <memory.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <wctype.h>
 
 // clang-format off
 
index 07e5f17..24a6daa 100644 (file)
@@ -34,7 +34,7 @@
  */
 
 #include <cassert>
-#include <stdint.h>
+#include <cstdint>
 
 /*** Special 4 letter names for some standard types ***/
 typedef void *vptr; /*!< void型ポインタ定義 / A standard pointer (to "void" because ANSI C says so) */
index 062c742..b88b66f 100644 (file)
@@ -1,6 +1,6 @@
 #pragma once
 
-#include <stdint.h>
+#include <cstdint>
 
 enum target_type : uint32_t;
 class PlayerType;
index 8f53423..2fdc4eb 100644 (file)
@@ -1,5 +1,5 @@
 #pragma once
-#include <stdint.h>
+#include <cstdint>
 
 /* target_set用関数の利用用途フラグ / Bit flags for the "target_set" function */
 enum target_type : uint32_t {
index 98e1114..34cf36f 100644 (file)
@@ -3,9 +3,9 @@
 #include "info-reader/info-reader-util.h"
 #include <bitset>
 #include <concepts>
+#include <cstdint>
 #include <iterator>
 #include <optional>
-#include <stdint.h>
 #include <type_traits>
 
 template <typename T>