Convert include guards to the shorter #pragma once

Turns out I mistook @celticminstrel's opinion that we should use include guards over pragma (737916e).
Since all major compilers support `#pragma once`, there's no reason not to use it.

For future mergability reasons, this excludes src/spirit_po and src/xBRZ. It also excludes src/boost-patched.
This commit is contained in:
Charles Dang 2017-05-09 19:41:37 +11:00
parent 737916eaab
commit 2101353d36
571 changed files with 616 additions and 2334 deletions

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef ABOUT_H_INCLUDED
#define ABOUT_H_INCLUDED
#pragma once
class config;
@ -36,5 +35,3 @@ std::vector<std::string> get_background_images(const std::string& campaign);
void set_about(const config& cfg);
}
#endif

View file

@ -19,8 +19,7 @@
* result of combat.
*/
#ifndef ACTIONS_ATTACK_H_INCLUDED
#define ACTIONS_ATTACK_H_INCLUDED
#pragma once
struct combatant;
struct map_location;
@ -239,5 +238,3 @@ int generic_combat_modifier(int lawful_bonus, unit_type::ALIGNMENT alignment,
bool backstab_check(const map_location& attacker_loc,
const map_location& defender_loc,
const unit_map& units, const std::vector<team>& teams);
#endif

View file

@ -18,8 +18,7 @@
* and placed units).
*/
#ifndef ACTIONS_CREATE_H_INCLUDED
#define ACTIONS_CREATE_H_INCLUDED
#pragma once
class config;
class team;
@ -177,5 +176,3 @@ bool recall_unit(const std::string & id, team & current_team,
const map_location & loc, const map_location & from,
bool show=true, bool use_undo=true);
}//namespace actions
#endif

View file

@ -17,13 +17,10 @@
* Various functions that implement healing of units (when a side turn starts).
*/
#ifndef ACTIONS_HEAL_H_INCLUDED
#define ACTIONS_HEAL_H_INCLUDED
#pragma once
/**
* Calculates healing for all units for the given side.
* Should be called at the beginning of a side's turn.
*/
void calculate_healing(int side, bool update_display);
#endif

View file

@ -17,8 +17,7 @@
* Various functions related to moving units.
*/
#ifndef ACTIONS_MOVE_H_INCLUDED
#define ACTIONS_MOVE_H_INCLUDED
#pragma once
struct map_location;
class replay;
@ -116,6 +115,3 @@ size_t move_unit_from_replay(const std::vector<map_location> &steps,
bool show_move = true);
}//namespace actions
#endif

View file

@ -17,8 +17,7 @@
* Various functions that implement the undoing (and redoing) of in-game commands.
*/
#ifndef ACTIONS_UNDO_H_INCLUDED
#define ACTIONS_UNDO_H_INCLUDED
#pragma once
#include "vision.hpp"
#include "map/location.hpp"
@ -117,5 +116,3 @@ private: // data
}//namespace actions
#endif

View file

@ -17,8 +17,7 @@
* Various functions implementing vision (through fog of war and shroud).
*/
#ifndef ACTIONS_VISION_H_INCLUDED
#define ACTIONS_VISION_H_INCLUDED
#pragma once
#include "movetype.hpp"
@ -58,7 +57,8 @@ class shroud_clearer {
public:
shroud_clearer(const shroud_clearer&) = delete;
shroud_clearer& operator=(const shroud_clearer&) = delete;
shroud_clearer();
shroud_clearer();
~shroud_clearer();
/// Function to be called if units have moved or otherwise changed.
@ -155,5 +155,3 @@ bool clear_shroud(int side, bool reset_fog = false, bool fire_events = true);
}//namespace actions
#endif

View file

@ -13,8 +13,7 @@
See the COPYING file for more details.
*/
#ifndef ADDON_CLIENT_HPP_INCLUDED
#define ADDON_CLIENT_HPP_INCLUDED
#pragma once
#include "addon/info.hpp"
#include "gui/dialogs/network_transmission.hpp"
@ -204,7 +203,3 @@ private:
bool update_last_error(config& response_cfg);
};
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef ADDON_INFO_HPP_INCLUDED
#define ADDON_INFO_HPP_INCLUDED
#pragma once
#include "version.hpp"
@ -187,5 +186,3 @@ std::string size_display_string(double size);
* somehow.
*/
std::string make_addon_title(const std::string& id);
#endif

View file

@ -13,8 +13,7 @@
See the COPYING file for more details.
*/
#ifndef ADDON_MANAGER_HPP_INCLUDED
#define ADDON_MANAGER_HPP_INCLUDED
#pragma once
class config;
class version_info;
@ -114,5 +113,3 @@ void refresh_addon_version_info_cache();
/** Returns a particular installed add-on's version information. */
version_info get_addon_version_info(const std::string& addon);
#endif /* !ADDON_MANAGEMENT_HPP_INCLUDED */

