mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
[wpilib] Deprecate getInstance() in favor of static functions (#3440)
Co-authored-by: Noam Zaks <imnoamzaks@gmail.com>
This commit is contained in:
@@ -21,7 +21,7 @@ std::shared_ptr<SendableCameraWrapper>& GetSendableCameraWrapper(
|
||||
}
|
||||
|
||||
void AddToSendableRegistry(wpi::Sendable* sendable, std::string name) {
|
||||
wpi::SendableRegistry::GetInstance().Add(sendable, name);
|
||||
wpi::SendableRegistry::Add(sendable, name);
|
||||
}
|
||||
} // namespace detail
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ ComplexWidget& ShuffleboardContainer::Add(std::string_view title,
|
||||
}
|
||||
|
||||
ComplexWidget& ShuffleboardContainer::Add(wpi::Sendable& sendable) {
|
||||
auto name = wpi::SendableRegistry::GetInstance().GetName(&sendable);
|
||||
auto name = wpi::SendableRegistry::GetName(&sendable);
|
||||
if (name.empty()) {
|
||||
FRC_ReportError(err::Error, "{}", "Sendable must have a name");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user