get value by reference in ranged based loop (#624)
parent
e035fa1d09
commit
f71fd7b91b
|
@ -150,7 +150,7 @@ DWORD PandaJ2534Device::kline_recv_thread() {
|
|||
continue;
|
||||
}
|
||||
|
||||
for (auto msg : msg_recv) {
|
||||
for (auto &msg : msg_recv) {
|
||||
for (auto& conn : this->connections) {
|
||||
if (conn != nullptr && !conn->isProtoCan()) {
|
||||
J2534Frame msg_out(conn->getProtocol(), msg);
|
||||
|
|
|
@ -323,7 +323,7 @@ bool Panda::can_send_many(const std::vector<PANDA_CAN_MSG>& can_msgs) {
|
|||
std::vector<PANDA_CAN_MSG_INTERNAL> formatted_msgs;
|
||||
formatted_msgs.reserve(can_msgs.size());
|
||||
|
||||
for (auto msg : can_msgs) {
|
||||
for (auto &msg : can_msgs) {
|
||||
if (msg.bus == PANDA_CAN_UNK) continue;
|
||||
if (msg.len > 8) continue;
|
||||
PANDA_CAN_MSG_INTERNAL tmpmsg = {};
|
||||
|
|
Loading…
Reference in New Issue