mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[wpilibc] Make IsSimulation() checks constexpr (#2769)
This commit is contained in:
@@ -24,7 +24,7 @@ IterativeRobot::IterativeRobot() : IterativeRobotBase(kPacketPeriod) {
|
||||
void IterativeRobot::StartCompetition() {
|
||||
RobotInit();
|
||||
|
||||
if (IsSimulation()) {
|
||||
if constexpr (IsSimulation()) {
|
||||
SimulationInit();
|
||||
}
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ void IterativeRobotBase::LoopFunc() {
|
||||
Shuffleboard::Update();
|
||||
m_watchdog.AddEpoch("Shuffleboard::Update()");
|
||||
|
||||
if (IsSimulation()) {
|
||||
if constexpr (IsSimulation()) {
|
||||
SimulationPeriodic();
|
||||
m_watchdog.AddEpoch("SimulationPeriodic()");
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ using namespace frc;
|
||||
void TimedRobot::StartCompetition() {
|
||||
RobotInit();
|
||||
|
||||
if (IsSimulation()) {
|
||||
if constexpr (IsSimulation()) {
|
||||
SimulationInit();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user