View file

@ -13,8 +13,7 @@
See the COPYING file for more details.
*/
#ifndef ADDON_MANAGER_UI_HPP_INCLUDED
#define ADDON_MANAGER_UI_HPP_INCLUDED
#pragma once
#include <string>
#include <vector>
@ -42,5 +41,3 @@ bool manage_addons(CVideo& v);
* @return @a true when we successfully installed the target (possibly the user chose to ignore failures)
*/
bool ad_hoc_addon_fetch_session(CVideo& v, const std::vector<std::string>& addon_ids);
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef ADDON_STATE_HPP_INCLUDED
#define ADDON_STATE_HPP_INCLUDED
#pragma once
#include "addon/info.hpp"
#include <map>
@ -105,5 +104,3 @@ enum ADDON_SORT_DIRECTION {
DIRECTION_ASCENDING, /**< Ascending sort. */
DIRECTION_DESCENDING /**< Descending sort. */
};
#endif

View file

@ -13,8 +13,7 @@
See the COPYING file for more details.
*/
#ifndef ADDON_VALIDATION_HPP_INCLUDED
#define ADDON_VALIDATION_HPP_INCLUDED
#pragma once
#include <vector>
#include <string>
@ -70,5 +69,3 @@ bool check_names_legal(const config& dir);
std::string encode_binary(const std::string& str);
std::string unencode_binary(const std::string& str);
bool needs_escaping(char c);
#endif /* !ADDON_CHECKS_HPP_INCLUDED */

View file

@ -17,8 +17,7 @@
* @file
* */
#ifndef AI_ACTIONS_HPP_INCLUDED
#define AI_ACTIONS_HPP_INCLUDED
#pragma once
#include "ai/game_info.hpp"
@ -462,4 +461,3 @@ std::ostream &operator<<(std::ostream &s, ai::recruit_result const &r);
std::ostream &operator<<(std::ostream &s, ai::stopunit_result const &r);
std::ostream &operator<<(std::ostream &s, ai::synced_command_result const &r);
#endif

View file

@ -17,8 +17,7 @@
* Composite AI with turn sequence which is a vector of stages
*/
#ifndef AI_COMPOSITE_AI_HPP_INCLUDED
#define AI_COMPOSITE_AI_HPP_INCLUDED
#pragma once
#include "ai/composite/contexts.hpp"
#include "ai/composite/component.hpp"
@ -136,5 +135,3 @@ protected:
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View file

@ -16,8 +16,7 @@
* @file
*/
#ifndef AI_COMPOSITE_ASPECT_HPP_INCLUDED
#define AI_COMPOSITE_ASPECT_HPP_INCLUDED
#pragma once
#include "ai/composite/property_handler.hpp"
#include "ai/composite/value_translator.hpp"
@ -565,5 +564,3 @@ public:
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View file

@ -17,8 +17,7 @@
* A component of the AI framework
*/
#ifndef AI_COMPOSITE_COMPONENT_HPP_INCLUDED
#define AI_COMPOSITE_COMPONENT_HPP_INCLUDED
#pragma once
class config;
@ -97,5 +96,3 @@ std::ostream &operator<<(std::ostream &o, const ai::path_element &e);
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View file

@ -18,8 +18,7 @@
* Composite AI contexts
*/
#ifndef AI_COMPOSITE_CONTEXTS_HPP_INCLUDED
#define AI_COMPOSITE_CONTEXTS_HPP_INCLUDED
#pragma once
#include "ai/default/contexts.hpp"
@ -161,6 +160,3 @@ private:
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View file

@ -18,8 +18,7 @@
* @file
*/
#ifndef AI_COMPOSITE_ENGINE_HPP_INCLUDED
#define AI_COMPOSITE_ENGINE_HPP_INCLUDED
#pragma once
#include "ai/composite/component.hpp"
#include "ai/contexts.hpp"
@ -171,5 +170,3 @@ public:
};
} //end of namespace ai
#endif

View file

@ -16,9 +16,7 @@
* @file
*/
#ifndef AI_COMPOSITE_GOAL_HPP_INCLUDED
#define AI_COMPOSITE_GOAL_HPP_INCLUDED
#pragma once
#ifdef _MSC_VER
#pragma warning(push)
@ -227,5 +225,3 @@ public:
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View file

@ -17,9 +17,7 @@
* @file
*/
#ifndef AI_COMPOSITE_PROPERTY_HANDLER_HPP_INCLUDED
#define AI_COMPOSITE_PROPERTY_HANDLER_HPP_INCLUDED
#pragma once
#include "utils/functional.hpp"
#include "config.hpp"
@ -313,5 +311,3 @@ static inline void register_aspect_property(property_handler_map& property_handl
}
} //of namespace ai
#endif

