Skip to content

Commit ceeef75

Browse files
committed
fix(checks): Fixing clang warnings about size comparison on the vector. Should have been just a empty check.
1 parent e123a0b commit ceeef75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dbc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ void DbcParser::parse_dbc_messages(const std::vector<std::string>& lines) {
181181
continue;
182182
}
183183

184-
if (std::regex_search(line, match, signal_re) && messages.size() > 0) {
184+
if (std::regex_search(line, match, signal_re) && !messages.empty()) {
185185
std::string name = match.str(SIGNAL_NAME_GROUP);
186186
bool is_multiplexed = false; // No support yet
187187
uint32_t start_bit = static_cast<uint32_t>(std::stoul(match.str(SIGNAL_START_BIT_GROUP)));
@@ -204,7 +204,7 @@ void DbcParser::parse_dbc_messages(const std::vector<std::string>& lines) {
204204
continue;
205205
}
206206

207-
if (std::regex_search(line, match, value_re) && messages.size() > 0) {
207+
if (std::regex_search(line, match, value_re) && !messages.empty()) {
208208
uint32_t message_id = static_cast<uint32_t>(std::stoul(match.str(2)));
209209
std::string signal_name = match.str(3);
210210

0 commit comments

Comments
 (0)