mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[wpilibc] Shuffleboard SimpleWidget: Return pointer instead of reference (#4703)
Based on beta test feedback, returning a pointer is more intuitive, as typically the return value is late bound to an instance variable.
This commit is contained in:
@@ -27,17 +27,19 @@ class SimpleWidget final : public ShuffleboardWidget<SimpleWidget> {
|
||||
|
||||
/**
|
||||
* Gets the NetworkTable entry that contains the data for this widget.
|
||||
* The widget owns the entry.
|
||||
* The widget owns the entry; the returned pointer's lifetime is the same as
|
||||
* that of the widget.
|
||||
*/
|
||||
nt::GenericEntry& GetEntry();
|
||||
nt::GenericEntry* GetEntry();
|
||||
|
||||
/**
|
||||
* Gets the NetworkTable entry that contains the data for this widget.
|
||||
* The widget owns the entry.
|
||||
* The widget owns the entry; the returned pointer's lifetime is the same as
|
||||
* that of the widget.
|
||||
*
|
||||
* @param typeString NT type string
|
||||
*/
|
||||
nt::GenericEntry& GetEntry(std::string_view typeString);
|
||||
nt::GenericEntry* GetEntry(std::string_view typeString);
|
||||
|
||||
void BuildInto(std::shared_ptr<nt::NetworkTable> parentTable,
|
||||
std::shared_ptr<nt::NetworkTable> metaTable) override;
|
||||
|
||||
Reference in New Issue
Block a user