View file

@ -17,8 +17,7 @@
* candidate action framework
*/
#ifndef AI_COMPOSITE_RCA_HPP_INCLUDED
#define AI_COMPOSITE_RCA_HPP_INCLUDED
#pragma once
#include "ai/composite/component.hpp"
#include "ai/composite/contexts.hpp"
@ -201,5 +200,3 @@ std::ostream &operator<<(std::ostream &s, ai::candidate_action const &ca);
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View file

@ -17,8 +17,7 @@
* Composite AI stages
*/
#ifndef AI_COMPOSITE_STAGE_HPP_INCLUDED
#define AI_COMPOSITE_STAGE_HPP_INCLUDED
#pragma once
#include "ai/composite/component.hpp"
#include "ai/composite/contexts.hpp"
@ -148,5 +147,3 @@ public:
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View file

@ -16,8 +16,7 @@
* @file
*/
#ifndef VALUE_TRANSLATOR_HPP_INCLUDED
#define VALUE_TRANSLATOR_HPP_INCLUDED
#pragma once
#include "ai/composite/engine.hpp"
#include "ai/composite/stage.hpp"
@ -393,5 +392,3 @@ public:
}
};
} //end of namespace ai
#endif

View file

@ -17,8 +17,7 @@
* @file
* */
#ifndef AI_CONFIGURATION_HPP_INCLUDED
#define AI_CONFIGURATION_HPP_INCLUDED
#pragma once
#include "config.hpp"
#include "ai/game_info.hpp"
@ -125,4 +124,3 @@ private:
};
} //end of namespace ai
#endif

View file

@ -18,8 +18,7 @@
* this is part of AI interface
*/
#ifndef AI_CONTEXTS_HPP_INCLUDED
#define AI_CONTEXTS_HPP_INCLUDED
#pragma once
#include "ai/game_info.hpp" // for move_map, aspect_type, etc
@ -1684,5 +1683,3 @@ private:
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View file

@ -17,8 +17,7 @@
* @file
*/
#ifndef AI_TESTING_ASPECT_ATTACKS_HPP_INCLUDED
#define AI_TESTING_ASPECT_ATTACKS_HPP_INCLUDED
#pragma once
#include "ai/composite/aspect.hpp"
#include "units/filter.hpp"
@ -105,5 +104,3 @@ private:
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View file

@ -18,8 +18,7 @@
* @file
*/
#ifndef AI_TESTING_CA_HPP_INCLUDED
#define AI_TESTING_CA_HPP_INCLUDED
#pragma once
#include "units/map.hpp"
@ -276,5 +275,3 @@ public:
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View file

@ -17,8 +17,7 @@
* Strategic movement routine, for experimentation
*/
#ifndef AI_TESTING_CA_TESTING_MOVE_TO_TARGETS_HPP_INCLUDED
#define AI_TESTING_CA_TESTING_MOVE_TO_TARGETS_HPP_INCLUDED
#pragma once
#include "ai/composite/rca.hpp"
@ -86,5 +85,3 @@ protected:
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View file

@ -17,8 +17,7 @@
* Default AI contexts
*/
#ifndef AI_DEFAULT_CONTEXTS_HPP_INCLUDED
#define AI_DEFAULT_CONTEXTS_HPP_INCLUDED
#pragma once
#include "ai/contexts.hpp"
#include "formula/callable.hpp"
@ -303,6 +302,3 @@ private:
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View file

@ -17,8 +17,7 @@
* @file
*/
#ifndef AI_COMPOSITE_ENGINE_DEFAULT_HPP_INCLUDED
#define AI_COMPOSITE_ENGINE_DEFAULT_HPP_INCLUDED
#pragma once
#include "ai/composite/engine.hpp"
@ -49,5 +48,3 @@ public:
};
} //end of namespace ai
#endif

View file

@ -18,8 +18,7 @@
* See http://wiki.wesnoth.org/AI_Recruitment
*/
#ifndef AI_DEFAULT_RECRUITMENT_HPP_INCLUDED
#define AI_DEFAULT_RECRUITMENT_HPP_INCLUDED
#pragma once
#include "ai/composite/aspect.hpp"
#include "ai/composite/rca.hpp"
@ -294,5 +293,3 @@ private:
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View file

@ -17,8 +17,7 @@
* candidate action evaluator
*/
#ifndef AI_TESTING_STAGE_RCA_HPP_INCLUDED
#define AI_TESTING_STAGE_RCA_HPP_INCLUDED
#pragma once
#include "ai/composite/rca.hpp"
#include "ai/composite/stage.hpp"
@ -63,5 +62,3 @@ private:
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View file

