Skip to content

Commit

Permalink
remove unnecessary resources.hpp include from unit.hpp
Browse files Browse the repository at this point in the history
It turned out that alot of compilation units were using resources
but not including the header, and only getting circuitously
through the display.hpp header which got it from unit.hpp. This
is an improvement since unit itself doesn't need the header,
and most classes probably don't either.
  • Loading branch information
cbeck88 committed Jun 14, 2014
1 parent 85de1c2 commit 1796b4d
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/editor/editor_controller.cpp
Expand Up @@ -37,6 +37,7 @@
#include "wml_exception.hpp"

#include "dialogs.hpp"
#include "resources.hpp"

#include "../clipboard.hpp"
#include "../game_preferences.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/editor/map/context_manager.cpp
Expand Up @@ -13,6 +13,7 @@
*/
#define GETTEXT_DOMAIN "wesnoth-editor"

#include "resources.hpp"
#include "team.hpp"

#include "context_manager.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/editor/map/map_context.cpp
Expand Up @@ -21,6 +21,7 @@
#include "gettext.hpp"
#include "map_exception.hpp"
#include "map_label.hpp"
#include "resources.hpp"
#include "serialization/binary_or_text.hpp"
#include "serialization/parser.hpp"
#include "team.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/game_display.hpp
Expand Up @@ -22,6 +22,7 @@ class tod_manager;
class team;
class unit;
class unit_map;
class game_board;

#include "animated.hpp"
#include "chat_events.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/help.cpp
Expand Up @@ -34,6 +34,7 @@
#include "log.hpp"
#include "map.hpp"
#include "marked-up_text.hpp"
#include "resources.hpp"
#include "sound.hpp"
#include "unit.hpp"
#include "unit_helper.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/leader_scroll_dialog.cpp
Expand Up @@ -25,6 +25,7 @@
//#include "display.hpp"
//#include "gettext.hpp"
#include "marked-up_text.hpp"
#include "resources.hpp"
//
//#include <boost/foreach.hpp>

Expand Down
1 change: 1 addition & 0 deletions src/minimap.cpp
Expand Up @@ -21,6 +21,7 @@
#include "image.hpp"
#include "log.hpp"
#include "map.hpp"
#include "resources.hpp"
#include "sdl/utils.hpp"

#include "team.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/mp_game_utils.cpp
Expand Up @@ -23,6 +23,7 @@
#include "log.hpp"
#include "mp_options.hpp"
#include "replay.hpp"
#include "resources.hpp"
#include "savegame.hpp"
#include "tod_manager.hpp"
#include "unit_id.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/multiplayer.cpp
Expand Up @@ -37,6 +37,7 @@
#include "multiplayer_lobby.hpp"
#include "playcampaign.hpp"
#include "playmp_controller.hpp"
#include "resources.hpp"
#include "settings.hpp"
#include "sound.hpp"
#include "unit_id.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/multiplayer_connect_engine.cpp
Expand Up @@ -21,6 +21,7 @@
#include "map.hpp"
#include "multiplayer_ui.hpp"
#include "mp_game_utils.hpp"
#include "resources.hpp"
#include "tod_manager.hpp"

#include <boost/foreach.hpp>
Expand Down
1 change: 1 addition & 0 deletions src/multiplayer_create_engine.cpp
Expand Up @@ -22,6 +22,7 @@
#include "generators/map_create.hpp"
#include "map_exception.hpp"
#include "minimap.hpp"
#include "resources.hpp"
#include "saved_game.hpp"
#include "wml_separators.hpp"
#include "wml_exception.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/multiplayer_wait.cpp
Expand Up @@ -24,6 +24,7 @@
#include "marked-up_text.hpp"
#include "mp_game_utils.hpp"
#include "multiplayer_wait.hpp"
#include "resources.hpp"
#include "statistics.hpp"
#include "saved_game.hpp"
#include "sound.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/unit.cpp
Expand Up @@ -34,6 +34,7 @@
#include "terrain_filter.hpp"
#include "formula_string_utils.hpp"
#include "random_new.hpp"
#include "resources.hpp"
#include "scripting/lua.hpp"
#include "side_filter.hpp"
#include "play_controller.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/unit.hpp
Expand Up @@ -21,14 +21,14 @@
#include <boost/scoped_ptr.hpp>

#include "formula_callable.hpp"
#include "resources.hpp"
#include "unit_animation.hpp"
#include "unit_types.hpp"
#include "unit_map.hpp"

class display;
class vconfig;
class gamemap;
class team;
class vconfig;

/// The things contained within a unit_ability_list.
typedef std::pair<const config *, map_location> unit_ability;
Expand Down

0 comments on commit 1796b4d

Please sign in to comment.