remove redundant vector::clear(). A just created vector *is* clear.
This commit is contained in:
parent
9db2b4f22d
commit
80bada55cd
2 changed files with 3 additions and 7 deletions
|
@ -414,7 +414,7 @@ bool FGATCInput::do_analog_in() {
|
|||
string name = "";
|
||||
string type = "";
|
||||
string subtype = "";
|
||||
vector <SGPropertyNode *> output_nodes; output_nodes.clear();
|
||||
vector <SGPropertyNode *> 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 <SGPropertyNode *> output_nodes; output_nodes.clear();
|
||||
vector <SGPropertyNode *> 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 <SGPropertyNode *> output_nodes; output_nodes.clear();
|
||||
vector <SGPropertyNode *> output_nodes;
|
||||
int byte_num = -1;
|
||||
int right_shift = 0;
|
||||
int mask = 0xff;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue