diff --git a/src/actions/create.hpp b/src/actions/create.hpp index a3fd3f2ac1ea..33d3aa395f1e 100644 --- a/src/actions/create.hpp +++ b/src/actions/create.hpp @@ -141,6 +141,8 @@ const std::set get_recruits(int side, const map_location &recruit_l */ std::vector get_recalls(int side, const map_location &recall_loc); +typedef std::tuple place_recruit_result; + /** * Place a unit into the game. * The unit will be placed on @a recruit_location, which should be retrieved @@ -148,7 +150,6 @@ std::vector get_recalls(int side, const map_location &recall_lo * @param facing the desired facing for the unit, map_location::NDIRECTIONS to determine facing automatically. * @returns true if an event (or fog clearing) has mutated the game state. */ -typedef std::tuple place_recruit_result; place_recruit_result place_recruit(unit_ptr u, const map_location &recruit_location, const map_location& recruited_from, int cost, bool is_recall, map_location::DIRECTION facing = map_location::NDIRECTIONS, bool show = false, bool fire_event = true, bool full_movement = false, bool wml_triggered = false); diff --git a/src/config_attribute_value.hpp b/src/config_attribute_value.hpp index 173daca7ad81..01a97fcda658 100644 --- a/src/config_attribute_value.hpp +++ b/src/config_attribute_value.hpp @@ -188,7 +188,7 @@ class config_attribute_value std::string str(const std::string& fallback = "") const; t_string t_str() const; /** - @param T a type created with MAKE_ENUM macro + @tparam T a type created with MAKE_ENUM macro NOTE: since T::VALUE constants is not of type T but of the underlying enum type you must specify the template parameter explicitly TODO: Fix this in c++11 using constexpr types. */ diff --git a/src/font/text.hpp b/src/font/text.hpp index 75500cf4f00f..507b197dc7b4 100644 --- a/src/font/text.hpp +++ b/src/font/text.hpp @@ -270,9 +270,9 @@ class pango_text /** * The color to render links in. * - * Links are formatted using pango as follows: + * Links are formatted using pango <span> as follows: * - * "" + * <span underline="single" color=" + link_color_ + "> */ color_t link_color_; diff --git a/src/font/text_formatting.hpp b/src/font/text_formatting.hpp index 35fff36045e2..ca4d1e8141e8 100644 --- a/src/font/text_formatting.hpp +++ b/src/font/text_formatting.hpp @@ -30,8 +30,8 @@ namespace font { /** * Retuns a Pango formatting string using the provided color_t object. * - * The string returned will be in format: '' - * Callers will need to manually append the closing' tag. + * The string returned will be in format: <span foreground=#color> + * Callers will need to manually append the closing </span>' tag. * * @param color The color_t object from which to retrieve the color. */ diff --git a/src/formula/variant_value.hpp b/src/formula/variant_value.hpp index 63a6fe746fee..e0b73efac732 100644 --- a/src/formula/variant_value.hpp +++ b/src/formula/variant_value.hpp @@ -172,7 +172,7 @@ class variant_value_base * Implements the increment functionality of @ref variant_iterator * for a value of this type. * - * @param iter The opaque reference that was passed to the variant_iterator by @ref make_iterator. + * The parameter is an opaque reference that was passed to the variant_iterator by @ref make_iterator. */ virtual void iterator_inc(boost::any&) const {} @@ -180,7 +180,7 @@ class variant_value_base * Implements the decrement functionality of @ref variant_iterator * for a value of this type. * - * @param iter The opaque reference that was passed to the variant_iterator by @ref make_iterator. + * The parameter is an opaque reference that was passed to the variant_iterator by @ref make_iterator. */ virtual void iterator_dec(boost::any&) const {} @@ -190,8 +190,8 @@ class variant_value_base * * Note that this is only called if the two iterators are already known to be of the same type. * - * @param first The opaque reference that was passed to the variant_iterator by @ref make_iterator. - * @param second The opaque reference that was passed to the variant_iterator by @ref make_iterator. + * The first parameter is an opaque reference that was passed to the variant_iterator by @ref make_iterator. + * The second parameter is an opaque reference that was passed to the variant_iterator by @ref make_iterator. */ virtual bool iterator_equals(const boost::any& /*first*/, const boost::any& /*second*/) const { diff --git a/src/game_events/menu_item.hpp b/src/game_events/menu_item.hpp index b2fb611f7ee1..7d231020ba37 100644 --- a/src/game_events/menu_item.hpp +++ b/src/game_events/menu_item.hpp @@ -89,7 +89,7 @@ class wml_menu_item * The undo stack will be cleared if the event mutated the gamestate. * * @param[in] event_hex The location of the event (where the menu was opened). - * @param[in] last_select The location of the most recent "select" event. + * @param[in] data The game data for the most recent "select" event. */ void fire_event(const map_location& event_hex, const game_data& data) const; diff --git a/src/game_events/wmi_manager.hpp b/src/game_events/wmi_manager.hpp index 89fcd7ffa596..1e68967527f3 100644 --- a/src/game_events/wmi_manager.hpp +++ b/src/game_events/wmi_manager.hpp @@ -63,7 +63,7 @@ class wmi_manager /** * Gets the menu item with the specified ID. * - * @param Item id. + * @param id Item id. * @returns Pointer to the relavent item, or nullptr if not found. */ item_ptr get_item(const std::string& id) const; diff --git a/src/game_initialization/connect_engine.hpp b/src/game_initialization/connect_engine.hpp index d2e41731df4a..3e0294bd3f6c 100644 --- a/src/game_initialization/connect_engine.hpp +++ b/src/game_initialization/connect_engine.hpp @@ -44,8 +44,6 @@ typedef std::pair controller_option; class connect_engine { public: - /// @param players the player which are already connected to the current game. - /// This is always empty unless we advance form a previous scenario. connect_engine(saved_game& state, const bool first_scenario, mp_campaign_info* campaign_info); diff --git a/src/game_initialization/depcheck.hpp b/src/game_initialization/depcheck.hpp index 6e5bb28a0144..cbe3b7f08dde 100644 --- a/src/game_initialization/depcheck.hpp +++ b/src/game_initialization/depcheck.hpp @@ -139,7 +139,7 @@ class manager /** * Tells whether a certain mod is activated. * - * @param string the string id of the mod + * @param id the string id of the mod * * @return true if activated, false is not */ diff --git a/src/gui/core/event/dispatcher.hpp b/src/gui/core/event/dispatcher.hpp index 03c00ae80907..3d4e6a547e2b 100644 --- a/src/gui/core/event/dispatcher.hpp +++ b/src/gui/core/event/dispatcher.hpp @@ -260,7 +260,7 @@ class dispatcher * @param target The widget that should receive the event. * Normally this is the window holding the * widget. - * @param message The extra information needed for a window + * @param msg The extra information needed for a window * (or another widget in the chain) to handle * the message. */ diff --git a/src/gui/core/event/dispatcher_private.hpp b/src/gui/core/event/dispatcher_private.hpp index 09b573290a1b..b0de29683652 100644 --- a/src/gui/core/event/dispatcher_private.hpp +++ b/src/gui/core/event/dispatcher_private.hpp @@ -288,7 +288,7 @@ namespace implementation * @param event The event to test. * @param dispatcher The final widget to test, this is also the * dispatcher the sends the event. - * @param widget The widget should parent(s) to check. + * @param w The widget should parent(s) to check. * * @returns The list of widgets with a handler. * The order will be (assuming all have a diff --git a/src/gui/dialogs/addon/connect.hpp b/src/gui/dialogs/addon/connect.hpp index 634bb848b662..356304d7c77b 100644 --- a/src/gui/dialogs/addon/connect.hpp +++ b/src/gui/dialogs/addon/connect.hpp @@ -36,8 +36,6 @@ class addon_connect : public modal_dialog * the dialog returns @ref window::OK or 3 * undefined otherwise. * @param allow_remove Sets @ref allow_remove_. - * @param disp The display object used for showing the - * in-game help when requested. */ addon_connect(std::string& host_name, const bool allow_remove); diff --git a/src/gui/dialogs/campaign_difficulty.hpp b/src/gui/dialogs/campaign_difficulty.hpp index c4a683d90278..615cb691f416 100644 --- a/src/gui/dialogs/campaign_difficulty.hpp +++ b/src/gui/dialogs/campaign_difficulty.hpp @@ -34,7 +34,7 @@ class campaign_difficulty : public modal_dialog { public: /** - * @param config of the campaign difficulty is being chosen for + * @param campaign The campaign the difficulty is being chosen for */ campaign_difficulty(const config& campaign); diff --git a/src/gui/dialogs/modal_dialog.hpp b/src/gui/dialogs/modal_dialog.hpp index 6ade0394c6e7..7e67915177fd 100644 --- a/src/gui/dialogs/modal_dialog.hpp +++ b/src/gui/dialogs/modal_dialog.hpp @@ -379,8 +379,6 @@ class modal_dialog * * At this point the registered fields are not yet registered. * - * @param video The video which contains the surface to draw - * upon. * @param window The window just created. */ virtual void post_build(window& window); diff --git a/src/gui/dialogs/modeless_dialog.hpp b/src/gui/dialogs/modeless_dialog.hpp index a5bf8fd5d944..32d5ab8d68c4 100644 --- a/src/gui/dialogs/modeless_dialog.hpp +++ b/src/gui/dialogs/modeless_dialog.hpp @@ -104,8 +104,6 @@ class modeless_dialog /** * Actions to be taken directly after the window is build. * - * @param video The video which contains the surface to draw - * upon. * @param window The window just created. */ virtual void post_build(window& window); @@ -113,8 +111,6 @@ class modeless_dialog /** * Actions to be taken before showing the window. * - * @param video The video which contains the surface to draw - * upon. * @param window The window to be shown. */ virtual void pre_show(window& window); diff --git a/src/gui/widgets/grid.hpp b/src/gui/widgets/grid.hpp index 818c0ebaf001..497556389bd0 100644 --- a/src/gui/widgets/grid.hpp +++ b/src/gui/widgets/grid.hpp @@ -127,7 +127,7 @@ class grid : public widget * touch the other settings of the child. * * @param id The id of the widget to free. - * @param widget The widget to put in the grid. + * @param w The widget to put in the grid. * @param recurse Do we want to decent into the child grids. * @param new_parent The new parent for the swapped out widget. * @@ -231,7 +231,7 @@ class grid : public widget * * @param widget The widget whose cell to modify. * @param set_flag The alignment flag to set. - * @param mask Whether to affect horizontal or vertical alignment. + * @param mode_mask Whether to affect horizontal or vertical alignment. * Use either HORIZONTAL_MASK or VERTICAL_MASK */ void set_child_alignment(widget* widget, unsigned set_flag, unsigned mode_mask); diff --git a/src/gui/widgets/multimenu_button.hpp b/src/gui/widgets/multimenu_button.hpp index c4b3c8a29eb0..f4be46a0dc47 100644 --- a/src/gui/widgets/multimenu_button.hpp +++ b/src/gui/widgets/multimenu_button.hpp @@ -111,7 +111,7 @@ class multimenu_button : public styled_widget /** * Set the options selected in the menu. * - * @param mask A mask specifying which options to select and deselect + * @param states A mask specifying which options to select and deselect */ void select_options(boost::dynamic_bitset<> states); diff --git a/src/gui/widgets/scrollbar_container.hpp b/src/gui/widgets/scrollbar_container.hpp index 8e432a601111..f72b2c4edd82 100644 --- a/src/gui/widgets/scrollbar_container.hpp +++ b/src/gui/widgets/scrollbar_container.hpp @@ -318,7 +318,7 @@ class scrollbar_container : public container_base * The position where the additional content was * inserted/removed, defaults to -1 whcih means * 'at end' - * @param height_modification_po + * @param height_modification_pos * The position where the additional content was * inserted/removed, defaults to -1 whcih means * 'at end' diff --git a/src/gui/widgets/settings.hpp b/src/gui/widgets/settings.hpp index 3fab3b44870d..994ea6f33249 100644 --- a/src/gui/widgets/settings.hpp +++ b/src/gui/widgets/settings.hpp @@ -80,7 +80,7 @@ using widget_parser_t = std::function_definition] is used. */ @@ -89,7 +89,7 @@ void register_widget(const std::string& id, widget_parser_t f, const char* key = /** * Loads the definitions of a widget. * - * @param gui_definition The gui definition the widget definition + * @param gui The gui definition the widget definition * belongs to. * @param definition_type The type of the widget whose definitions are * to be loaded. diff --git a/src/gui/widgets/stacked_widget.hpp b/src/gui/widgets/stacked_widget.hpp index d7161f6019a6..c56f21da7070 100644 --- a/src/gui/widgets/stacked_widget.hpp +++ b/src/gui/widgets/stacked_widget.hpp @@ -102,7 +102,7 @@ class stacked_widget : public container_base * Gets the grid for a specified layer. * This can be used to search for widgets in a hidden layer. * - * @param The layer to retrieve + * @param i The layer to retrieve * @returns The grid for the specified layer. */ grid* get_layer_grid(unsigned int i); diff --git a/src/gui/widgets/tree_view_node.hpp b/src/gui/widgets/tree_view_node.hpp index 99688ff59795..5820eb305b16 100644 --- a/src/gui/widgets/tree_view_node.hpp +++ b/src/gui/widgets/tree_view_node.hpp @@ -298,7 +298,7 @@ class tree_view_node : public widget point calculate_best_size(const int indentation_level, const unsigned indentation_step_size) const; - /** @param assume_visible: if false (default) it will return 0 if the parent node is folded*/ + /** @param assume_visible if false (default) it will return 0 if the parent node is folded*/ point get_current_size(bool assume_visible = false) const; point get_folded_size() const; point get_unfolded_size() const; diff --git a/src/gui/widgets/window.hpp b/src/gui/widgets/window.hpp index 5cc0d42f023a..5da8ba1c3f0c 100644 --- a/src/gui/widgets/window.hpp +++ b/src/gui/widgets/window.hpp @@ -473,7 +473,7 @@ class window : public panel, public cursor::setter * * A window will only close if this function returns true. * - * @param window The current window. + * @param func A function taking a window reference and returing a boolean result. */ void set_exit_hook(std::function func) { diff --git a/src/hotkey/hotkey_item.hpp b/src/hotkey/hotkey_item.hpp index 75d847c9cae0..d0f951e7b5aa 100644 --- a/src/hotkey/hotkey_item.hpp +++ b/src/hotkey/hotkey_item.hpp @@ -245,7 +245,7 @@ class hotkey_keyboard: public hotkey_base /** * Set the keycode associated with this class. - * @param keycode_ The SDL_Keycode that this hotkey should be associated with + * @param keycode The SDL_Keycode that this hotkey should be associated with */ void set_keycode(SDL_Keycode keycode) { diff --git a/src/serialization/unicode.hpp b/src/serialization/unicode.hpp index bf39fdf94f64..f8bcb3427cec 100644 --- a/src/serialization/unicode.hpp +++ b/src/serialization/unicode.hpp @@ -87,9 +87,9 @@ namespace utf8 { * * The output is guaranteed to be valid UTF-8. * - * @param[in] str String encoded in UTF-8. - * @param[out] str String encoded UTF-8 that contains at most @p size - * codepoints. + * @param[in,out] str [in] String encoded in UTF-8. + * [out] String encoded UTF-8 that contains at most @p size + * codepoints. * @param size The size to truncate to. */ void truncate_as_ucs4(utf8::string& str, const size_t size); diff --git a/src/server/game.hpp b/src/server/game.hpp index 28efb297b257..d0327f28915f 100644 --- a/src/server/game.hpp +++ b/src/server/game.hpp @@ -282,7 +282,7 @@ class game void transfer_ai_sides(const socket_ptr player); void send_leave_game(socket_ptr user) const; /** - @param sides: a comma sperated list of side numbers to which the package should be sent, + @param sides a comma sperated list of side numbers to which the package should be sent, */ void send_data_sides(simple_wml::document& data, const simple_wml::string_span& sides, const socket_ptr exclude=socket_ptr(), std::string packet_type = "") const; diff --git a/src/synced_user_choice.hpp b/src/synced_user_choice.hpp index 7a8d3841209a..f6328ffaf6e5 100644 --- a/src/synced_user_choice.hpp +++ b/src/synced_user_choice.hpp @@ -105,8 +105,8 @@ class user_choice_manager : events::pump_monitor void ask_local_choice(); void fix_oos(); const std::string& wait_message() const { return wait_message_; } - /// @param name: the tagname for this user choice in the replay - /// @param sides: an array of team numbers (beginning with 1). the specified sides may not have an empty controller. + /// @param name the tagname for this user choice in the replay + /// @param sides an array of team numbers (beginning with 1). the specified sides may not have an empty controller. static std::map get_user_choice_internal(const std::string &name, const mp_sync::user_choice &uch, const std::set& sides); /// Inherited from events::pump_monitor void process(events::pump_info&); diff --git a/src/terrain/filter.hpp b/src/terrain/filter.hpp index 19faa17b1c93..68814ff90f83 100644 --- a/src/terrain/filter.hpp +++ b/src/terrain/filter.hpp @@ -47,7 +47,6 @@ class terrain_filter : public xy_pred { /// @param loc The location to test /// @param ref_unit A reference unit for the $teleport_unit auto-stored variable - /// @param unit_loc The reference unit's apparent location for this filter /// @returns true if and only if the given location matches this filter bool match(const map_location& loc, const unit& ref_unit) const { return match_impl(loc, &ref_unit); @@ -66,7 +65,6 @@ class terrain_filter : public xy_pred { /// @param[out] locs set to store the results in /// @param[in] with_border whether to include the borders /// @param[in] ref_unit A reference unit for the $teleport_unit auto-stored variable - /// @param[in] unit_loc The reference unit's apparent location for this filter void get_locations(std::set& locs, const unit& ref_unit, bool with_border=false) const { return get_locs_impl(locs, &ref_unit, with_border); } diff --git a/src/terrain/translation.cpp b/src/terrain/translation.cpp index 96d661576e7b..6a6f2fe7d68e 100644 --- a/src/terrain/translation.cpp +++ b/src/terrain/translation.cpp @@ -61,6 +61,8 @@ namespace t_translation { */ static terrain_code get_mask_(const terrain_code& terrain); + static ter_layer string_to_layer_(const char* begin, const char* end); + /** * Converts a string to a layer. * @@ -69,7 +71,6 @@ namespace t_translation { * * @return The converted layer. */ - static ter_layer string_to_layer_(const char* begin, const char* end); static ter_layer string_to_layer_(const std::string& str) { return string_to_layer_(str.c_str(), str.c_str() + str.size()); diff --git a/src/terrain/translation.hpp b/src/terrain/translation.hpp index b5a4db6636ef..61863b7706a3 100644 --- a/src/terrain/translation.hpp +++ b/src/terrain/translation.hpp @@ -247,7 +247,7 @@ namespace t_translation { * [S ]T * S = starting location a positive non-zero number * T = terrain code (see read_terrain_code) - * @param starting_positions This parameter will be filled with the starting + * @param positions This parameter will be filled with the starting * locations found. Starting locations can only occur once * if multiple definitions occur of the same position only * the last is stored. The returned value is a map: @@ -263,7 +263,7 @@ namespace t_translation { * Write a gamemap in to a vector string. * * @param map A terrain vector, as returned from read_game_map - * @param starting_positions A starting positions map, as returned from read_game_map + * @param positions A starting positions map, as returned from read_game_map * * @returns A terrain string which can be read with read_game_map. * For readability the map is padded to groups of 12 chars, diff --git a/src/units/unit.hpp b/src/units/unit.hpp index 7b7b698742cb..c1211435ed24 100644 --- a/src/units/unit.hpp +++ b/src/units/unit.hpp @@ -1274,8 +1274,8 @@ class unit /** * Count modifications of a particular type. - * @param The type of modification to count. - * Valid values are "advancement", "trait", "object" + * @param type The type of modification to count. + * Valid values are "advancement", "trait", "object" * @param id The ID of the modification to count * @return The total number of modifications of that type and ID. */ @@ -1283,8 +1283,8 @@ class unit /** * Add a new modification to the unit. - * @param The type of modification to add. - * Valid values are "advancement", "trait", "object" + * @param type The type of modification to add. + * Valid values are "advancement", "trait", "object" * @param modification The details of the modification * @param no_add If true, apply the modification but don't save it for unit rebuild time. * Defaults to false. diff --git a/src/utils/math.hpp b/src/utils/math.hpp index c4caf7e6d4be..72ad2789e182 100644 --- a/src/utils/math.hpp +++ b/src/utils/math.hpp @@ -108,9 +108,7 @@ inline std::size_t bit_width() { * * sizeof(x) * std::numeric_limits::digits * - * @tparam T The type of `x`. - * - * @param x The return value is the size, in bits, of this object. + * @tparam T The return value is the size, in bits, of the type of this object. * * @returns the size, in bits, of an instance of type `T`. */ diff --git a/src/utils/name_generator_factory.hpp b/src/utils/name_generator_factory.hpp index e1c626a74ae5..f38053a15a5e 100644 --- a/src/utils/name_generator_factory.hpp +++ b/src/utils/name_generator_factory.hpp @@ -50,8 +50,7 @@ class name_generator_factory * Determines a name generator from WML data. Tries first to load a context-free generator, * then falls back to Markov. * @param config the WML data to be parsed for name generators - * @param the prefix to look for - * @returns a name generator or nullptr if not found + * @param prefix the prefix to look for */ void add_name_generator_from_config(const config& config, const std::string id, const std::string prefix); }; diff --git a/src/video.hpp b/src/video.hpp index eb64d7157b6d..96fd1a8993f3 100644 --- a/src/video.hpp +++ b/src/video.hpp @@ -62,16 +62,14 @@ class CVideo { void set_fullscreen(bool ison); + void set_resolution(const std::pair& res); + /** * Set the resolution. * * @param width The new width. * @param height The new height. - * - * @returns The status true if width and height are the - * size of the framebuffer, false otherwise. */ - void set_resolution(const std::pair& res); void set_resolution(const unsigned width, const unsigned height); std::pair current_resolution(); diff --git a/src/whiteboard/manager.hpp b/src/whiteboard/manager.hpp index 77b707f79eea..8763f31bd77d 100644 --- a/src/whiteboard/manager.hpp +++ b/src/whiteboard/manager.hpp @@ -256,10 +256,11 @@ struct future_map struct future_map_if { - /** @param cond: If true, applies the planned unit map for the duration of the struct's life and reverts to real unit map on destruction. + const std::unique_ptr future_map_; + + /** @param cond If true, applies the planned unit map for the duration of the struct's life and reverts to real unit map on destruction. No effect if cond == false. */ - const std::unique_ptr future_map_; future_map_if(bool cond) : future_map_(cond ? new future_map() : nullptr) {}