[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

@@ -45,7 +45,7 @@ struct CameraServer::Impl {
std::vector<std::string> m_addresses;
};
CameraServer& CameraServer::GetInstance() {
CameraServer* CameraServer::GetInstance() {
struct Creator {
static void* call() { return new CameraServer{}; }
};
@@ -53,7 +53,7 @@ CameraServer& CameraServer::GetInstance() {
static void call(void* ptr) { delete static_cast<CameraServer*>(ptr); }
};
static wpi::ManagedStatic<CameraServer, Creator, Deleter> instance;
return *instance;
return &(*instance);
}
static wpi::StringRef MakeSourceValue(CS_Source source,