From: mfranz Date: Wed, 5 Jul 2006 09:39:46 +0000 (+0000) Subject: remove redundant vector::clear(). A just created vector *is* clear. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;ds=sidebyside;h=80bada55cd20de9e8bb8fd2557edc08afd534853;hp=9db2b4f22d1136ae55496222eaa5efe003f1bc24;p=flightgear.git remove redundant vector::clear(). A just created vector *is* clear. --- diff --git a/src/Network/ATC-Inputs.cxx b/src/Network/ATC-Inputs.cxx index 4d8a02c92..369a2d3bc 100644 --- a/src/Network/ATC-Inputs.cxx +++ b/src/Network/ATC-Inputs.cxx @@ -414,7 +414,7 @@ bool FGATCInput::do_analog_in() { string name = ""; string type = ""; string subtype = ""; - vector output_nodes; output_nodes.clear(); + vector output_nodes; int center = -1; int min = 0; int max = 1023; @@ -660,7 +660,7 @@ bool FGATCInput::do_switches() { string cname = child->getName(); string name = ""; string type = ""; - vector output_nodes; output_nodes.clear(); + vector output_nodes; int row = -1; int col = -1; float factor = 1.0; @@ -863,7 +863,7 @@ bool FGATCInput::do_radio_switches() { if ( cname == "switch" ) { string name = ""; string type = ""; - vector output_nodes; output_nodes.clear(); + vector output_nodes; int byte_num = -1; int right_shift = 0; int mask = 0xff; diff --git a/src/Network/generic.cxx b/src/Network/generic.cxx index 6e3cb85d7..60c99ee58 100644 --- a/src/Network/generic.cxx +++ b/src/Network/generic.cxx @@ -61,20 +61,16 @@ FGGeneric::FGGeneric(string& config) { return; } - _out_message.clear(); SGPropertyNode *output = root.getNode("generic/output"); if (output) read_config(output, _out_message); - _in_message.clear(); SGPropertyNode *input = root.getNode("generic/input"); if (input) read_config(input, _in_message); } FGGeneric::~FGGeneric() { - _out_message.clear(); - _in_message.clear(); }