@ -17,9 +17,7 @@
* Defines formula ai
* */
#ifndef AI_FORMULA_AI_HPP_INCLUDED
#define AI_FORMULA_AI_HPP_INCLUDED
#pragma once
#include "ai/contexts.hpp"
#include "ai/formula/function_table.hpp" // for ai_function_symbol_table
@ -181,5 +179,3 @@ private:
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef FORMULA_AI_CALLABLE_OBJECTS_HPP_INCLUDED
#define FORMULA_AI_CALLABLE_OBJECTS_HPP_INCLUDED
#pragma once
#include "ai/game_info.hpp"
#include "actions/attack.hpp"
@ -256,6 +255,3 @@ public:
};
}
#endif /* FORMULA_AI_CALLABLE_OBJECTS_HPP_INCLUDED */

View file

@ -17,8 +17,7 @@
* Defines formula ai candidate actions - headers
* */
#ifndef AI_FORMULA_CANDIDATES_HPP_INCLUDED
#define AI_FORMULA_CANDIDATES_HPP_INCLUDED
#pragma once
#include <set>
@ -105,6 +104,3 @@ protected:
};
}
#endif /* AI_FORMULA_CANDIDATES_HPP_INCLUDED */

View file

@ -17,8 +17,7 @@
* @file
*/
#ifndef AI_COMPOSITE_ENGINE_FAI_HPP_INCLUDED
#define AI_COMPOSITE_ENGINE_FAI_HPP_INCLUDED
#pragma once
#include "ai/composite/engine.hpp"
#include "ai/default/contexts.hpp"
@ -48,5 +47,3 @@ private:
};
} //end of namespace ai
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef FORMULA_AI_FUNCTION_TABLE_HPP_INCLUDED
#define FORMULA_AI_FUNCTION_TABLE_HPP_INCLUDED
#pragma once
#include "formula/function.hpp"
@ -32,6 +31,3 @@ public:
};
}
#endif /* FORMULA_AI_FUNCTION_TABLE_HPP_INCLUDED */

View file

@ -17,9 +17,7 @@
* Stage which executes side formulas
* */
#ifndef AI_FORMULA_STAGE_SIDE_FORMULAS_HPP_INCLUDED
#define AI_FORMULA_STAGE_SIDE_FORMULAS_HPP_INCLUDED
#pragma once
#include "ai/composite/stage.hpp"
#include "formula/formula_fwd.hpp"
@ -58,5 +56,3 @@ private:
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View file

@ -17,9 +17,7 @@
* Stage which executes unit formulas
* */
#ifndef AI_FORMULA_STAGE_UNIT_FORMULAS_HPP_INCLUDED
#define AI_FORMULA_STAGE_UNIT_FORMULAS_HPP_INCLUDED
#pragma once
#include "ai/composite/stage.hpp"
@ -56,5 +54,3 @@ private:
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View file

@ -17,8 +17,7 @@
* Game information for the AI
*/
#ifndef AI_GAME_INFO_HPP_INCLUDED
#define AI_GAME_INFO_HPP_INCLUDED
#pragma once
#include "map/location.hpp"
namespace pathfind {
@ -125,5 +124,3 @@ public:
};
} //of namespace ai
#endif

View file

@ -17,8 +17,7 @@
* A helper class to observe the game state
*/
#ifndef AI_GAMESTATE_OBSERVER_HPP_INCLUDED
#define AI_GAMESTATE_OBSERVER_HPP_INCLUDED
#pragma once
#include "generic_event.hpp"
@ -55,5 +54,3 @@ private:
};
} //of namespace ai
#endif

View file

@ -19,8 +19,7 @@
* @todo 1.9 AI Interface command to clear the history.
*/
#ifndef AI_MANAGER_HPP_INCLUDED
#define AI_MANAGER_HPP_INCLUDED
#pragma once
#include "config.hpp" // for config, etc
#include "ai/game_info.hpp" // for side_number, ai_ptr
@ -537,5 +536,3 @@ private:
};
} //end of namespace ai
#endif

View file

@ -17,8 +17,7 @@
* All known AI parts
*/
#ifndef AI_REGISTRY_HPP_INCLUDED
#define AI_REGISTRY_HPP_INCLUDED
#pragma once
namespace ai {
namespace registry {
@ -27,5 +26,3 @@ void init();
}
} //end of namespace ai
#endif

View file

@ -17,8 +17,7 @@
* @file
*/
#ifndef AI_SIMULATED_ACTIONS_HPP_INCLUDED
#define AI_SIMULATED_ACTIONS_HPP_INCLUDED
#pragma once
#include "ai/game_info.hpp"
@ -41,5 +40,3 @@ bool simulated_stopunit(const map_location& unit_location, bool remove_movement,
bool simulated_synced_command();
}
#endif

View file

@ -17,8 +17,7 @@
* Gather statistics important for AI testing and output them
*/
#ifndef AI_TESTING_HPP_INCLUDED
#define AI_TESTING_HPP_INCLUDED
#pragma once
#include <vector>
@ -64,5 +63,3 @@ protected:
static void log_turn( const char *msg, unsigned int side );
};
#endif

