Skip to content

Commit

Permalink
respond to review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chauser committed Dec 16, 2024
1 parent e83e903 commit 13024a7
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 48 deletions.
22 changes: 11 additions & 11 deletions ntcore/src/main/native/include/networktables/GenericEntry.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ class GenericPublisher : public Publisher {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultBoolean(bool defaultValue) {
return nt::SetDefaultBoolean(m_pubHandle, defaultValue);
Expand All @@ -397,7 +397,7 @@ class GenericPublisher : public Publisher {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultInteger(int64_t defaultValue) {
return nt::SetDefaultInteger(m_pubHandle, defaultValue);
Expand All @@ -407,7 +407,7 @@ class GenericPublisher : public Publisher {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultFloat(float defaultValue) {
return nt::SetDefaultFloat(m_pubHandle, defaultValue);
Expand All @@ -417,7 +417,7 @@ class GenericPublisher : public Publisher {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultDouble(double defaultValue) {
return nt::SetDefaultDouble(m_pubHandle, defaultValue);
Expand All @@ -427,7 +427,7 @@ class GenericPublisher : public Publisher {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultString(std::string_view defaultValue) {
return nt::SetDefaultString(m_pubHandle, defaultValue);
Expand All @@ -437,7 +437,7 @@ class GenericPublisher : public Publisher {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultRaw(std::span<const uint8_t> defaultValue) {
return nt::SetDefaultRaw(m_pubHandle, defaultValue);
Expand All @@ -447,7 +447,7 @@ class GenericPublisher : public Publisher {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultBooleanArray(std::span<const int> defaultValue) {
return nt::SetDefaultBooleanArray(m_pubHandle, defaultValue);
Expand All @@ -457,7 +457,7 @@ class GenericPublisher : public Publisher {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultIntegerArray(std::span<const int64_t> defaultValue) {
return nt::SetDefaultIntegerArray(m_pubHandle, defaultValue);
Expand All @@ -467,7 +467,7 @@ class GenericPublisher : public Publisher {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultFloatArray(std::span<const float> defaultValue) {
return nt::SetDefaultFloatArray(m_pubHandle, defaultValue);
Expand All @@ -477,7 +477,7 @@ class GenericPublisher : public Publisher {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultDoubleArray(std::span<const double> defaultValue) {
return nt::SetDefaultDoubleArray(m_pubHandle, defaultValue);
Expand All @@ -487,7 +487,7 @@ class GenericPublisher : public Publisher {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultStringArray(std::span<const std::string> defaultValue) {
return nt::SetDefaultStringArray(m_pubHandle, defaultValue);
Expand Down
16 changes: 8 additions & 8 deletions ntcore/src/main/native/include/networktables/NetworkTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class NetworkTable final {
*
* @param key the key
* @param defaultValue the default value to set if key doesn't exist.
* @returns False if the table key exists
* @returns True if the table key did not already exist, otherwise False
*/
bool SetDefaultNumber(std::string_view key, double defaultValue);

Expand Down Expand Up @@ -393,7 +393,7 @@ class NetworkTable final {
*
* @param key the key
* @param defaultValue the default value to set if key doesn't exist.
* @returns False if the table key exists
* @returns True if the table key did not already exist, otherwise False
*/
bool SetDefaultString(std::string_view key, std::string_view defaultValue);

Expand Down Expand Up @@ -423,7 +423,7 @@ class NetworkTable final {
*
* @param key the key
* @param defaultValue the default value to set if key doesn't exist.
* @returns False if the table key exists
* @returns True if the table key did not already exist, otherwise False
*/
bool SetDefaultBoolean(std::string_view key, bool defaultValue);

Expand Down Expand Up @@ -456,7 +456,7 @@ class NetworkTable final {
*
* @param key the key
* @param defaultValue the default value to set if key doesn't exist.
* @return False if the table key exists
* @return True if the table key did not already exist, otherwise False
*/
bool SetDefaultBooleanArray(std::string_view key,
std::span<const int> defaultValue);
Expand Down Expand Up @@ -494,7 +494,7 @@ class NetworkTable final {
*
* @param key the key
* @param defaultValue the default value to set if key doesn't exist.
* @returns False if the table key exists
* @returns True if the table key did not already exist, otherwise False
*/
bool SetDefaultNumberArray(std::string_view key,
std::span<const double> defaultValue);
Expand Down Expand Up @@ -528,7 +528,7 @@ class NetworkTable final {
*
* @param key the key
* @param defaultValue the default value to set if key doesn't exist.
* @returns False if the table key exists
* @returns True if the table key did not already exist, otherwise False
*/
bool SetDefaultStringArray(std::string_view key,
std::span<const std::string> defaultValue);
Expand Down Expand Up @@ -562,7 +562,7 @@ class NetworkTable final {
*
* @param key the key
* @param defaultValue the default value to set if key doesn't exist.
* @return False if the table key exists
* @return True if the table key did not already exist, otherwise False
*/
bool SetDefaultRaw(std::string_view key,
std::span<const uint8_t> defaultValue);
Expand Down Expand Up @@ -596,7 +596,7 @@ class NetworkTable final {
*
* @param key the key
* @param defaultValue the default value to set if key doesn't exist.
* @return False if the table key exists
* @return True if the table key did not already exist, otherwise False
*/
bool SetDefaultValue(std::string_view key, const Value& defaultValue);

Expand Down
24 changes: 12 additions & 12 deletions ntcore/src/main/native/include/networktables/NetworkTableEntry.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ class NetworkTableEntry final {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultValue(const Value& defaultValue) {
return SetDefaultEntryValue(m_handle, defaultValue);
Expand All @@ -270,7 +270,7 @@ class NetworkTableEntry final {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultBoolean(bool defaultValue) {
return nt::SetDefaultBoolean(m_handle, defaultValue);
Expand All @@ -280,7 +280,7 @@ class NetworkTableEntry final {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultInteger(int64_t defaultValue) {
return nt::SetDefaultInteger(m_handle, defaultValue);
Expand All @@ -290,7 +290,7 @@ class NetworkTableEntry final {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultFloat(float defaultValue) {
return nt::SetDefaultFloat(m_handle, defaultValue);
Expand All @@ -300,7 +300,7 @@ class NetworkTableEntry final {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultDouble(double defaultValue) {
return nt::SetDefaultDouble(m_handle, defaultValue);
Expand All @@ -310,7 +310,7 @@ class NetworkTableEntry final {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultString(std::string_view defaultValue) {
return nt::SetDefaultString(m_handle, defaultValue);
Expand All @@ -320,7 +320,7 @@ class NetworkTableEntry final {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultRaw(std::span<const uint8_t> defaultValue) {
return nt::SetDefaultRaw(m_handle, defaultValue);
Expand All @@ -330,7 +330,7 @@ class NetworkTableEntry final {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultBooleanArray(std::span<const int> defaultValue) {
return nt::SetDefaultBooleanArray(m_handle, defaultValue);
Expand All @@ -340,7 +340,7 @@ class NetworkTableEntry final {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultIntegerArray(std::span<const int64_t> defaultValue) {
return nt::SetDefaultIntegerArray(m_handle, defaultValue);
Expand All @@ -350,7 +350,7 @@ class NetworkTableEntry final {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultFloatArray(std::span<const float> defaultValue) {
return nt::SetDefaultFloatArray(m_handle, defaultValue);
Expand All @@ -360,7 +360,7 @@ class NetworkTableEntry final {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultDoubleArray(std::span<const double> defaultValue) {
return nt::SetDefaultDoubleArray(m_handle, defaultValue);
Expand All @@ -370,7 +370,7 @@ class NetworkTableEntry final {
* Sets the entry's value if it does not exist.
*
* @param defaultValue the default value to set
* @return False if the entry exists
* @return True if the entry did not already have a value, otherwise False
*/
bool SetDefaultStringArray(std::span<const std::string> defaultValue) {
return nt::SetDefaultStringArray(m_handle, defaultValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class SmartDashboard {
* Gets the current value in the table, setting it if it does not exist.
* @param key the key
* @param defaultValue the default value to set if key doesn't exist.
* @returns False if the table key exists
* @returns True if the table key did not already exist, otherwise False
*/
static bool SetDefaultBoolean(std::string_view key, bool defaultValue);

Expand Down Expand Up @@ -157,7 +157,7 @@ class SmartDashboard {
*
* @param key The key.
* @param defaultValue The default value to set if key doesn't exist.
* @returns False if the table key exists
* @returns True if the table key did not already exist, otherwise False
*/
static bool SetDefaultNumber(std::string_view key, double defaultValue);

Expand Down Expand Up @@ -189,7 +189,7 @@ class SmartDashboard {
*
* @param key the key
* @param defaultValue the default value to set if key doesn't exist.
* @returns False if the table key exists
* @returns True if the table key did not already exist, otherwise False
*/
static bool SetDefaultString(std::string_view key,
std::string_view defaultValue);
Expand Down Expand Up @@ -224,7 +224,7 @@ class SmartDashboard {
*
* @param key the key
* @param defaultValue the default value to set if key doesn't exist.
* @returns False if the table key exists
* @returns True if the table key did not already exist, otherwise False
*/
static bool SetDefaultBooleanArray(std::string_view key,
std::span<const int> defaultValue);
Expand Down Expand Up @@ -265,7 +265,7 @@ class SmartDashboard {
*
* @param key The key.
* @param defaultValue The default value to set if key doesn't exist.
* @returns False if the table key exists
* @returns True if the table key did not already exist, otherwise False
*/
static bool SetDefaultNumberArray(std::string_view key,
std::span<const double> defaultValue);
Expand Down Expand Up @@ -302,7 +302,7 @@ class SmartDashboard {
*
* @param key The key.
* @param defaultValue The default value to set if key doesn't exist.
* @returns False if the table key exists
* @returns True if the table key did not already exist, otherwise False
*/
static bool SetDefaultStringArray(std::string_view key,
std::span<const std::string> defaultValue);
Expand Down Expand Up @@ -338,7 +338,7 @@ class SmartDashboard {
*
* @param key The key.
* @param defaultValue The default value to set if key doesn't exist.
* @returns False if the table key exists
* @returns True if the table key did not already exist, otherwise False
*/
static bool SetDefaultRaw(std::string_view key,
std::span<const uint8_t> defaultValue);
Expand Down Expand Up @@ -378,7 +378,7 @@ class SmartDashboard {
*
* @param key the key
* @param defaultValue The default value to set if key doesn't exist.
* @returns False if the table key exists
* @returns True if the table key did not already exist, otherwise False
*/
static bool SetDefaultValue(std::string_view key,
const nt::Value& defaultValue);
Expand Down
Loading

0 comments on commit 13024a7

Please sign in to comment.