Skip to content

Commit fd74751

Browse files
committed
debug(test): reverting commented out code. Attempting to set env of the build type in windows
1 parent 048779b commit fd74751

File tree

2 files changed

+23
-20
lines changed

2 files changed

+23
-20
lines changed

.github/workflows/pipeline.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ jobs:
7878
build_type: [Debug, Release]
7979
std: [11]
8080

81+
env:
82+
BUILD_TYPE: ${{matrix.build_type}}
83+
8184
steps:
8285
- uses: actions/checkout@v4
8386

src/dbc.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -185,32 +185,32 @@ void DbcParser::parse_dbc_messages(const std::vector<std::string>& lines) {
185185
continue;
186186
}
187187

188-
// if (std::regex_search(line, match, value_re)) {
189-
// uint32_t message_id = static_cast<uint32_t>(std::stoul(match.str(2)));
190-
// std::string signal_name = match.str(3);
188+
if (std::regex_search(line, match, value_re)) {
189+
uint32_t message_id = static_cast<uint32_t>(std::stoul(match.str(2)));
190+
std::string signal_name = match.str(3);
191191

192-
// // Loop over the rest of the descriptions
193-
// std::string rest_of_descriptions = match.str(4);
194-
// std::regex description_re("\\s(\\d+)\\s\"([^\"]*)\"");
192+
// Loop over the rest of the descriptions
193+
std::string rest_of_descriptions = match.str(4);
194+
std::regex description_re("\\s(\\d+)\\s\"([^\"]*)\"");
195195

196-
// std::sregex_iterator desc_iter(rest_of_descriptions.begin(), rest_of_descriptions.end(), description_re);
197-
// std::sregex_iterator desc_end = std::sregex_iterator();
196+
std::sregex_iterator desc_iter(rest_of_descriptions.begin(), rest_of_descriptions.end(), description_re);
197+
std::sregex_iterator desc_end = std::sregex_iterator();
198198

199-
// std::vector<Signal::SignalValueDescriptions> values{};
200-
// for (std::sregex_iterator i = desc_iter; i != desc_end; ++i) {
201-
// std::smatch desc_match = *desc_iter;
202-
// uint32_t number = static_cast<uint32_t>(std::stoul(desc_match.str(1)));
203-
// std::string text = desc_match.str(2);
199+
std::vector<Signal::SignalValueDescriptions> values{};
200+
for (std::sregex_iterator i = desc_iter; i != desc_end; ++i) {
201+
std::smatch desc_match = *desc_iter;
202+
uint32_t number = static_cast<uint32_t>(std::stoul(desc_match.str(1)));
203+
std::string text = desc_match.str(2);
204204

205-
// values.push_back(Signal::SignalValueDescriptions{number, text});
206-
// ++desc_iter;
207-
// }
205+
values.push_back(Signal::SignalValueDescriptions{number, text});
206+
++desc_iter;
207+
}
208208

209-
// VALObject obj{message_id, signal_name, values};
209+
VALObject obj{message_id, signal_name, values};
210210

211-
// signal_value.push_back(obj);
212-
// continue;
213-
// }
211+
signal_value.push_back(obj);
212+
continue;
213+
}
214214
}
215215

216216
for (const auto& signal : signal_value) {

0 commit comments

Comments
 (0)