Fix uninitialized variables in PhotonPipelineResult (#282)

If the default constructor is used, some member variables weren't properly initialized.
This commit is contained in:
Tyler Veness
2021-09-02 20:48:05 -07:00
committed by GitHub
parent 6767781a41
commit affb27038b
5 changed files with 4 additions and 6 deletions

View File

@@ -92,8 +92,8 @@ class PhotonPipelineResult {
friend Packet& operator>>(Packet& packet, PhotonPipelineResult& result);
private:
units::second_t latency;
bool hasTargets;
units::second_t latency = 0_s;
bool hasTargets = false;
wpi::SmallVector<PhotonTrackedTarget, 10> targets;
inline static bool HAS_WARNED = false;
};

View File

@@ -38,7 +38,6 @@ class SimVisionTarget {
units::meter_t targetHeightAboveGround;
units::meter_t targetWidth;
units::meter_t targetHeight;
double targetInfill_pct;
units::square_meter_t tgtArea;
};