Skip to content

Commit

Permalink
Fix -Wdeprecated-copy compiler warnings with gcc 9
Browse files Browse the repository at this point in the history
(partial cherry pick from commit 05d1092)
  • Loading branch information
loonycyborg authored and stevecotton committed Jul 31, 2019
1 parent fcd0ced commit 4139b43
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 69 deletions.
42 changes: 0 additions & 42 deletions src/game_classification.cpp
Expand Up @@ -28,27 +28,6 @@ static lg::log_domain log_engine("engine");
/// The default difficulty setting for campaigns.
const std::string DEFAULT_DIFFICULTY("NORMAL");

game_classification::game_classification()
: label()
, version()
, campaign_type()
, campaign_define()
, campaign_xtra_defines()
, scenario_define()
, era_define()
, mod_defines()
, campaign()
, campaign_name()
, abbrev()
, end_credits(true)
, end_text()
, end_text_duration()
, difficulty(DEFAULT_DIFFICULTY)
, random_mode("")
, oos_debug(false)
{
}

game_classification::game_classification(const config& cfg)
: label(cfg["label"])
, version(cfg["version"])
Expand All @@ -71,27 +50,6 @@ game_classification::game_classification(const config& cfg)
{
}

game_classification::game_classification(const game_classification& gc)
: label(gc.label)
, version(gc.version)
, campaign_type(gc.campaign_type)
, campaign_define(gc.campaign_define)
, campaign_xtra_defines(gc.campaign_xtra_defines)
, scenario_define(gc.scenario_define)
, era_define(gc.era_define)
, mod_defines(gc.mod_defines)
, campaign(gc.campaign)
, campaign_name(gc.campaign_name)
, abbrev(gc.abbrev)
, end_credits(gc.end_credits)
, end_text(gc.end_text)
, end_text_duration(gc.end_text_duration)
, difficulty(gc.difficulty)
, random_mode(gc.random_mode)
, oos_debug(gc.oos_debug)
{
}

config game_classification::to_config() const
{
config cfg;
Expand Down
11 changes: 5 additions & 6 deletions src/game_classification.hpp
Expand Up @@ -27,9 +27,8 @@ extern const std::string DEFAULT_DIFFICULTY;
class game_classification
{
public:
game_classification();
game_classification() = default;
explicit game_classification(const config& cfg);
game_classification(const game_classification& gc);

config to_config() const;
std::string get_tagname() const;
Expand All @@ -54,10 +53,10 @@ class game_classification
std::string campaign_name; /**< The name of the campaign being played. */

std::string abbrev; /**< the campaign abbreviation */
bool end_credits; /**< whether to show the standard credits at the end */
bool end_credits = true; /**< whether to show the standard credits at the end */
std::string end_text; /**< end-of-campaign text */
unsigned int end_text_duration; /**< for how long the end-of-campaign text is shown */
std::string difficulty; /**< The difficulty level the game is being played on. */
std::string random_mode;
bool oos_debug;
std::string difficulty = DEFAULT_DIFFICULTY; /**< The difficulty level the game is being played on. */
std::string random_mode = "";
bool oos_debug = false;
};
11 changes: 0 additions & 11 deletions src/picture.cpp
Expand Up @@ -358,17 +358,6 @@ locator& locator::operator=(const locator& a)
return *this;
}

locator::value::value(const locator::value& a)
: type_(a.type_)
, is_data_uri_(a.is_data_uri_)
, filename_(a.filename_)
, loc_(a.loc_)
, modifications_(a.modifications_)
, center_x_(a.center_x_)
, center_y_(a.center_y_)
{
}

locator::value::value()
: type_(NONE)
, is_data_uri_(false)
Expand Down
1 change: 0 additions & 1 deletion src/picture.hpp
Expand Up @@ -42,7 +42,6 @@ namespace image {
void parse_arguments();
struct value {
value();
value(const value &a);
value(const char *filename);
value(const std::string& filename);
value(const std::string& filename, const std::string& modifications);
Expand Down
8 changes: 0 additions & 8 deletions src/widgets/widget.cpp
Expand Up @@ -30,14 +30,6 @@ namespace gui {

bool widget::mouse_lock_ = false;

widget::widget(const widget &o)
: events::sdl_handler(), focus_(o.focus_), video_(o.video_), restorer_(o.restorer_), rect_(o.rect_),
needs_restore_(o.needs_restore_), state_(o.state_), hidden_override_(o.hidden_override_),
enabled_(o.enabled_), clip_(o.clip_), clip_rect_(o.clip_rect_), volatile_(o.volatile_),
help_text_(o.help_text_), tooltip_text_(o.tooltip_text_), help_string_(o.help_string_), id_(o.id_), mouse_lock_local_(o.mouse_lock_local_)
{
}

widget::widget(CVideo& video, const bool auto_join)
: events::sdl_handler(auto_join), focus_(true), video_(&video), rect_(EmptyRect), needs_restore_(false),
state_(UNINIT), hidden_override_(false), enabled_(true), clip_(false),
Expand Down
1 change: 0 additions & 1 deletion src/widgets/widget.hpp
Expand Up @@ -69,7 +69,6 @@ class widget : public events::sdl_handler
virtual void process_tooltip_string(int mousex, int mousey);

protected:
widget(const widget& o);
widget(CVideo& video, const bool auto_join=true);
virtual ~widget();

Expand Down

0 comments on commit 4139b43

Please sign in to comment.