From 095bd51974624f21da3d835ab43ac8379d3f1c63 Mon Sep 17 00:00:00 2001 From: John Bytheway Date: Tue, 24 Dec 2019 17:04:16 -0500 Subject: [PATCH] Use C++-style includes Convert all C library includes to their C++ equivalents (stdio.h -> cstdio, etc.). --- src/avatar.cpp | 4 ++-- src/avatar.h | 2 +- src/avatar_action.cpp | 2 +- src/avatar_action.h | 2 +- src/behavior.cpp | 2 +- src/character.cpp | 2 +- src/clzones.h | 2 +- src/construction_category.h | 2 +- src/craft_command.cpp | 2 +- src/debug_menu.cpp | 6 +++--- src/faction.cpp | 2 +- src/field_type.h | 4 ++-- src/game.cpp | 4 ++-- src/game_inventory.cpp | 2 +- src/handle_liquid.cpp | 4 ++-- src/inventory_ui.h | 2 +- src/item.h | 2 +- src/magic.cpp | 2 +- src/magic.h | 2 +- src/magic_spell_effect.cpp | 6 +++--- src/magic_teleporter_list.cpp | 2 +- src/main.cpp | 2 +- src/map_extras.h | 2 +- src/mapgen.cpp | 2 +- src/monattack.cpp | 2 +- src/npctrade.cpp | 2 +- src/npctrade.h | 2 +- src/output.cpp | 2 +- src/pixel_minimap.cpp | 4 ++-- src/requirements.cpp | 2 +- src/rng.cpp | 2 +- src/savegame_json.cpp | 2 +- src/sdl_utils.cpp | 2 +- src/sdltiles.cpp | 2 +- src/string_input_popup.h | 2 +- src/ui.cpp | 2 +- tests/bionics_test.cpp | 4 ++-- tests/colony_test.cpp | 2 +- tests/comestible_tests.cpp | 2 +- tests/crafting_test.cpp | 2 +- tests/creature_test.cpp | 2 +- tests/fake_messages.cpp | 2 +- tests/health_test.cpp | 2 +- tests/invlet_test.cpp | 2 +- tests/iuse_test.cpp | 2 +- tests/line_test.cpp | 2 +- tests/map_memory.cpp | 2 +- tests/math_functions.cpp | 2 +- tests/melee_test.cpp | 2 +- tests/monster_test.cpp | 2 +- tests/npc_talk_test.cpp | 2 +- tests/npc_test.cpp | 2 +- tests/reloading_test.cpp | 2 +- tests/rot_test.cpp | 2 +- tests/stomach_contents_tests.cpp | 2 +- tests/string_formatter_test.cpp | 2 +- tests/temperature_test.cpp | 2 +- tests/test_main.cpp | 6 +++--- tests/vehicle_drag.cpp | 2 +- tests/vehicle_efficiency.cpp | 4 ++-- tests/vision_test.cpp | 2 +- tests/wield_times_test.cpp | 2 +- 62 files changed, 75 insertions(+), 75 deletions(-) diff --git a/src/avatar.cpp b/src/avatar.cpp index d89c4b3cad279..52e4191142c33 100644 --- a/src/avatar.cpp +++ b/src/avatar.cpp @@ -1,7 +1,7 @@ #include "avatar.h" -#include -#include +#include +#include #include #include #include diff --git a/src/avatar.h b/src/avatar.h index 92eda70fc169c..341df17c8f5ce 100644 --- a/src/avatar.h +++ b/src/avatar.h @@ -2,7 +2,7 @@ #ifndef AVATAR_H #define AVATAR_H -#include +#include #include #include #include diff --git a/src/avatar_action.cpp b/src/avatar_action.cpp index 3243d03bc5e94..cf0bcd919f778 100644 --- a/src/avatar_action.cpp +++ b/src/avatar_action.cpp @@ -1,6 +1,6 @@ #include "avatar_action.h" -#include +#include #include #include #include diff --git a/src/avatar_action.h b/src/avatar_action.h index a4e8aa06f6611..df18173e592d6 100644 --- a/src/avatar_action.h +++ b/src/avatar_action.h @@ -2,7 +2,7 @@ #ifndef AVATAR_ACTION_H #define AVATAR_ACTION_H -#include +#include #include "optional.h" #include "point.h" diff --git a/src/behavior.cpp b/src/behavior.cpp index 2208bc873040c..2d911d16fe5b1 100644 --- a/src/behavior.cpp +++ b/src/behavior.cpp @@ -1,6 +1,6 @@ #include "behavior.h" -#include +#include #include #include #include diff --git a/src/character.cpp b/src/character.cpp index f8c0af9416e00..aceba9460129c 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -1,6 +1,6 @@ #include "character.h" -#include +#include #include #include #include diff --git a/src/clzones.h b/src/clzones.h index 9c5bd5e44153e..db3485286b61b 100644 --- a/src/clzones.h +++ b/src/clzones.h @@ -2,7 +2,7 @@ #ifndef CLZONES_H #define CLZONES_H -#include +#include #include #include #include diff --git a/src/construction_category.h b/src/construction_category.h index 21619a84fcd48..acf944a3328fd 100644 --- a/src/construction_category.h +++ b/src/construction_category.h @@ -2,7 +2,7 @@ #ifndef CONSTRUCTION_CATEGORY_H #define CONSTRUCTION_CATEGORY_H -#include +#include #include #include diff --git a/src/craft_command.cpp b/src/craft_command.cpp index 8e43f6aebc60d..73018b9fdae28 100644 --- a/src/craft_command.cpp +++ b/src/craft_command.cpp @@ -1,6 +1,6 @@ #include "craft_command.h" -#include +#include #include #include #include diff --git a/src/debug_menu.cpp b/src/debug_menu.cpp index 85f9f02830f8b..a5442c61ed99e 100644 --- a/src/debug_menu.cpp +++ b/src/debug_menu.cpp @@ -1,8 +1,8 @@ #include "debug_menu.h" // IWYU pragma: no_include -#include -#include +#include +#include #include #include #include @@ -67,7 +67,7 @@ #include "artifact.h" #include "vpart_position.h" #include "rng.h" -#include "signal.h" +#include #include "magic.h" #include "bodypart.h" #include "calendar.h" diff --git a/src/faction.cpp b/src/faction.cpp index 20c45c6040206..428a7afe4f463 100644 --- a/src/faction.cpp +++ b/src/faction.cpp @@ -1,6 +1,6 @@ #include "faction.h" -#include +#include #include #include #include diff --git a/src/field_type.h b/src/field_type.h index 38ebeaf7dac30..bc11a7d4e9e40 100644 --- a/src/field_type.h +++ b/src/field_type.h @@ -2,8 +2,8 @@ #ifndef FIELD_TYPE_H #define FIELD_TYPE_H -#include -#include +#include +#include #include #include #include diff --git a/src/game.cpp b/src/game.cpp index cf302c07f754e..2032b72754951 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1,7 +1,7 @@ #include "game.h" -#include -#include +#include +#include #include #include #include diff --git a/src/game_inventory.cpp b/src/game_inventory.cpp index 9e12d92f2c4f3..812aa3f5c484b 100644 --- a/src/game_inventory.cpp +++ b/src/game_inventory.cpp @@ -1,6 +1,6 @@ #include "game_inventory.h" -#include +#include #include #include #include diff --git a/src/handle_liquid.cpp b/src/handle_liquid.cpp index 58d75755b5814..cfdad43df3832 100644 --- a/src/handle_liquid.cpp +++ b/src/handle_liquid.cpp @@ -1,7 +1,7 @@ #include "handle_liquid.h" -#include -#include +#include +#include #include #include #include diff --git a/src/inventory_ui.h b/src/inventory_ui.h index 2faa88ef67bca..5d5105bc77c3d 100644 --- a/src/inventory_ui.h +++ b/src/inventory_ui.h @@ -2,7 +2,7 @@ #ifndef INVENTORY_UI_H #define INVENTORY_UI_H -#include +#include #include #include #include diff --git a/src/item.h b/src/item.h index 6daece3776d93..f0ac233d5ef52 100644 --- a/src/item.h +++ b/src/item.h @@ -2,7 +2,7 @@ #ifndef ITEM_H #define ITEM_H -#include +#include #include #include #include diff --git a/src/magic.cpp b/src/magic.cpp index 16bad5b8fbdc2..47ad78291b9f8 100644 --- a/src/magic.cpp +++ b/src/magic.cpp @@ -1,6 +1,6 @@ #include "magic.h" -#include +#include #include #include #include diff --git a/src/magic.h b/src/magic.h index f8e3b5dcc4ecc..d57ef3d6e6bae 100644 --- a/src/magic.h +++ b/src/magic.h @@ -2,7 +2,7 @@ #ifndef MAGIC_H #define MAGIC_H -#include +#include #include #include #include diff --git a/src/magic_spell_effect.cpp b/src/magic_spell_effect.cpp index 1159b3f4d8458..c6fac1357fcf4 100644 --- a/src/magic_spell_effect.cpp +++ b/src/magic_spell_effect.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/src/magic_teleporter_list.cpp b/src/magic_teleporter_list.cpp index b93f72c870cf2..d6f2a3df7aa4c 100644 --- a/src/magic_teleporter_list.cpp +++ b/src/magic_teleporter_list.cpp @@ -1,6 +1,6 @@ #include "magic_teleporter_list.h" -#include +#include #include #include #include diff --git a/src/main.cpp b/src/main.cpp index 21536165ad805..8da3f3577441b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,7 +19,7 @@ #if defined(_WIN32) #include "platform_win.h" #else -#include +#include #endif #include "color.h" #include "crash.h" diff --git a/src/map_extras.h b/src/map_extras.h index a079fa5c33fc9..fe92449cce025 100644 --- a/src/map_extras.h +++ b/src/map_extras.h @@ -2,7 +2,7 @@ #ifndef MAP_EXTRAS_H #define MAP_EXTRAS_H -#include +#include #include #include diff --git a/src/mapgen.cpp b/src/mapgen.cpp index 47ae641a37b4d..a9203ea60a67b 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -1,6 +1,6 @@ #include "mapgen.h" -#include +#include #include #include #include diff --git a/src/monattack.cpp b/src/monattack.cpp index 5c0af3f8b1283..e4d5a863f55aa 100644 --- a/src/monattack.cpp +++ b/src/monattack.cpp @@ -1,6 +1,6 @@ #include "monattack.h" -#include +#include #include #include #include diff --git a/src/npctrade.cpp b/src/npctrade.cpp index f2f33c4bf76ca..2f7e6c1c6cd34 100644 --- a/src/npctrade.cpp +++ b/src/npctrade.cpp @@ -1,6 +1,6 @@ #include "npctrade.h" -#include +#include #include #include #include diff --git a/src/npctrade.h b/src/npctrade.h index 1413656975fde..2ba4aa91cc0f3 100644 --- a/src/npctrade.h +++ b/src/npctrade.h @@ -2,7 +2,7 @@ #ifndef NPCTRADE_H #define NPCTRADE_H -#include +#include #include #include #include diff --git a/src/output.cpp b/src/output.cpp index ef614fe5b395c..e36ee01f5f4fc 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -1,6 +1,6 @@ #include "output.h" -#include +#include #include #include #include diff --git a/src/pixel_minimap.cpp b/src/pixel_minimap.cpp index 6a00d83ee5584..2c9b59f5fa387 100644 --- a/src/pixel_minimap.cpp +++ b/src/pixel_minimap.cpp @@ -23,13 +23,13 @@ #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include diff --git a/src/requirements.cpp b/src/requirements.cpp index e5ec728320727..3563635cbca89 100644 --- a/src/requirements.cpp +++ b/src/requirements.cpp @@ -1,6 +1,6 @@ #include "requirements.h" -#include +#include #include #include #include diff --git a/src/rng.cpp b/src/rng.cpp index 8acab811637a2..63a643e183d54 100644 --- a/src/rng.cpp +++ b/src/rng.cpp @@ -1,6 +1,6 @@ #include "rng.h" -#include +#include #include #include diff --git a/src/savegame_json.cpp b/src/savegame_json.cpp index 36d0685edf2b4..3545b43368581 100644 --- a/src/savegame_json.cpp +++ b/src/savegame_json.cpp @@ -5,7 +5,7 @@ #include "npc_favor.h" // IWYU pragma: associated #include "pldata.h" // IWYU pragma: associated -#include +#include #include #include #include diff --git a/src/sdl_utils.cpp b/src/sdl_utils.cpp index cdd776328baae..3b47c1b557009 100644 --- a/src/sdl_utils.cpp +++ b/src/sdl_utils.cpp @@ -2,7 +2,7 @@ #include "sdl_utils.h" -#include +#include #include #include "color.h" diff --git a/src/sdltiles.cpp b/src/sdltiles.cpp index ee4dd5f1d09f1..bdb00e4d0372b 100644 --- a/src/sdltiles.cpp +++ b/src/sdltiles.cpp @@ -3,7 +3,7 @@ #include "sdltiles.h" // IWYU pragma: associated #include "cursesdef.h" // IWYU pragma: associated -#include +#include #include #include #include diff --git a/src/string_input_popup.h b/src/string_input_popup.h index f8124aa849fa8..e1914e34f8215 100644 --- a/src/string_input_popup.h +++ b/src/string_input_popup.h @@ -2,7 +2,7 @@ #ifndef STRING_INPUT_POPUP_H #define STRING_INPUT_POPUP_H -#include +#include #include #include #include diff --git a/src/ui.cpp b/src/ui.cpp index 13d86ab4a2d1c..7b2bedc127ea5 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -1,6 +1,6 @@ #include "ui.h" -#include +#include #include #include #include diff --git a/tests/bionics_test.cpp b/tests/bionics_test.cpp index 03cad7b9cef50..573d84a3e6d92 100644 --- a/tests/bionics_test.cpp +++ b/tests/bionics_test.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include #include diff --git a/tests/colony_test.cpp b/tests/colony_test.cpp index e2ae8f0f6ad5a..ba774b6983c7d 100644 --- a/tests/colony_test.cpp +++ b/tests/colony_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include // std::find #include // std::greater #include // std::move diff --git a/tests/comestible_tests.cpp b/tests/comestible_tests.cpp index 9b525f6e5912d..a18d06a17d55a 100644 --- a/tests/comestible_tests.cpp +++ b/tests/comestible_tests.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/tests/crafting_test.cpp b/tests/crafting_test.cpp index 88991a8acd950..a3ec63c051d9a 100644 --- a/tests/crafting_test.cpp +++ b/tests/crafting_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/tests/creature_test.cpp b/tests/creature_test.cpp index 257066ac1af26..62d3f27d4554c 100644 --- a/tests/creature_test.cpp +++ b/tests/creature_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/fake_messages.cpp b/tests/fake_messages.cpp index 480f7ebea20d4..6bca667a402d7 100644 --- a/tests/fake_messages.cpp +++ b/tests/fake_messages.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/tests/health_test.cpp b/tests/health_test.cpp index f835d002e5c24..698dad13bfc7f 100644 --- a/tests/health_test.cpp +++ b/tests/health_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/tests/invlet_test.cpp b/tests/invlet_test.cpp index 3119a59d654a9..bcf9b48aa64d7 100644 --- a/tests/invlet_test.cpp +++ b/tests/invlet_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/tests/iuse_test.cpp b/tests/iuse_test.cpp index 3cb25a3aba25b..c7963425ffc80 100644 --- a/tests/iuse_test.cpp +++ b/tests/iuse_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/line_test.cpp b/tests/line_test.cpp index f7dc61528ce4e..f2f2481e9cdc7 100644 --- a/tests/line_test.cpp +++ b/tests/line_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/tests/map_memory.cpp b/tests/map_memory.cpp index 21f43811b122a..26e01337fbd3c 100644 --- a/tests/map_memory.cpp +++ b/tests/map_memory.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/tests/math_functions.cpp b/tests/math_functions.cpp index c3c3d8846401f..2ba62a55ff289 100644 --- a/tests/math_functions.cpp +++ b/tests/math_functions.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/melee_test.cpp b/tests/melee_test.cpp index 09bc0ca573648..0f03f85dc7fa4 100644 --- a/tests/melee_test.cpp +++ b/tests/melee_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/monster_test.cpp b/tests/monster_test.cpp index c3b4427b322b6..d655a7ee41665 100644 --- a/tests/monster_test.cpp +++ b/tests/monster_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/tests/npc_talk_test.cpp b/tests/npc_talk_test.cpp index 95030b3ed27ea..c59e1c55a223c 100644 --- a/tests/npc_talk_test.cpp +++ b/tests/npc_talk_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/tests/npc_test.cpp b/tests/npc_test.cpp index 2b4d53105576a..2988840121c43 100644 --- a/tests/npc_test.cpp +++ b/tests/npc_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/tests/reloading_test.cpp b/tests/reloading_test.cpp index 292b15dbcd229..47c02e4aa4cb0 100644 --- a/tests/reloading_test.cpp +++ b/tests/reloading_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/tests/rot_test.cpp b/tests/rot_test.cpp index 8e1f874af3bff..8a172751aaca5 100644 --- a/tests/rot_test.cpp +++ b/tests/rot_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/stomach_contents_tests.cpp b/tests/stomach_contents_tests.cpp index 7c13bc8e6c7da..89d86403380b0 100644 --- a/tests/stomach_contents_tests.cpp +++ b/tests/stomach_contents_tests.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "avatar.h" diff --git a/tests/string_formatter_test.cpp b/tests/string_formatter_test.cpp index 0c2e043d1cad5..001a83c06e95d 100644 --- a/tests/string_formatter_test.cpp +++ b/tests/string_formatter_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/tests/temperature_test.cpp b/tests/temperature_test.cpp index cf1629f0c0bea..773a01ea61b8a 100644 --- a/tests/temperature_test.cpp +++ b/tests/temperature_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/test_main.cpp b/tests/test_main.cpp index 65d7d2db73153..446426bb7f92c 100644 --- a/tests/test_main.cpp +++ b/tests/test_main.cpp @@ -13,9 +13,9 @@ #endif // _GLIBCXX_DEBUG #define CATCH_CONFIG_RUNNER -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/tests/vehicle_drag.cpp b/tests/vehicle_drag.cpp index 6ff2a3abe5e55..34600c61708aa 100644 --- a/tests/vehicle_drag.cpp +++ b/tests/vehicle_drag.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/tests/vehicle_efficiency.cpp b/tests/vehicle_efficiency.cpp index 9017a17cd9506..e45c978e21c2c 100644 --- a/tests/vehicle_efficiency.cpp +++ b/tests/vehicle_efficiency.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include #include diff --git a/tests/vision_test.cpp b/tests/vision_test.cpp index bf9c86a7407c4..41abaddd4cf26 100644 --- a/tests/vision_test.cpp +++ b/tests/vision_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/tests/wield_times_test.cpp b/tests/wield_times_test.cpp index fd5d4a7667769..2d16fd1efa5cc 100644 --- a/tests/wield_times_test.cpp +++ b/tests/wield_times_test.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include