Skip to content

Commit

Permalink
Fixing a few warnings (#2147)
Browse files Browse the repository at this point in the history
  • Loading branch information
sid-parikh authored Jan 31, 2024
1 parent 0324315 commit 7dc2b0f
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 18 deletions.
8 changes: 4 additions & 4 deletions rj_geometry/include/rj_geometry/rect.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ class Rect : public Shape {
pt[1] = p2;
}

Rect(const Rect& other) {
pt[0] = other.pt[0];
pt[1] = other.pt[1];
}
Rect(const Rect& other) = default;
Rect(Rect&& other) = default;
Rect& operator=(const Rect& other) = default;
Rect& operator=(Rect&& other) = default;

Shape* clone() const override;

Expand Down
8 changes: 4 additions & 4 deletions soccer/src/rj_vision_filter/robot/kalman_robot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ using kalman_robot::PARAM_max_time_outside_vision;

KalmanRobot::KalmanRobot(unsigned int camera_id, RJ::Time creation_time,
CameraRobot init_measurement, const WorldRobot& previous_world_robot)
: camera_id_(camera_id),
health_(filter::health::PARAM_init),
last_update_time_(creation_time),
: last_update_time_(creation_time),
last_predict_time_(creation_time),
previous_measurements_(kick::detector::PARAM_slow_kick_hist_length),
unwrap_theta_ctr_(0),
health_(filter::health::PARAM_init),
robot_id_(init_measurement.get_robot_id()),
previous_measurements_(kick::detector::PARAM_slow_kick_hist_length) {
camera_id_(camera_id) {
rj_geometry::Pose init_pose = init_measurement.get_pose();
rj_geometry::Twist init_twist(0, 0, 0);

Expand Down
2 changes: 1 addition & 1 deletion soccer/src/rj_vision_filter/robot/world_robot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ WorldRobot::WorldRobot() : is_valid_(false) {}

WorldRobot::WorldRobot(RJ::Time calc_time, Team team, int robot_id,
const std::list<KalmanRobot>& kalman_robots)
: team_(team), robot_id_(robot_id), is_valid_(true), time_(calc_time) {
: team_(team), robot_id_(robot_id), time_(calc_time), is_valid_(true) {
// Theta's are converted to rect coords then back to polar to convert
rj_geometry::Point pos_cartesian_avg;
rj_geometry::Point theta_cartesian_avg;
Expand Down
4 changes: 1 addition & 3 deletions soccer/src/soccer/debug_drawer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ struct Context;

class DebugDrawer {
public:
DebugDrawer(Context* context) : context_(context), num_debug_layers_(0) {
reset_log_frame();
}
DebugDrawer(Context* context) : num_debug_layers_(0), context_(context) { reset_log_frame(); }

const QStringList& debug_layers() const { return debug_layers_; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ namespace planning {
*/
class RoboCupStateSpace : public RRT::StateSpace<rj_geometry::Point> {
public:
RoboCupStateSpace(const FieldDimensions& dims,
const rj_geometry::ShapeSet& obstacles)
: field_dimensions_(dims), obstacles_(obstacles) {}
RoboCupStateSpace(const FieldDimensions& dims, const rj_geometry::ShapeSet& obstacles)
: obstacles_(obstacles), field_dimensions_(dims) {}

rj_geometry::Point randomState() const override {
double x = field_dimensions_.floor_width() * (drand48() - 0.5f);
Expand Down
2 changes: 1 addition & 1 deletion soccer/src/soccer/processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ using namespace google::protobuf;
FieldDimensions* current_dimensions = &FieldDimensions::current_dimensions;

Processor::Processor(bool sim, bool blue_team, const std::string& read_log_file)
: loop_mutex_(), read_log_file_(read_log_file) {
: read_log_file_(read_log_file), loop_mutex_() {
// Set the logger to ros2.
rj_utils::set_spdlog_default_ros2("processor");

Expand Down
4 changes: 2 additions & 2 deletions soccer/src/soccer/radio/sim_radio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ static SimulatorCommand convert_placement_to_proto(

SimRadio::SimRadio(bool blue_team)
: Radio(),
blue_team_(blue_team),
socket_(io_service_, ip::udp::endpoint(ip::udp::v4(), blue_team ? kSimBlueStatusPort
: kSimYellowStatusPort)) {
: kSimYellowStatusPort)),
blue_team_(blue_team) {
for (size_t i = 0; i < kNumShells; ++i) {
last_sent_diff_.emplace_back(RJ::now());
}
Expand Down

0 comments on commit 7dc2b0f

Please sign in to comment.