diff --git bauer/vehikelbauer.cc bauer/vehikelbauer.cc index 13dac2a9d..1763a361d 100644 --- bauer/vehikelbauer.cc +++ bauer/vehikelbauer.cc @@ -251,6 +251,7 @@ static bool compare_vehicles(const vehicle_desc_t* a, const vehicle_desc_t* b) case depot_frame_t::sb_price: cmp = compare_price(a, b); if (cmp != 0) return cmp < 0; + // fallthrough case depot_frame_t::sb_cost: cmp = compare_cost(a, b); if (cmp != 0) return cmp < 0; @@ -276,6 +277,7 @@ static bool compare_vehicles(const vehicle_desc_t* a, const vehicle_desc_t* b) case depot_frame_t::sb_intro_date: cmp = compare_intro_year_month(a, b); if (cmp != 0) return cmp < 0; + // fallthrough case depot_frame_t::sb_retire_date: cmp = compare_retire_year_month(a, b); if (cmp != 0) return cmp < 0; @@ -581,9 +583,9 @@ sint32 vehicle_builder_t::get_fastest_vehicle_speed(waytype_t wt, uint16 const m FOR(slist_tpl, const vehicle_descriptor, typ_fahrzeuge[0][GET_WAYTYPE_INDEX(wt)]) { if (vehicle_descriptor->get_power() == 0 || - use_timeline && ( + (use_timeline && ( vehicle_descriptor->is_future(month_now) || - !allow_obsolete && vehicle_descriptor->is_retired(month_now))) { + (!allow_obsolete && vehicle_descriptor->is_retired(month_now))))) { continue; } diff --git descriptor/building_desc.cc descriptor/building_desc.cc index beceb1768..4768101a0 100644 --- descriptor/building_desc.cc +++ descriptor/building_desc.cc @@ -216,6 +216,7 @@ sint32 building_desc_t::get_price(karte_t *world) const case water_wt: return -s.cst_multiply_dock * get_level(); case air_wt: return -s.cst_multiply_airterminal * get_level(); case 0: return -s.cst_multiply_post * get_level(); + default: return 0; } case depot: switch(get_extra()) { diff --git display/scr_coord.h display/scr_coord.h index 071e6da72..45244b602 100644 --- display/scr_coord.h +++ display/scr_coord.h @@ -111,6 +111,8 @@ public: scr_size( scr_coord_val w_par, scr_coord_val h_par) { w = w_par; h = h_par; } scr_size( const scr_size& size ) { w = size.w; h=size.h; } + scr_size operator=(const scr_size &rhs) { w=rhs.w; h=rhs.h; return *this; } + operator scr_coord() const { return scr_coord(w,h); } bool operator ==(const scr_size& other) const { return ((w-other.w) | (h-other.h)) == 0; } diff --git network/network_address.cc network/network_address.cc index 81d7abbdd..8b291bf47 100644 --- network/network_address.cc +++ network/network_address.cc @@ -43,6 +43,16 @@ net_address_t::net_address_t(const net_address_t &other) } +net_address_t &net_address_t::operator=(const net_address_t &rhs) +{ + ip = rhs.ip; + mask = rhs.mask; + ipstr[0] = '\0'; + init_ipstr(); + return *this; +} + + void net_address_t::init_ipstr() { if ( ipstr[0] == '\0' ) { diff --git network/network_address.h network/network_address.h index ced2ba277..c2a60a2b9 100644 --- network/network_address.h +++ network/network_address.h @@ -26,6 +26,8 @@ public: net_address_t(const net_address_t&); + net_address_t &operator=(const net_address_t &rhs); + bool matches(const net_address_t &other) const { return (other.ip & mask)==(ip & mask); } diff --git tpl/quickstone_tpl.h tpl/quickstone_tpl.h index 5b2a69566..f940ace4b 100644 --- tpl/quickstone_tpl.h +++ tpl/quickstone_tpl.h @@ -257,6 +257,8 @@ public: bool operator!= (const quickstone_tpl &other) const { return entry != other.entry; } + quickstone_tpl &operator=(const quickstone_tpl &rhs) { entry = rhs.entry; return *this; } + static uint16 get_size() { return size; } /**