Skip to content

Commit

Permalink
add explicit default initialization to TimedPath properties
Browse files Browse the repository at this point in the history
  • Loading branch information
vovatrykoz committed Dec 9, 2024
1 parent 256ac53 commit 0b94da2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions include/TimedPath.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class TimedPath {
* @note The name is optional, and if not explicitly set, it will default to
* an empty string.
*/
std::string name;
std::string name = "";

/**
* @brief Appends a task instance to the end of the timed path.
Expand Down Expand Up @@ -190,8 +190,11 @@ class TimedPath {
bool operator!=(const TimedPath& other) const;

private:
std::vector<PeriodicTaskInstance>
tasks; // Stores the sequence of task instances in the path.
/**
* Stores the sequence of task instances in the path.
*/
std::vector<PeriodicTaskInstance> tasks =
std::vector<PeriodicTaskInstance>();
};

inline TimedPath::TimedPath() {}
Expand Down

0 comments on commit 0b94da2

Please sign in to comment.