Skip to content

Commit

Permalink
Merge pull request #73040 from Brambor/iwyu
Browse files Browse the repository at this point in the history
IWYU `src` folder A-F files
  • Loading branch information
ZhilkinSerg authored Apr 16, 2024
2 parents 14fd9ea + 9091ace commit 73b6cf7
Show file tree
Hide file tree
Showing 193 changed files with 1,394 additions and 474 deletions.
5 changes: 5 additions & 0 deletions src/achievement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@
#include "enums.h"
#include "event.h"
#include "event_statistics.h"
#include "flexbuffer_json-inl.h"
#include "flexbuffer_json.h"
#include "generic_factory.h"
#include "init.h"
#include "json.h"
#include "json_error.h"
#include "past_achievements_info.h"
#include "stats_tracker.h"
#include "string_formatter.h"
#include "translations.h"

template <typename E> struct enum_traits;

Expand Down
6 changes: 4 additions & 2 deletions src/achievement.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@
#include <functional>
#include <iosfwd>
#include <memory>
#include <new>
#include <optional>
#include <string>
#include <string_view>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#include "calendar.h"
#include "cata_variant.h"
#include "event_subscriber.h"
#include "translations.h"
#include "translation.h"
#include "type_id.h"

class JsonObject;
Expand Down
2 changes: 2 additions & 0 deletions src/active_item_cache.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#include "active_item_cache.h"

#include <algorithm>
#include <numeric>
#include <utility>

#include "item.h"
#include "item_pocket.h"
#include "safe_reference.h"

float item_reference::spoil_multiplier()
Expand Down
37 changes: 29 additions & 8 deletions src/activity_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,47 @@
#include <cstddef>
#include <cstdint>
#include <functional>
#include <initializer_list>
#include <iterator>
#include <list>
#include <map>
#include <new>
#include <optional>
#include <set>
#include <sstream>
#include <string>
#include <string_view>
#include <type_traits>
#include <unordered_set>
#include <utility>
#include <vector>

#include "action.h"
#include "activity_actor_definitions.h"
#include "activity_handlers.h" // put_into_vehicle_or_drop and drop_on_map
#include "activity_handlers.h"
#include "advanced_inv.h"
#include "avatar.h"
#include "avatar_action.h"
#include "bodypart.h"
#include "calendar.h"
#include "cata_assert.h"
#include "cata_utility.h"
#include "character.h"
#include "coordinates.h"
#include "character_id.h"
#include "clzones.h"
#include "contents_change_handler.h"
#include "coordinates.h"
#include "craft_command.h"
#include "creature.h"
#include "creature_tracker.h"
#include "debug.h"
#include "enums.h"
#include "event.h"
#include "event_bus.h"
#include "faction.h"
#include "field_type.h"
#include "flag.h"
#include "flexbuffer_json-inl.h"
#include "flexbuffer_json.h"
#include "game.h"
#include "game_constants.h"
#include "game_inventory.h"
Expand All @@ -42,17 +55,22 @@
#include "handle_liquid.h"
#include "harvest.h"
#include "iexamine.h"
#include "inventory.h"
#include "item.h"
#include "item_group.h"
#include "item_components.h"
#include "item_contents.h"
#include "item_location.h"
#include "itype.h"
#include "iuse.h"
#include "iuse_actor.h"
#include "json.h"
#include "json_error.h"
#include "line.h"
#include "magic_enchantment.h"
#include "map.h"
#include "map_iterator.h"
#include "map_selector.h"
#include "mapdata.h"
#include "memory_fast.h"
#include "martialarts.h"
#include "messages.h"
#include "monster.h"
Expand All @@ -64,6 +82,7 @@
#include "pickup.h"
#include "pimpl.h"
#include "player_activity.h"
#include "pocket_type.h"
#include "point.h"
#include "ranged.h"
#include "recipe.h"
Expand All @@ -72,19 +91,21 @@
#include "ret_val.h"
#include "rng.h"
#include "shearing.h"
#include "skill.h"
#include "sounds.h"
#include "string_formatter.h"
#include "skill.h"
#include "timed_event.h"
#include "translation.h"
#include "translations.h"
#include "trap.h"
#include "try_parse_integer.h"
#include "ui.h"
#include "uistate.h"
#include "units.h"
#include "value_ptr.h"
#include "veh_type.h"
#include "vehicle.h"
#include "vpart_position.h"
#include "veh_type.h"
#include "vpart_range.h"

static const activity_id ACT_AIM( "ACT_AIM" );
static const activity_id ACT_AUTODRIVE( "ACT_AUTODRIVE" );
Expand Down
4 changes: 1 addition & 3 deletions src/activity_actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@
#ifndef CATA_SRC_ACTIVITY_ACTOR_H
#define CATA_SRC_ACTIVITY_ACTOR_H

#include <iosfwd>
#include <memory>
#include <string>
#include <unordered_map>

#include "activity_type.h"
#include "clone_ptr.h"
#include "point.h"
#include "type_id.h"

class Character;
class JsonOut;
class JsonValue;
class monster;
class player_activity;

class activity_actor
Expand Down
17 changes: 11 additions & 6 deletions src/activity_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <iterator>
#include <memory>
Expand All @@ -13,9 +14,10 @@
#include <stdexcept>
#include <string>
#include <type_traits>
#include <unordered_map>
#include <utility>

#include "action.h"
#include "activity_actor.h"
#include "activity_type.h"
#include "advanced_inv.h"
#include "avatar.h"
Expand All @@ -26,6 +28,8 @@
#include "calendar.h"
#include "cata_utility.h"
#include "character.h"
#include "character_attire.h"
#include "character_id.h"
#include "character_martial_arts.h"
#include "clzones.h"
#include "colony.h"
Expand All @@ -34,22 +38,23 @@
#include "coordinates.h"
#include "creature.h"
#include "creature_tracker.h"
#include "damage.h"
#include "cuboid_rectangle.h"
#include "debug.h"
#include "effect_source.h"
#include "enums.h"
#include "event.h"
#include "event_bus.h"
#include "fault.h"
#include "field_type.h"
#include "flag.h"
#include "flexbuffer_json-inl.h"
#include "game.h"
#include "game_constants.h"
#include "game_inventory.h"
#include "handle_liquid.h"
#include "harvest.h"
#include "iexamine.h"
#include "inventory.h"
#include "inventory_ui.h"
#include "item.h"
#include "item_factory.h"
#include "item_location.h"
Expand All @@ -62,10 +67,8 @@
#include "make_static.h"
#include "map.h"
#include "map_iterator.h"
#include "map_selector.h"
#include "mapdata.h"
#include "martialarts.h"
#include "memory_fast.h"
#include "messages.h"
#include "mongroup.h"
#include "monster.h"
Expand All @@ -80,7 +83,7 @@
#include "pocket_type.h"
#include "point.h"
#include "proficiency.h"
#include "ranged.h"
#include "recipe.h"
#include "recipe_dictionary.h"
#include "requirements.h"
#include "ret_val.h"
Expand All @@ -89,6 +92,7 @@
#include "sounds.h"
#include "string_formatter.h"
#include "text_snippets.h"
#include "translation.h"
#include "translations.h"
#include "type_id.h"
#include "ui.h"
Expand All @@ -97,6 +101,7 @@
#include "veh_interact.h"
#include "vehicle.h"
#include "vpart_position.h"
#include "weakpoint.h"
#include "weather.h"

enum class creature_size : int;
Expand Down
9 changes: 5 additions & 4 deletions src/activity_handlers.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@
#ifndef CATA_SRC_ACTIVITY_HANDLERS_H
#define CATA_SRC_ACTIVITY_HANDLERS_H

#include <algorithm>
#include <functional>
#include <list>
#include <map>
#include <new>
#include <optional>
#include <string>
#include <unordered_set>
#include <vector>

#include "coordinates.h"
#include "item_location.h"
#include "type_id.h"
#include "requirements.h"
#include "type_id.h"
#include "units_fwd.h"

class Character;
class item;
class item_location;
class player_activity;
struct tripoint;

template<typename Point, typename Container>
std::vector<Point> get_sorted_tiles_by_distance( const Point &center, const Container &tiles )
Expand Down
24 changes: 15 additions & 9 deletions src/activity_item_handling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,32 @@

#include <algorithm>
#include <cmath>
#include <cstddef>
#include <cstdlib>
#include <iosfwd>
#include <list>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <utility>
#include <vector>

#include "activity_actor_definitions.h"
#include "activity_type.h"
#include "avatar.h"
#include "calendar.h"
#include "cata_utility.h"
#include "character.h"
#include "clzones.h"
#include "colony.h"
#include "construction.h"
#include "contents_change_handler.h"
#include "craft_command.h"
#include "creature.h"
#include "creature_tracker.h"
#include "debug.h"
#include "enums.h"
#include "faction.h"
#include "field.h"
#include "field_type.h"
#include "fire.h"
Expand All @@ -36,11 +37,12 @@
#include "iexamine.h"
#include "inventory.h"
#include "item.h"
#include "item_components.h"
#include "item_contents.h"
#include "item_location.h"
#include "item_pocket.h"
#include "item_stack.h"
#include "itype.h"
#include "iuse.h"
#include "line.h"
#include "make_static.h"
#include "map.h"
#include "map_iterator.h"
#include "map_selector.h"
Expand All @@ -52,7 +54,10 @@
#include "overmapbuffer.h"
#include "pickup.h"
#include "player_activity.h"
#include "pocket_type.h"
#include "point.h"
#include "recipe.h"
#include "recipe_dictionary.h"
#include "requirements.h"
#include "ret_val.h"
#include "rng.h"
Expand All @@ -65,10 +70,11 @@
#include "veh_type.h"
#include "vehicle.h"
#include "vehicle_selector.h"
#include "visitable.h"
#include "vpart_position.h"
#include "weather.h"
#include "recipe_dictionary.h"
#include "activity_actor_definitions.h"

struct use_function;

static const activity_id ACT_BUILD( "ACT_BUILD" );
static const activity_id ACT_BUTCHER_FULL( "ACT_BUTCHER_FULL" );
Expand Down
7 changes: 5 additions & 2 deletions src/activity_tracker.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
#include "activity_tracker.h"

#include <algorithm>
#include <cmath>
#include <map>
#include <utility>

#include "cata_assert.h"
#include "game_constants.h"
#include "options.h"
#include "string_formatter.h"

#include <cmath>

int activity_tracker::weariness() const
{
if( intake > tracker ) {
Expand Down
Loading

0 comments on commit 73b6cf7

Please sign in to comment.