mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
Fix IterativeRobot/TimedRobot RobotInit(). (#633)
In C++, it's not legal to call a virtual function from within a constructor, so the user override was never called (the base function is always called). See https://isocpp.org/wiki/faq/strange-inheritance#calling-virtuals-from-ctors While this is technically allowed in Java, also change Java for consistency.
This commit is contained in:
@@ -55,7 +55,6 @@ class IterativeRobotBase : public RobotBase {
|
||||
virtual void TestPeriodic();
|
||||
|
||||
protected:
|
||||
IterativeRobotBase();
|
||||
virtual ~IterativeRobotBase() = default;
|
||||
|
||||
void LoopFunc();
|
||||
|
||||
Reference in New Issue
Block a user