mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpilibc] Add mechanism to reset various global structures (#4007)
This commit is contained in:
@@ -30,6 +30,14 @@ static Instance& GetInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
#ifndef __FRC_ROBORIO__
|
||||
namespace frc::impl {
|
||||
void ResetPreferencesInstance() {
|
||||
GetInstance() = Instance();
|
||||
}
|
||||
} // namespace frc::impl
|
||||
#endif
|
||||
|
||||
Preferences* Preferences::GetInstance() {
|
||||
::GetInstance();
|
||||
static Preferences instance;
|
||||
|
||||
Reference in New Issue
Block a user