View file

@ -17,8 +17,7 @@
* Animate units.
*/
#ifndef ANIMATED_IMAGE_H_INCLUDED
#define ANIMATED_IMAGE_H_INCLUDED
#pragma once
#include <string>
#include <map>
@ -134,6 +133,3 @@ private:
};
#include "animated.tpp"
#endif

View file

@ -17,8 +17,7 @@
* Arrows destined to be drawn on the map. Created for the whiteboard project.
*/
#ifndef ARROW_HPP_INCLUDED
#define ARROW_HPP_INCLUDED
#pragma once
#include "display.hpp"
@ -105,4 +104,3 @@ protected:
bool hidden_;
};
#endif

View file

@ -14,8 +14,7 @@
/** @file */
#ifndef ATTACK_PREDICTION_H_INCLUDED
#define ATTACK_PREDICTION_H_INCLUDED
#pragma once
#include <vector>
#include <array>
@ -69,5 +68,3 @@ private:
* Invariant: summary[1].size() == summary[0].size() or summary[1].empty() */
std::array<std::vector<double>, 2> summary;
};
#endif

View file

@ -17,8 +17,7 @@
* Helper class for buffering a @c std::istream.
*/
#ifndef BUFFERED_ISTREAM_HPP_INCLUDED
#define BUFFERED_ISTREAM_HPP_INCLUDED
#pragma once
#include "utils/general.hpp"
@ -172,5 +171,3 @@ private:
}
}
};
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef BUILD_CONFIG_HPP_INCLUDED
#define BUILD_CONFIG_HPP_INCLUDED
#pragma once
#include <string>
#include <vector>
@ -77,5 +76,3 @@ const std::string& library_name(LIBRARY_ID lib);
std::string library_versions_report();
} // end namespace game_config
#endif

View file

@ -13,8 +13,7 @@
See the COPYING file for more details.
*/
#ifndef CAMPAIGN_SERVER_ADDON_UTILS_HPP_INCLUDED
#define CAMPAIGN_SERVER_ADDON_UTILS_HPP_INCLUDED
#pragma once
#include <string>
@ -80,5 +79,3 @@ void find_translations(const config& base_dir, config& addon);
void add_license(config& cfg);
}
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef CAMPAIGN_SERVER_BLACKLIST_HPP_INCLUDED
#define CAMPAIGN_SERVER_BLACKLIST_HPP_INCLUDED
#pragma once
#include "config.hpp"
@ -97,5 +96,3 @@ private:
};
}
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef CAMPAIGN_SERVER_HPP_INCLUDED
#define CAMPAIGN_SERVER_HPP_INCLUDED
#pragma once
#include "campaign_server/blacklist.hpp"
#include "server/server_base.hpp"
@ -188,5 +187,3 @@ private:
};
} // end namespace campaignd
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef CAMPAIGN_SERVER_CONTROL_HPP_INCLUDED
#define CAMPAIGN_SERVER_CONTROL_HPP_INCLUDED
#pragma once
#include "serialization/string_utils.hpp"
@ -118,5 +117,3 @@ private:
};
} // end namespace campaignd
#endif // CAMPAIGN_SERVER_CONTROL_HPP_INCLUDED

View file

@ -11,8 +11,7 @@
See the COPYING file for more details.
*/
#ifndef CARRYOVER_H_INCLUDED
#define CARRYOVER_H_INCLUDED
#pragma once
class team;
class config;
@ -106,6 +105,3 @@ private:
std::string next_scenario_; /**< the scenario coming next (for campaigns) */
int next_underlying_unit_id_;
};
#endif

View file

@ -13,8 +13,7 @@
See the COPYING file for more details.
*/
#ifndef CHAT_EVENTS_H_INCLUDED
#define CHAT_EVENTS_H_INCLUDED
#pragma once
class config;
#include <ctime>
@ -68,4 +67,3 @@ protected:
};
}
#endif

View file

@ -11,8 +11,7 @@
See the COPYING file for more details.
*/
#ifndef COLOR_T_HPP_INCLUDED
#define COLOR_T_HPP_INCLUDED
#pragma once
#include <algorithm> // for max
#include <cstdint>
@ -257,5 +256,3 @@ namespace std
}
};
}
#endif

View file

