mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilibc] Return reference from GetInstance (#3247)
Improves consistency across all classes. Affects Preferences, LiveWindow, and CameraServer. Old commands Scheduler::GetInstance() was not updated as this is already deprecated.
This commit is contained in:
@@ -17,9 +17,9 @@ using namespace frc;
|
||||
// The Preferences table name
|
||||
static wpi::StringRef kTableName{"Preferences"};
|
||||
|
||||
Preferences* Preferences::GetInstance() {
|
||||
Preferences& Preferences::GetInstance() {
|
||||
static Preferences instance;
|
||||
return &instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
std::vector<std::string> Preferences::GetKeys() {
|
||||
@@ -143,3 +143,5 @@ Preferences::Preferences()
|
||||
NT_NOTIFY_NEW | NT_NOTIFY_IMMEDIATE);
|
||||
HAL_Report(HALUsageReporting::kResourceType_Preferences, 0);
|
||||
}
|
||||
|
||||
Preferences::~Preferences() = default;
|
||||
|
||||
Reference in New Issue
Block a user