[wpilibc] Revert "Return reference from GetInstance" (#3342)

This reverts commit a79faace1b.

This change will be superseded in a non-breaking way by changing to static functions and deprecating GetInstance() entirely.
This commit is contained in:
Peter Johnson
2021-05-09 18:16:07 -07:00
committed by GitHub
parent 3cc2da3328
commit 3fe8fc75aa
18 changed files with 63 additions and 67 deletions

View File

@@ -34,9 +34,9 @@ class Preferences {
/**
* Get the one and only {@link Preferences} object.
*
* @return reference to the {@link Preferences}
* @return pointer to the {@link Preferences}
*/
static Preferences& GetInstance();
static Preferences* GetInstance();
/**
* Returns a vector of all the keys.
@@ -292,7 +292,6 @@ class Preferences {
protected:
Preferences();
~Preferences();
Preferences(Preferences&&) = default;
Preferences& operator=(Preferences&&) = default;

View File

@@ -29,7 +29,7 @@ class LiveWindow {
* This is a singleton to guarantee that there is only a single instance
* regardless of how many times GetInstance is called.
*/
static LiveWindow& GetInstance();
static LiveWindow* GetInstance();
/**
* Enable telemetry for a single component.
@@ -69,7 +69,6 @@ class LiveWindow {
private:
LiveWindow();
~LiveWindow() = default;
struct Impl;
std::unique_ptr<Impl> m_impl;