From e545c563d57e43d02b3f01655940c82d22a5408b Mon Sep 17 00:00:00 2001 From: mfranz Date: Tue, 13 Jun 2006 15:00:31 +0000 Subject: [PATCH] remove assignment operators: they aren't used now and won't in the future --- src/Cockpit/hud.hxx | 10 ---------- src/Cockpit/hud_card.cxx | 28 ---------------------------- src/Cockpit/hud_dnst.cxx | 14 +------------- src/Cockpit/hud_gaug.cxx | 9 --------- src/Cockpit/hud_inst.cxx | 16 ---------------- src/Cockpit/hud_labl.cxx | 19 ------------------- src/Cockpit/hud_ladr.cxx | 28 ---------------------------- src/Cockpit/hud_lat.cxx | 16 ---------------- src/Cockpit/hud_lon.cxx | 14 -------------- src/Cockpit/hud_scal.cxx | 15 --------------- src/Cockpit/hud_tbi.cxx | 11 ----------- 11 files changed, 1 insertion(+), 179 deletions(-) diff --git a/src/Cockpit/hud.hxx b/src/Cockpit/hud.hxx index 552638695..27c505c52 100644 --- a/src/Cockpit/hud.hxx +++ b/src/Cockpit/hud.hxx @@ -441,7 +441,6 @@ public: instr_item( const instr_item & image ); - instr_item & operator = ( const instr_item & rhs ); virtual ~instr_item (); int get_brightness ( void ) { return brightness;} @@ -571,7 +570,6 @@ public: ~instr_label(); instr_label( const instr_label & image); - instr_label & operator = (const instr_label & rhs ); virtual void draw( void ); // Required method in base class }; @@ -608,7 +606,6 @@ public: ~lat_label(); lat_label( const lat_label & image); - lat_label & operator = (const lat_label & rhs ); virtual void draw( void ); // Required method in base class }; @@ -645,7 +642,6 @@ public: ~lon_label(); lon_label( const lon_label & image); - lon_label & operator = (const lon_label & rhs ); virtual void draw( void ); // Required method in base class }; @@ -731,7 +727,6 @@ public: virtual ~instr_scale(); instr_scale( const instr_scale & image); - instr_scale & operator = (const instr_scale & rhs); virtual void draw ( void ) {}; // No-op here. Defined in derived classes. UINT div_min ( void ) { return Min_div;} @@ -813,7 +808,6 @@ public: ~hud_card(); hud_card( const hud_card & image); - hud_card & operator = (const hud_card & rhs ); // virtual void display_enable( bool setting ); virtual void draw( void ); // Required method in base class void circles(float,float,float); // suma @@ -842,7 +836,6 @@ public: ~gauge_instr(); gauge_instr( const gauge_instr & image); - gauge_instr & operator = (const gauge_instr & rhs ); virtual void draw( void ); // Required method in base class }; @@ -867,7 +860,6 @@ public: virtual ~dual_instr_item() {}; dual_instr_item( const dual_instr_item & image); - dual_instr_item & operator = (const dual_instr_item & rhs ); float current_ch1( void ) { return (float)alt_data_source();} float current_ch2( void ) { return (float)get_value();} @@ -898,7 +890,6 @@ public: float rad); //suma fgTBI_instr( const fgTBI_instr & image); - fgTBI_instr & operator = (const fgTBI_instr & rhs ); ~fgTBI_instr(); @@ -977,7 +968,6 @@ public: ~HudLadder(); HudLadder( const HudLadder & image ); - HudLadder & operator = ( const HudLadder & rhs ); virtual void draw( void ); void drawZenith(float,float,float); //suma void drawNadir(float, float, float); //suma diff --git a/src/Cockpit/hud_card.cxx b/src/Cockpit/hud_card.cxx index af5825e3e..6bbe1d634 100644 --- a/src/Cockpit/hud_card.cxx +++ b/src/Cockpit/hud_card.cxx @@ -130,34 +130,6 @@ hud_card::hud_card(const hud_card & image) : } -hud_card & hud_card::operator=(const hud_card & rhs) -{ - if (!(this == &rhs)) { - instr_scale::operator = (rhs); - val_span = rhs.val_span; - half_width_units = rhs.half_width_units; - draw_tick_bottom = rhs.draw_tick_bottom; - draw_tick_top = rhs.draw_tick_top; - draw_tick_right = rhs.draw_tick_right; - draw_tick_left = rhs.draw_tick_left; - draw_cap_bottom = rhs.draw_cap_bottom; - draw_cap_top = rhs.draw_cap_top; - draw_cap_right = rhs.draw_cap_right; - draw_cap_left = rhs.draw_cap_left; - marker_offset = rhs.marker_offset; - type = rhs.type; - pointer = rhs.pointer; - pointer_type = rhs.pointer_type; - tick_type = rhs.tick_type; - tick_length = rhs.tick_length; - Maj_div = rhs.Maj_div; - Min_div = rhs.Min_div; - } - - return *this; -} - - void hud_card::draw(void) // (HUD_scale * pscale) { float vmin = 0.0, vmax = 0.0; diff --git a/src/Cockpit/hud_dnst.cxx b/src/Cockpit/hud_dnst.cxx index cf5eacfdd..49f23e79b 100644 --- a/src/Cockpit/hud_dnst.cxx +++ b/src/Cockpit/hud_dnst.cxx @@ -1,7 +1,7 @@ #include "hud.hxx" - + //============ Top of dual_instr_item class member definitions ============ dual_instr_item :: @@ -26,15 +26,3 @@ dual_instr_item :: { } -dual_instr_item & dual_instr_item :: - operator = (const dual_instr_item & rhs ) -{ - if( !(this == &rhs)) { - instr_item::operator = (rhs); - alt_data_source = rhs.alt_data_source; - } - return *this; -} - -// End of hud_dnst.cxx - diff --git a/src/Cockpit/hud_gaug.cxx b/src/Cockpit/hud_gaug.cxx index a934ed01a..e064c18b9 100644 --- a/src/Cockpit/hud_gaug.cxx +++ b/src/Cockpit/hud_gaug.cxx @@ -66,15 +66,6 @@ gauge_instr::gauge_instr( const gauge_instr & image) : } -gauge_instr & gauge_instr::operator=(const gauge_instr & rhs) -{ - if (!(this == &rhs)) { - instr_scale::operator = (rhs); - } - return *this; -} - - // As implemented, draw only correctly draws a horizontal or vertical // scale. It should contain a variation that permits clock type displays. // Now is supports "tickless" displays such as control surface indicators. diff --git a/src/Cockpit/hud_inst.cxx b/src/Cockpit/hud_inst.cxx index 2505aa1a4..cee672247 100644 --- a/src/Cockpit/hud_inst.cxx +++ b/src/Cockpit/hud_inst.cxx @@ -71,22 +71,6 @@ instr_item :: { } -// assignment operator - -instr_item & instr_item :: operator = ( const instr_item & rhs ) -{ - if( !(this == &rhs )) { // Not an identity assignment - scrn_pos = rhs.scrn_pos; - load_value_fn = rhs.load_value_fn; - disp_factor = rhs.disp_factor; - opts = rhs.opts; - is_enabled = rhs.is_enabled; - broken = rhs.broken; - } - return *this; -} - -// destructor instr_item :: ~instr_item () { diff --git a/src/Cockpit/hud_labl.cxx b/src/Cockpit/hud_labl.cxx index 95d5cc19a..a20f02445 100644 --- a/src/Cockpit/hud_labl.cxx +++ b/src/Cockpit/hud_labl.cxx @@ -93,25 +93,6 @@ instr_label :: instr_label( const instr_label & image) : } -instr_label & instr_label ::operator = (const instr_label & rhs ) -{ - if( !(this == &rhs)) { - instr_item::operator = (rhs); - pformat = rhs.pformat; - fontSize = rhs.fontSize; - blink = rhs.blink; - justify = rhs.justify; - pre_str = rhs.pre_str; - post_str = rhs.post_str; - lat = rhs.lat; - lon = rhs.lon; - lbox = rhs.lbox; //hud - - - strcpy(format_buffer,rhs.format_buffer); - } - return *this; -} // // draw Draws a label anywhere in the HUD diff --git a/src/Cockpit/hud_ladr.cxx b/src/Cockpit/hud_ladr.cxx index a72663794..09a4070a3 100644 --- a/src/Cockpit/hud_ladr.cxx +++ b/src/Cockpit/hud_ladr.cxx @@ -102,34 +102,6 @@ HudLadder::HudLadder( const HudLadder & image ) : } -HudLadder& HudLadder::operator=( const HudLadder & rhs ) -{ - if (!(this == &rhs)) { - (dual_instr_item &)(*this) = (dual_instr_item &)rhs; - width_units = rhs.width_units; - div_units = rhs.div_units; - label_pos = rhs.label_pos; - scr_hole = rhs.scr_hole; - vmax = rhs.vmax; - vmin = rhs.vmin; - factor = rhs.factor; - hudladder_type = rhs.hudladder_type; - frl = rhs.frl; - velocity_vector = rhs.velocity_vector; - drift_marker = rhs.drift_marker; - alpha_bracket = rhs.alpha_bracket; - energy_marker = rhs.energy_marker; - climb_dive_marker = rhs.climb_dive_marker; - target_spot = rhs.target_spot; - glide_slope_marker = rhs.glide_slope_marker; - glide_slope = rhs.glide_slope; - energy_worm = rhs.energy_worm; - waypoint_marker = rhs.waypoint_marker; - } - return *this; -} - - // // Draws a climb ladder in the center of the HUD // diff --git a/src/Cockpit/hud_lat.cxx b/src/Cockpit/hud_lat.cxx index c3ca62353..9436e8bdf 100644 --- a/src/Cockpit/hud_lat.cxx +++ b/src/Cockpit/hud_lat.cxx @@ -75,22 +75,6 @@ lat_label::lat_label( const lat_label & image) : } -lat_label& lat_label::operator=(const lat_label & rhs) -{ - if (!(this == &rhs)) { - instr_item::operator = (rhs); - pformat = rhs.pformat; - fontSize = rhs.fontSize; - blink = rhs.blink; - justify = rhs.justify; - pre_str = rhs.pre_str; - post_str = rhs.post_str; - strcpy(format_buffer,rhs.format_buffer); - } - return *this; -} - - // // draw Draws a label anywhere in the HUD // diff --git a/src/Cockpit/hud_lon.cxx b/src/Cockpit/hud_lon.cxx index 0676f4e4c..52aa7a607 100644 --- a/src/Cockpit/hud_lon.cxx +++ b/src/Cockpit/hud_lon.cxx @@ -84,20 +84,6 @@ lon_label :: lon_label( const lon_label & image) : } -lon_label & lon_label ::operator = (const lon_label & rhs ) -{ - if( !(this == &rhs)) { - instr_item::operator = (rhs); - pformat = rhs.pformat; - fontSize = rhs.fontSize; - blink = rhs.blink; - justify = rhs.justify; - pre_str = rhs.pre_str; - post_str = rhs.post_str; - strcpy(format_buffer,rhs.format_buffer); - } - return *this; -} // // draw Draws a label anywhere in the HUD diff --git a/src/Cockpit/hud_scal.cxx b/src/Cockpit/hud_scal.cxx index d4cc564e4..2d99d26b1 100644 --- a/src/Cockpit/hud_scal.cxx +++ b/src/Cockpit/hud_scal.cxx @@ -66,21 +66,6 @@ instr_scale :: { } -instr_scale & instr_scale :: operator = (const instr_scale & rhs ) -{ - if( !(this == &rhs)) { - instr_item::operator = (rhs); - range_shown = rhs.range_shown; - scale_factor = rhs.scale_factor; - Maximum_value = rhs.Maximum_value; - Minimum_value = rhs.Minimum_value; - Maj_div = rhs.Maj_div; - Min_div = rhs.Min_div; - Modulo = rhs.Modulo; - signif_digits = rhs.signif_digits; - } - return *this; -} instr_scale :: ~ instr_scale () {} diff --git a/src/Cockpit/hud_tbi.cxx b/src/Cockpit/hud_tbi.cxx index 3c0430c38..5a8f9bf34 100644 --- a/src/Cockpit/hud_tbi.cxx +++ b/src/Cockpit/hud_tbi.cxx @@ -41,17 +41,6 @@ fgTBI_instr :: fgTBI_instr( const fgTBI_instr & image): { } -fgTBI_instr & fgTBI_instr :: -operator = (const fgTBI_instr & rhs ) -{ - if( !(this == &rhs)) { - dual_instr_item::operator = (rhs); - BankLimit = rhs.BankLimit; - SlewLimit = rhs.SlewLimit; - scr_hole = rhs.scr_hole; - } - return *this; -} // // Draws a Turn Bank Indicator on the screen -- 2.39.5