diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-02-16 17:23:46 +0000 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-02-16 17:23:46 +0000 |
commit | 184b44bb06cae6f167c36948c436d445732eb864 (patch) | |
tree | f192dfa11a27c52644958eb9ac18d7d7e4f9ee86 | |
parent | 432b62d7dc1190eb4acc03d777bfcf020e9f4ecc (diff) |
Change to push_back instead of insert.
Change-Id: If4c03e71894fecf4a926ae314d2b8ef0c54950ac
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r-- | src/can-signals.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/can-signals.cpp b/src/can-signals.cpp index b20c540d..1b0207c7 100644 --- a/src/can-signals.cpp +++ b/src/can-signals.cpp @@ -29,8 +29,9 @@ std::map <CanSignal, struct afb_event>::iterator subscribed_signals_i; /* Find one or many signals based on its name or id * passed through openxc_DynamicField. */ -void find_can_signals(openxc_DynamicField *key, std:vector <CanSignal> *signals) +std:vector <CanSignal> find_can_signals(openxc_DynamicField *key) { + std:vector <CanSignal> signals; int n_signals, i; n_signals = getSignalCount(); @@ -41,7 +42,7 @@ void find_can_signals(openxc_DynamicField *key, std:vector <CanSignal> *signals) for(i=0; i<=n_signals; i++) { if(fnmatch(key->string_value, SIGNALS[i]->genericName) == 0) - signals.insert(&SIGNALS[i]); + signals.push_back(&SIGNALS[i]); } break; case openxc_DynamicField_Type::openxc_DynamicField_Type_NUM: @@ -49,7 +50,7 @@ void find_can_signals(openxc_DynamicField *key, std:vector <CanSignal> *signals) { CanMessageDefinition *msg_def = SIGNALS[i]->message; if(msg_def->id == key->numeric_value) - signals.insert(&SIGNALS[i]) + signals.push_back(&SIGNALS[i]) } break; default: |