Skip to content

Commit

Permalink
add necessary position copy constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
sid-parikh committed Apr 28, 2024
1 parent 381b05d commit 6ec0a0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions soccer/src/soccer/strategy/agent/position/solo_offense.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace strategy {

SoloOffense::SoloOffense(const Position& other) : Position{other} {

Check warning on line 5 in soccer/src/soccer/strategy/agent/position/solo_offense.cpp

View workflow job for this annotation

GitHub Actions / build-and-test

constructor does not initialize these fields: marking_id_
position_name_ = "SoloOffense";
}

SoloOffense::SoloOffense(int r_id) : Position{r_id, "SoloOffense"} {}

Check warning on line 9 in soccer/src/soccer/strategy/agent/position/solo_offense.cpp

View workflow job for this annotation

GitHub Actions / build-and-test

constructor does not initialize these fields: marking_id_

std::optional<RobotIntent> SoloOffense::derived_get_task(RobotIntent intent) {
Expand Down
1 change: 1 addition & 0 deletions soccer/src/soccer/strategy/agent/position/solo_offense.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace strategy {

class SoloOffense : public Position {

Check warning on line 23 in soccer/src/soccer/strategy/agent/position/solo_offense.hpp

View workflow job for this annotation

GitHub Actions / build-and-test

class 'SoloOffense' defines a default destructor, a copy constructor and a move constructor but does not define a copy assignment operator or a move assignment operator
public:
SoloOffense(const Position& other);
SoloOffense(int r_id);
~SoloOffense() override = default;
SoloOffense(const SoloOffense& other) = default;
Expand Down

0 comments on commit 6ec0a0b

Please sign in to comment.