CanPacker: removing unnecessary string copying (#940)

remove string copy
This commit is contained in:
Dean Lee 2023-09-06 22:37:04 +08:00 committed by GitHub
parent 8f7e15202d
commit 33c7097321
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ CANPacker::CANPacker(const std::string& dbc_name) {
for (const auto& msg : dbc->msgs) {
message_lookup[msg.address] = msg;
for (const auto& sig : msg.sigs) {
signal_lookup[std::make_pair(msg.address, std::string(sig.name))] = sig;
signal_lookup[std::make_pair(msg.address, sig.name)] = sig;
}
}
init_crc_lookup_tables();