Skip to content

Commit 3c6161d

Browse files
committed
Updated cppcheck commands
1 parent 3718e05 commit 3c6161d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

run_cppcheck.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cppcheck $( find . -name \*.h -or -name \*.cpp | grep -vE -e "^./build/" -e "^./vendor/") --output-file= results/cppcheck_test.txt
1+
cppcheck --language=c++ --std=c++11 -I include/ --suppress=missingIncludeSystem $( find . -name \*.h -or -name \*.cpp | grep -vE -e "^./build/" -e "^./vendor/") --output-file= results/cppcheck_test.txt

src/Robot.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ vector<Rect> Robot::transformToRobotFrame(vector<Rect> bbox_coords) {
151151
// Initialize the position vectors and variables
152152
Vector4d max_location = Vector4d::Random();
153153
Vector4d min_location = Vector4d::Random();
154-
double depth;
155154
double pix_to_cm = height_of_human/pixel_height_of_human;
156155
Eigen::Vector4d top_left;
157156
Eigen::Vector4d bottom_right;
@@ -163,7 +162,7 @@ vector<Rect> Robot::transformToRobotFrame(vector<Rect> bbox_coords) {
163162
for (int i = 0; i < number_of_boxes; i++) {
164163
// Create a rect for each detection
165164
Rect box = bbox_coords[i];
166-
depth = calculateDepth(box);
165+
double depth = calculateDepth(box);
167166
// Feed bounding box coordinates in vector of 4x1
168167
// Top left camera ref frame
169168
max_location << depth, box.x*pix_to_cm, box.y*pix_to_cm, 1;

0 commit comments

Comments
 (0)