@ -14,8 +14,7 @@
/** @file */
#ifndef COLOR_RANGE_H_INCLUDED
#define COLOR_RANGE_H_INCLUDED
#pragma once
#include "color.hpp"
@ -134,5 +133,3 @@ std::vector<color_t> palette(const color_range& cr);
* are the result of applying the color range conversion on it.
*/
color_range_map recolor_range(const color_range& new_rgb, const std::vector<color_t>& old_rgb);
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef COMMANDLINE_OPTIONS_HPP_INCLUDED
#define COMMANDLINE_OPTIONS_HPP_INCLUDED
#pragma once
#include <boost/optional.hpp> // for optional
#include <boost/program_options/options_description.hpp>
@ -226,5 +225,3 @@ private:
boost::program_options::options_description visible_;
boost::program_options::options_description hidden_;
};
#endif

View file

@ -25,8 +25,7 @@
* game.
*/
#ifndef CONFIG_HPP_INCLUDED
#define CONFIG_HPP_INCLUDED
#pragma once
#include "global.hpp"
@ -913,5 +912,3 @@ public:
inline std::ostream &operator<<(std::ostream &os, const config::attribute_value::true_false &v) { return os << v.str(); }
inline std::ostream &operator<<(std::ostream &os, const config::attribute_value::yes_no &v) { return os << v.str(); }
#endif

View file

@ -11,8 +11,8 @@
See the COPYING file for more details.
*/
#ifndef CONFIG_ASSIGN_H_INCLUDED
#define CONFIG_ASSIGN_H_INCLUDED
#pragma once
#include <string>
#include "config.hpp"
@ -57,4 +57,3 @@ public:
private:
config data_;
};
#endif

View file

@ -17,8 +17,7 @@
* to speed up startup
***/
#ifndef CONFIG_CACHE_HPP_INCLUDED
#define CONFIG_CACHE_HPP_INCLUDED
#pragma once
#include <cassert>
#include <list>
@ -279,4 +278,3 @@ class fake_transaction
};
}
#endif

View file

@ -13,8 +13,7 @@
See the COPYING file for more details.
*/
#ifndef CONSTRUCT_DIALOG_H_INCLUDED
#define CONSTRUCT_DIALOG_H_INCLUDED
#pragma once
#include "show_dialog.hpp"
@ -83,4 +82,3 @@ private:
};
} //end namespace gui
#endif

View file

@ -33,8 +33,7 @@
* and provide some accessors needed for event handling.
*/
#ifndef CONTROLLER_BASE_H_INCLUDED
#define CONTROLLER_BASE_H_INCLUDED
#pragma once
#include "events.hpp"
#include "hotkey/hotkey_command.hpp"
@ -153,6 +152,3 @@ protected:
bool scroll_right_;
joystick_manager joystick_manager_;
};
#endif

View file

@ -14,8 +14,7 @@
/** @file */
#ifndef CURSOR_HPP_INCLUDED
#define CURSOR_HPP_INCLUDED
#pragma once
class surface;
@ -54,5 +53,3 @@ private:
};
} // end namespace cursor
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef APPLE_NOTIFICATION_HPP_
#define APPLE_NOTIFICATION_HPP_
#pragma once
#include <string>
@ -22,5 +21,3 @@
namespace apple_notifications {
void send_notification(const std::string& owner, const std::string& message, const desktop::notifications::type note_type);
}
#endif

View file

@ -14,8 +14,7 @@
/** @file */
#ifndef CLIPBOARD_HPP_INCLUDED
#define CLIPBOARD_HPP_INCLUDED
#pragma once
#include <string>
@ -54,5 +53,3 @@ bool available();
} // end namespace clipboard
} // end namespace desktop
#endif

View file

@ -12,13 +12,10 @@
See the COPYING file for more details.
*/
#ifndef DBUS_NOTIFICATION_HPP_
#define DBUS_NOTIFICATION_HPP_
#pragma once
#include <string>
namespace dbus {
void send_notification(const std::string& owner, const std::string& message, bool with_history);
}
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef NOTIFICATIONS_NOTIFICATIONS_HPP_INCLUDED
#define NOTIFICATIONS_NOTIFICATIONS_HPP_INCLUDED
#pragma once
#include <string>
@ -44,5 +43,3 @@ namespace notifications
}
}
#endif

View file

@ -17,8 +17,7 @@
* Desktop environment interaction functions.
*/
#ifndef DESKTOP_OPEN_HPP_INCLUDED
#define DESKTOP_OPEN_HPP_INCLUDED
#pragma once
#include <string>
@ -54,5 +53,3 @@ bool open_object(const std::string& path_or_url);
bool open_object_is_supported();
}
#endif

View file

@ -17,8 +17,7 @@
* Desktop paths, storage media and bookmark functions.
*/
#ifndef DESKTOP_PATHS_HPP_INCLUDED
#define DESKTOP_PATHS_HPP_INCLUDED
#pragma once
#include "tstring.hpp"
@ -103,5 +102,3 @@ void remove_user_bookmark(unsigned index);
std::vector<bookmark_info> user_bookmarks();
} // namespace desktop
#endif

View file

