Skip to content

Commit

Permalink
use member initializer list
Browse files Browse the repository at this point in the history
  • Loading branch information
t4-adc committed Mar 6, 2025
1 parent 70a256e commit 984d663
Showing 1 changed file with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,19 @@ class DetectionSensor : public DetectionSensorBase

struct NoiseOutput
{
double simulation_time, distance_noise, yaw_noise;

bool true_positive, flip;

explicit NoiseOutput(double simulation_time = 0.0) : simulation_time(simulation_time)
double simulation_time;
double distance_noise;
double yaw_noise;
bool true_positive;
bool flip;

constexpr NoiseOutput(double simulation_time = 0.0)
: simulation_time(simulation_time),
distance_noise(0.0),
yaw_noise(0.0),
true_positive(true),
flip(false)
{
distance_noise = 0.0;
yaw_noise = 0.0;
true_positive = true;
flip = false;
}
};

Expand Down

0 comments on commit 984d663

Please sign in to comment.