mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Upgrade to C++20 (#4239)
* Use explicit this capture required by C++20 * Use C++20 span * Replace wpi::numbers with std::numbers * Fix C++20 clang-tidy warning false positive in fmt * Remove ciso646 include since C++20 removed that header * Fix global-buffer-overflow asan warnings in ntcore tests * Add DIOSetProxy constructor to HAL * Upgrade MSVC compiler to 2022 * Bump native-utils to 2023.2.7 (changes to std=c++20) Co-authored-by: Peter Johnson <johnson.peter@gmail.com>
This commit is contained in:
@@ -157,63 +157,63 @@ std::string SmartDashboard::GetString(std::string_view keyName,
|
||||
}
|
||||
|
||||
bool SmartDashboard::PutBooleanArray(std::string_view key,
|
||||
wpi::span<const int> value) {
|
||||
std::span<const int> value) {
|
||||
return GetInstance().table->GetEntry(key).SetBooleanArray(value);
|
||||
}
|
||||
|
||||
bool SmartDashboard::SetDefaultBooleanArray(std::string_view key,
|
||||
wpi::span<const int> defaultValue) {
|
||||
std::span<const int> defaultValue) {
|
||||
return GetInstance().table->GetEntry(key).SetDefaultBooleanArray(
|
||||
defaultValue);
|
||||
}
|
||||
|
||||
std::vector<int> SmartDashboard::GetBooleanArray(
|
||||
std::string_view key, wpi::span<const int> defaultValue) {
|
||||
std::string_view key, std::span<const int> defaultValue) {
|
||||
return GetInstance().table->GetEntry(key).GetBooleanArray(defaultValue);
|
||||
}
|
||||
|
||||
bool SmartDashboard::PutNumberArray(std::string_view key,
|
||||
wpi::span<const double> value) {
|
||||
std::span<const double> value) {
|
||||
return GetInstance().table->GetEntry(key).SetDoubleArray(value);
|
||||
}
|
||||
|
||||
bool SmartDashboard::SetDefaultNumberArray(
|
||||
std::string_view key, wpi::span<const double> defaultValue) {
|
||||
std::string_view key, std::span<const double> defaultValue) {
|
||||
return GetInstance().table->GetEntry(key).SetDefaultDoubleArray(defaultValue);
|
||||
}
|
||||
|
||||
std::vector<double> SmartDashboard::GetNumberArray(
|
||||
std::string_view key, wpi::span<const double> defaultValue) {
|
||||
std::string_view key, std::span<const double> defaultValue) {
|
||||
return GetInstance().table->GetEntry(key).GetDoubleArray(defaultValue);
|
||||
}
|
||||
|
||||
bool SmartDashboard::PutStringArray(std::string_view key,
|
||||
wpi::span<const std::string> value) {
|
||||
std::span<const std::string> value) {
|
||||
return GetInstance().table->GetEntry(key).SetStringArray(value);
|
||||
}
|
||||
|
||||
bool SmartDashboard::SetDefaultStringArray(
|
||||
std::string_view key, wpi::span<const std::string> defaultValue) {
|
||||
std::string_view key, std::span<const std::string> defaultValue) {
|
||||
return GetInstance().table->GetEntry(key).SetDefaultStringArray(defaultValue);
|
||||
}
|
||||
|
||||
std::vector<std::string> SmartDashboard::GetStringArray(
|
||||
std::string_view key, wpi::span<const std::string> defaultValue) {
|
||||
std::string_view key, std::span<const std::string> defaultValue) {
|
||||
return GetInstance().table->GetEntry(key).GetStringArray(defaultValue);
|
||||
}
|
||||
|
||||
bool SmartDashboard::PutRaw(std::string_view key,
|
||||
wpi::span<const uint8_t> value) {
|
||||
std::span<const uint8_t> value) {
|
||||
return GetInstance().table->GetEntry(key).SetRaw(value);
|
||||
}
|
||||
|
||||
bool SmartDashboard::SetDefaultRaw(std::string_view key,
|
||||
wpi::span<const uint8_t> defaultValue) {
|
||||
std::span<const uint8_t> defaultValue) {
|
||||
return GetInstance().table->GetEntry(key).SetDefaultRaw(defaultValue);
|
||||
}
|
||||
|
||||
std::vector<uint8_t> SmartDashboard::GetRaw(
|
||||
std::string_view key, wpi::span<const uint8_t> defaultValue) {
|
||||
std::string_view key, std::span<const uint8_t> defaultValue) {
|
||||
return GetInstance().table->GetEntry(key).GetRaw(defaultValue);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user