mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
Use std::string_view and fmtlib across all libraries (#3402)
- Twine, StringRef, Format, and NativeFormatting have been removed - Logging now uses fmtlib style formatting - Nearly all uses of wpi::outs/errs have been replaced with fmt::print() or std::puts()/std::fputs() (for unformatted strings). - A wpi/fmt/raw_ostream.h header has been added to enable fmt::print() with wpi::raw_ostream
This commit is contained in:
@@ -100,7 +100,7 @@ class SendableBuilderImpl : public SendableBuilder {
|
||||
|
||||
void AddStringProperty(std::string_view key,
|
||||
std::function<std::string()> getter,
|
||||
std::function<void(wpi::StringRef)> setter) override;
|
||||
std::function<void(std::string_view)> setter) override;
|
||||
|
||||
void AddBooleanArrayProperty(
|
||||
std::string_view key, std::function<std::vector<int>()> getter,
|
||||
@@ -115,7 +115,7 @@ class SendableBuilderImpl : public SendableBuilder {
|
||||
std::function<void(wpi::ArrayRef<std::string>)> setter) override;
|
||||
|
||||
void AddRawProperty(std::string_view key, std::function<std::string()> getter,
|
||||
std::function<void(wpi::StringRef)> setter) override;
|
||||
std::function<void(std::string_view)> setter) override;
|
||||
|
||||
void AddValueProperty(
|
||||
std::string_view key, std::function<std::shared_ptr<nt::Value>()> getter,
|
||||
@@ -123,8 +123,8 @@ class SendableBuilderImpl : public SendableBuilder {
|
||||
|
||||
void AddSmallStringProperty(
|
||||
std::string_view key,
|
||||
std::function<wpi::StringRef(wpi::SmallVectorImpl<char>& buf)> getter,
|
||||
std::function<void(wpi::StringRef)> setter) override;
|
||||
std::function<std::string_view(wpi::SmallVectorImpl<char>& buf)> getter,
|
||||
std::function<void(std::string_view)> setter) override;
|
||||
|
||||
void AddSmallBooleanArrayProperty(
|
||||
std::string_view key,
|
||||
@@ -146,8 +146,8 @@ class SendableBuilderImpl : public SendableBuilder {
|
||||
|
||||
void AddSmallRawProperty(
|
||||
std::string_view key,
|
||||
std::function<wpi::StringRef(wpi::SmallVectorImpl<char>& buf)> getter,
|
||||
std::function<void(wpi::StringRef)> setter) override;
|
||||
std::function<std::string_view(wpi::SmallVectorImpl<char>& buf)> getter,
|
||||
std::function<void(std::string_view)> setter) override;
|
||||
|
||||
private:
|
||||
struct Property {
|
||||
|
||||
Reference in New Issue
Block a user