Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tensorrt_yolox): fix shadowVariable #7947

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions perception/tensorrt_yolox/src/tensorrt_yolox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@
cmap.name = name;
colormapString.erase(0, npos + 1);
while (!colormapString.empty()) {
size_t npos = colormapString.find_first_of(',');
if (npos != std::string::npos) {
substr = colormapString.substr(0, npos);
size_t inner_npos = colormapString.find_first_of(',');
if (inner_npos != std::string::npos) {
substr = colormapString.substr(0, inner_npos);

Check warning on line 135 in perception/tensorrt_yolox/src/tensorrt_yolox.cpp

View check run for this annotation

Codecov / codecov/patch

perception/tensorrt_yolox/src/tensorrt_yolox.cpp#L135

Added line #L135 was not covered by tests
unsigned char c = (unsigned char)std::stoi(trim(substr));
cmap.color.push_back(c);
colormapString.erase(0, npos + 1);
colormapString.erase(0, inner_npos + 1);

Check warning on line 138 in perception/tensorrt_yolox/src/tensorrt_yolox.cpp

View check run for this annotation

Codecov / codecov/patch

perception/tensorrt_yolox/src/tensorrt_yolox.cpp#L138

Added line #L138 was not covered by tests
} else {
unsigned char c = (unsigned char)std::stoi(trim(colormapString));
cmap.color.push_back(c);
Expand Down
Loading