boardd: const reference pandaStates to avoid copy (#23030)

pull/23008/head^2
Dean Lee 2021-11-25 07:45:48 +08:00 committed by GitHub
parent 8b6a147583
commit ab9c7a11a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -307,7 +307,7 @@ bool send_panda_states(PubMaster *pm, const std::vector<Panda *> &pandas, bool s
for (uint32_t i=0; i<pandas.size(); i++) {
auto panda = pandas[i];
auto pandaState = pandaStates[i];
const auto &pandaState = pandaStates[i];
// Make sure CAN buses are live: safety_setter_thread does not work if Panda CAN are silent and there is only one other CAN node
if (pandaState.safety_model == (uint8_t)(cereal::CarParams::SafetyModel::SILENT)) {