@ -17,8 +17,7 @@
* Platform identification and version information functions.
*/
#ifndef DESKTOP_VERSION_HPP_INCLUDED
#define DESKTOP_VERSION_HPP_INCLUDED
#pragma once
#include <string>
@ -36,5 +35,3 @@ namespace desktop
std::string os_version();
}
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef WINDOWS_TRAY_NOTIFICATION_HPP_INCLUDED
#define WINDOWS_TRAY_NOTIFICATION_HPP_INCLUDED
#pragma once
#include <SDL.h>
#include <string>
@ -81,5 +80,3 @@ private:
windows_tray_notification(const windows_tray_notification& w);
windows_tray_notification& operator=(const windows_tray_notification& w);
};
#endif // WINDOWS_TRAY_NOTIFICATION_HPP_INCLUDED

View file

@ -30,8 +30,7 @@
* for the current unit.
*/
#ifndef DISPLAY_H_INCLUDED
#define DISPLAY_H_INCLUDED
#pragma once
class config;
class fake_unit_manager;
@ -1068,7 +1067,3 @@ private:
display& display_;
bool blind;
};
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef INCL_DISPLAY_CHAT_MGR_HPP_
#define INCL_DISPLAY_CHAT_MGR_HPP_
#pragma once
#include "chat_events.hpp"
@ -61,5 +60,3 @@ private:
display & my_disp_;
};
#endif

View file

@ -19,8 +19,7 @@
*
**/
#ifndef DISPLAY_CONTEXT_HPP_INCLUDED
#define DISPLAY_CONTEXT_HPP_INCLUDED
#pragma once
#include <string>
#include <vector>
@ -111,6 +110,3 @@ public:
virtual ~display_context() {}
};
#endif

View file

@ -23,8 +23,7 @@
* need to ensure the pointer is deleted.
*/
#ifndef EDITOR_ACTION_HPP
#define EDITOR_ACTION_HPP
#pragma once
#include "editor/action/action_base.hpp"
#include "editor/map/map_fragment.hpp"
@ -366,5 +365,3 @@ class editor_action_shuffle_area : public editor_action_area
} //end namespace editor
#endif

View file

@ -24,8 +24,7 @@
* include this header file.
*/
#ifndef EDITOR_ACTION_BASE_HPP_INCLUDED
#define EDITOR_ACTION_BASE_HPP_INCLUDED
#pragma once
#include "editor/editor_common.hpp"
@ -110,5 +109,3 @@ struct editor_action_exception : public editor_exception
};
} //end namespace editor
#endif

View file

@ -23,8 +23,7 @@
* need to ensure the pointer is deleted.
*/
#ifndef EDITOR_ACTION_ITEM_HPP
#define EDITOR_ACTION_ITEM_HPP
#pragma once
#include "editor/action/action.hpp"
#include "overlay.hpp"
@ -104,5 +103,3 @@ protected:
} //end namespace editor
#endif

View file

@ -23,8 +23,7 @@
* need to ensure the pointer is deleted.
*/
#ifndef EDITOR_ACTION_LABEL_HPP
#define EDITOR_ACTION_LABEL_HPP
#pragma once
#include "editor/action/action.hpp"
@ -74,5 +73,3 @@ class editor_action_label_delete : public editor_action_location
};
} //end namespace editor
#endif

View file

@ -23,8 +23,7 @@
* need to ensure the pointer is deleted.
*/
#ifndef EDITOR_ACTION_SELECT_HPP
#define EDITOR_ACTION_SELECT_HPP
#pragma once
#include "editor/action/action.hpp"
@ -112,5 +111,3 @@ class editor_action_select_inverse : public editor_action
} //end namespace editor
#endif

View file

@ -23,8 +23,7 @@
* need to ensure the pointer is deleted.
*/
#ifndef EDITOR_ACTION_UNIT_HPP
#define EDITOR_ACTION_UNIT_HPP
#pragma once
#include "editor/action/action.hpp"
@ -101,5 +100,3 @@ protected:
} //end namespace editor
#endif

View file

