Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run IWYU for some files #72906

Merged
merged 2 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@
#include <utility>

#include "avatar.h"
#include "cached_options.h"
#include "cached_options.h" // IWYU pragma: keep
#include "cata_utility.h"
#include "character.h"
#include "creature.h"
#include "creature_tracker.h"
#include "debug.h"
#include "flag.h"
#include "game.h"
#include "game_constants.h"
#include "input_context.h"
#include "input_enums.h"
#include "inventory.h"
#include "item.h"
#include "item_location.h"
#include "map.h"
#include "map_iterator.h"
#include "mapdata.h"
Expand Down
1 change: 1 addition & 0 deletions src/action.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

struct input_event;
struct point;
struct tripoint;

/**
* Enumerates all discrete actions that can be performed by player
Expand Down
25 changes: 14 additions & 11 deletions src/avatar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

#include <algorithm>
#include <array>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <cstddef>
#include <functional>
#include <iterator>
#include <list>
#include <map>
Expand All @@ -15,18 +15,17 @@
#include <utility>

#include "action.h"
#include "activity_type.h"
#include "activity_actor_definitions.h"
#include "bionics.h"
#include "bodypart.h"
#include "calendar.h"
#include "cata_assert.h"
#include "cata_utility.h"
#include "catacharset.h"
#include "character.h"
#include "character_id.h"
#include "character_martial_arts.h"
#include "clzones.h"
#include "color.h"
#include "creature.h"
#include "cursesdef.h"
#include "debug.h"
#include "diary.h"
Expand All @@ -36,19 +35,22 @@
#include "event_bus.h"
#include "faction.h"
#include "field_type.h"
#include "flexbuffer_json-inl.h"
#include "flexbuffer_json.h"
#include "game.h"
#include "game_constants.h"
#include "game_inventory.h"
#include "help.h"
#include "inventory.h"
#include "item.h"
#include "item_location.h"
#include "itype.h"
#include "iuse.h"
#include "kill_tracker.h"
#include "make_static.h"
#include "magic_enchantment.h"
#include "json.h"
#include "line.h"
#include "map.h"
#include "map_memory.h"
#include "mapdata.h"
#include "martialarts.h"
#include "messages.h"
#include "mission.h"
Expand All @@ -57,15 +59,14 @@
#include "move_mode.h"
#include "mutation.h"
#include "npc.h"
#include "options.h"
#include "output.h"
#include "overmap.h"
#include "overmapbuffer.h"
#include "pathfinding.h"
#include "pimpl.h"
#include "player_activity.h"
#include "profession.h"
#include "ranged.h"
#include "recipe.h"
#include "ret_val.h"
#include "rng.h"
#include "scenario.h"
Expand All @@ -74,8 +75,8 @@
#include "string_formatter.h"
#include "talker.h"
#include "talker_avatar.h"
#include "translations.h"
#include "timed_event.h"
#include "translations.h"
#include "trap.h"
#include "type_id.h"
#include "ui.h"
Expand All @@ -85,6 +86,8 @@
#include "vehicle.h"
#include "vpart_position.h"

class monfaction;

static const bionic_id bio_cloak( "bio_cloak" );
static const bionic_id bio_soporific( "bio_soporific" );

Expand Down
20 changes: 11 additions & 9 deletions src/avatar.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,58 @@
#ifndef CATA_SRC_AVATAR_H
#define CATA_SRC_AVATAR_H

#include <cstddef>
#include <iosfwd>
#include <array>
#include <list>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <string_view>
#include <unordered_set>
#include <utility>
#include <vector>

#include "bodypart.h"
#include "calendar.h"
#include "character.h"
#include "character_id.h"
#include "coordinates.h"
#include "enums.h"
#include "game_constants.h"
#include "item.h"
#include "magic_teleporter_list.h"
#include "mdarray.h"
#include "memory_fast.h"
#include "point.h"
#include "type_id.h"
#include "units.h"

class advanced_inv_area;
class advanced_inv_listitem;
class advanced_inventory_pane;
class cata_path;
class diary;
class faction;
class item;
Brambor marked this conversation as resolved.
Show resolved Hide resolved
class item_location;
class JsonObject;
class JsonOut;
class map_memory;
class memorized_tile;
class mission;
class monster;
class nc_color;
class npc;
class talker;
struct bionic;
struct mtype;

namespace catacurses
{
class window;
} // namespace catacurses
enum class character_type : int;
class map_memory;
class memorized_tile;

namespace debug_menu
{
class mission_debug;
} // namespace debug_menu
struct mtype;
enum class pool_type;

// Monster visible in different directions (safe mode & compass)
Expand Down
1 change: 1 addition & 0 deletions src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
#include "trap.h"
#include "ui.h"
#include "ui_manager.h"
#include "uistate.h"
#include "units.h"
#include "value_ptr.h"
#include "veh_type.h"
Expand Down
18 changes: 16 additions & 2 deletions src/diary.cpp
Original file line number Diff line number Diff line change
@@ -1,26 +1,40 @@
#include "diary.h"

#include <algorithm>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <list>
#include <string>
#include <utility>

#include "avatar.h"
#include "bionics.h"
#include "calendar.h"
#include "cata_path.h"
#include "cata_utility.h"
#include "catacharset.h"
#include "color.h"
#include "filesystem.h"
#include "flexbuffer_json-inl.h"
#include "flexbuffer_json.h"
#include "game.h"
#include "json.h"
#include "json_error.h"
#include "kill_tracker.h"
#include "magic.h"
#include "mission.h"
#include "mtype.h"
#include "mutation.h"
#include "npc.h"
#include "output.h"
#include "path_info.h"
#include "pimpl.h"
#include "proficiency.h"
#include "skill.h"
#include "string_formatter.h"
#include "translation.h"
#include "translations.h"
#include "type_id.h"
#include "weather.h"

diary_page::diary_page() = default;

Expand Down
21 changes: 13 additions & 8 deletions src/diary.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,26 @@
#ifndef CATA_SRC_DIARY_H
#define CATA_SRC_DIARY_H

#include <functional>
#include <iosfwd>
#include <map>
#include <memory>
#include <string>
#include <list>
#include <vector>

#include "achievement.h"
#include "character.h"
#include "kill_tracker.h"
#include "skill.h"
#include "stats_tracker.h"
#include "ui.h"
#include "calendar.h"
#include "mutation.h"
#include "type_id.h"
#include "units.h"

enum class time_accuracy;
class JsonOut;
class JsonValue;

namespace catacurses
{
class window;
} // namespace catacurses

/// <summary>
/// diary page, to save current character progression
/// </summary>
Expand Down
2 changes: 2 additions & 0 deletions src/diary_ui.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#include "game.h" // IWYU pragma: associated

#include <algorithm>
#include <initializer_list>
#include <map>
#include <string>
#include <utility>
#include <vector>

#include "catacharset.h"
#include "color.h"
#include "cursesdef.h"
#include "diary.h"
Expand Down
Loading
Loading