Clean up more unnecessary default ctors
This commit is contained in:
parent
5c84ffc7df
commit
b11627c340
3 changed files with 10 additions and 51 deletions
|
@ -326,8 +326,6 @@ bool has_hotkey_command(const std::string& id);
|
|||
class wml_hotkey_record
|
||||
{
|
||||
public:
|
||||
wml_hotkey_record() = default;
|
||||
|
||||
/** Don't allow copying so objects don't get erased early. */
|
||||
wml_hotkey_record(const wml_hotkey_record&) = delete;
|
||||
const wml_hotkey_record& operator=(const wml_hotkey_record&) = delete;
|
||||
|
|
|
@ -87,28 +87,6 @@ static map_location legacy_difference(const map_location& me, const map_location
|
|||
*
|
||||
*/
|
||||
|
||||
terrain_builder::rule_image::rule_image(int layer, int x, int y, bool global_image, int cx, int cy, bool is_water)
|
||||
: layer(layer)
|
||||
, basex(x)
|
||||
, basey(y)
|
||||
, variants()
|
||||
, global_image(global_image)
|
||||
, center_x(cx)
|
||||
, center_y(cy)
|
||||
, is_water(is_water)
|
||||
{
|
||||
}
|
||||
|
||||
terrain_builder::tile::tile()
|
||||
: flags()
|
||||
, images()
|
||||
, images_foreground()
|
||||
, images_background()
|
||||
, last_tod("invalid_tod")
|
||||
, sorted_images(false)
|
||||
{
|
||||
}
|
||||
|
||||
void terrain_builder::tile::rebuild_cache(const std::string& tod, logs* log)
|
||||
{
|
||||
images_background.clear();
|
||||
|
@ -730,7 +708,7 @@ void terrain_builder::add_images_from_config(rule_imagelist& images, const confi
|
|||
|
||||
bool is_water = img["is_water"].to_bool();
|
||||
|
||||
images.push_back(rule_image(layer, basex - dx, basey - dy, global, center_x, center_y, is_water));
|
||||
images.AGGREGATE_EMPLACE(layer, basex - dx, basey - dy, global, center_x, center_y, is_water);
|
||||
|
||||
// Adds the other variants of the image
|
||||
for(const config& variant : img.child_range("variant")) {
|
||||
|
@ -1104,7 +1082,7 @@ void terrain_builder::apply_rule(const terrain_builder::building_rule& rule, con
|
|||
|
||||
if(!constraint.no_draw) {
|
||||
for(const rule_image& img : constraint.images) {
|
||||
btile.images.emplace_back(&img, rand_seed);
|
||||
btile.images.AGGREGATE_EMPLACE(&img, rand_seed);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -223,14 +223,6 @@ public:
|
|||
*/
|
||||
struct rule_image
|
||||
{
|
||||
rule_image(int layer,
|
||||
int x,
|
||||
int y,
|
||||
bool global_image = false,
|
||||
int center_x = -1,
|
||||
int center_y = -1,
|
||||
bool is_water = false);
|
||||
|
||||
bool is_background() const
|
||||
{
|
||||
return layer < 0 || (layer == 0 && basey < UNITPOS);
|
||||
|
@ -243,19 +235,19 @@ public:
|
|||
*/
|
||||
int basex, basey;
|
||||
|
||||
/** A list of variants for this image */
|
||||
std::vector<rule_image_variant> variants;
|
||||
|
||||
/** Set to true if the image was defined as a child of the
|
||||
* [terrain_graphics] tag, set to false if it was defined as a
|
||||
* child of a [tile] tag */
|
||||
bool global_image;
|
||||
bool global_image = false;
|
||||
|
||||
/** The position where the center of the image base should be
|
||||
*/
|
||||
int center_x, center_y;
|
||||
int center_x = -1, center_y = -1;
|
||||
|
||||
bool is_water;
|
||||
bool is_water = false;
|
||||
|
||||
/** A list of variants for this image */
|
||||
std::vector<rule_image_variant> variants{};
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -289,9 +281,6 @@ public:
|
|||
*/
|
||||
struct tile
|
||||
{
|
||||
/** Constructor for the tile() structure */
|
||||
tile();
|
||||
|
||||
struct rule_image_rand;
|
||||
typedef std::pair<const rule_image_rand*, const rule_image_variant*> log_details;
|
||||
typedef std::vector<log_details> logs;
|
||||
|
@ -313,12 +302,6 @@ public:
|
|||
/** Represent a rule_image applied with a random seed.*/
|
||||
struct rule_image_rand
|
||||
{
|
||||
rule_image_rand(const rule_image* r_i, unsigned int rnd)
|
||||
: ri(r_i)
|
||||
, rand(rnd)
|
||||
{
|
||||
}
|
||||
|
||||
const rule_image* operator->() const
|
||||
{
|
||||
return ri;
|
||||
|
@ -350,10 +333,10 @@ public:
|
|||
/**
|
||||
* The time-of-day to which the image caches correspond.
|
||||
*/
|
||||
std::string last_tod;
|
||||
std::string last_tod = "invalid_tod";
|
||||
|
||||
/** Indicates if 'images' is sorted */
|
||||
bool sorted_images;
|
||||
bool sorted_images = false;
|
||||
};
|
||||
|
||||
tile* get_tile(const map_location& loc);
|
||||
|
|
Loading…
Add table
Reference in a new issue