@ -23,8 +23,7 @@
* need to ensure the pointer is deleted.
*/
#ifndef EDITOR_ACTION_VILLAGE_HPP
#define EDITOR_ACTION_VILLAGE_HPP
#pragma once
#include "editor/action/action.hpp"
@ -67,5 +66,3 @@ class editor_action_village_delete : public editor_action_location
} //end namespace editor
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef EDITOR_MOUSE_ACTION_HPP
#define EDITOR_MOUSE_ACTION_HPP
#pragma once
#include "editor/action/action_base.hpp"
#include "editor/map/editor_map.hpp"
@ -397,5 +396,3 @@ private:
} //end namespace editor
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef EDITOR_MOUSE_ACTION_ITEM_HPP
#define EDITOR_MOUSE_ACTION_ITEM_HPP
#pragma once
#include "editor/action/mouse/mouse_action.hpp"
#include "editor/palette/item_palette.hpp"
@ -76,5 +75,3 @@ private:
} //end namespace editor
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef EDITOR_MOUSE_ACTION_MAP_LABEL_HPP
#define EDITOR_MOUSE_ACTION_MAP_LABEL_HPP
#pragma once
#include "mouse_action.hpp"
#include "editor/palette/empty_palette.hpp"
@ -62,5 +61,3 @@ private:
};
} //end namespace editor
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef EDITOR_MOUSE_ACTION_SELECT_HPP
#define EDITOR_MOUSE_ACTION_SELECT_HPP
#pragma once
#include "editor/action/mouse/mouse_action.hpp"
@ -67,5 +66,3 @@ public:
};
} //end namespace editor
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef EDITOR_MOUSE_ACTION_UNIT_HPP
#define EDITOR_MOUSE_ACTION_UNIT_HPP
#pragma once
#include "editor/action/mouse/mouse_action.hpp"
#include "editor/palette/unit_palette.hpp"
@ -76,5 +75,3 @@ private:
} //end namespace editor
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef EDITOR_MOUSE_ACTION_VILLAGE_HPP
#define EDITOR_MOUSE_ACTION_VILLAGE_HPP
#pragma once
#include "editor/action/mouse/mouse_action.hpp"
@ -59,5 +58,3 @@ public:
} //end namespace editor
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef EDITOR_EDITOR_CONTROLLER_HPP_INCLUDED
#define EDITOR_EDITOR_CONTROLLER_HPP_INCLUDED
#pragma once
#include "editor/editor_display.hpp"
#include "editor/editor_main.hpp"
@ -262,5 +261,3 @@ class editor_controller : public controller_base,
};
} //end namespace editor
#endif

View file

@ -18,8 +18,7 @@
* logging macro definitions and base exception declarations
*/
#ifndef EDITOR_EDITOR_COMMON_HPP_INCLUDED
#define EDITOR_EDITOR_COMMON_HPP_INCLUDED
#pragma once
#include "exceptions.hpp"
#include "log.hpp"
@ -64,5 +63,3 @@ class map_fragment;
class mouse_action;
} //end namespace editor
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef EDITOR_EDITOR_DISPLAY_HPP_INCLUDED
#define EDITOR_EDITOR_DISPLAY_HPP_INCLUDED
#pragma once
#include "map/editor_map.hpp"
#include "display.hpp"
@ -66,4 +65,3 @@ protected:
};
} //end namespace editor
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef EDITOR_EDITOR_MAIN_H_INCLUDED
#define EDITOR_EDITOR_MAIN_H_INCLUDED
#pragma once
#include <string>
@ -38,5 +37,3 @@ enum EXIT_STATUS {
EXIT_STATUS start(const config& game_config, CVideo& video, const std::string& filename = "", bool take_screenshot = false, const std::string& screenshot_filename = "map_screenshot.bmp");
} //end namespace editor
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef CONTEXT_MANAGER_HPP_INCLUDED
#define CONTEXT_MANAGER_HPP_INCLUDED
#pragma once
#include "editor/map/map_context.hpp"
#include "preferences/editor.hpp"
@ -322,5 +321,3 @@ private:
};
}
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef EDITOR_EDITOR_MAP_HPP_INCLUDED
#define EDITOR_EDITOR_MAP_HPP_INCLUDED
#pragma once
#include "editor/editor_common.hpp"
@ -207,5 +206,3 @@ protected:
} //end namespace editor
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef EDITOR_MAP_CONTEXT_HPP_INCLUDED
#define EDITOR_MAP_CONTEXT_HPP_INCLUDED
#pragma once
#include "editor/map/editor_map.hpp"
#include "game_classification.hpp"
@ -516,5 +515,3 @@ public:
} //end namespace editor
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef EDITOR_MAP_FRAGMENT_HPP_INCLUDED
#define EDITOR_MAP_FRAGMENT_HPP_INCLUDED
#pragma once
#include "editor/map/editor_map.hpp"
@ -138,5 +137,3 @@ class map_fragment
};
} //end namespace editor
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef COMMON_PALETTES_H_INCLUDED
#define COMMON_PALETTES_H_INCLUDED
#pragma once
#include "config.hpp"
#include "tstring.hpp"
@ -101,5 +100,3 @@ public:
};
}
#endif

View file

@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
#ifndef EDITOR_PALETTES_H_INCLUDED
#define EDITOR_PALETTES_H_INCLUDED
#pragma once
#include "editor/editor_display.hpp"
#include "editor/palette/common_palette.hpp"
@ -187,5 +186,3 @@ private:
} //end namespace editor
#endif // EDITOR_PALETTES_H_INCLUDED

Some files were not shown because too many files have changed in this diff Show more