mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-06 03:31:43 +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:
@@ -4,7 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wpi/StringRef.h>
|
||||
#include <string_view>
|
||||
|
||||
#include "frc/shuffleboard/RecordingController.h"
|
||||
#include "frc/shuffleboard/ShuffleboardEventImportance.h"
|
||||
@@ -77,7 +77,7 @@ class Shuffleboard final {
|
||||
* @param title the title of the tab
|
||||
* @return the tab with the given title
|
||||
*/
|
||||
static ShuffleboardTab& GetTab(wpi::StringRef title);
|
||||
static ShuffleboardTab& GetTab(std::string_view title);
|
||||
|
||||
/**
|
||||
* Selects the tab in the dashboard with the given index in the range
|
||||
@@ -93,7 +93,7 @@ class Shuffleboard final {
|
||||
*
|
||||
* @param title the title of the tab to select
|
||||
*/
|
||||
static void SelectTab(wpi::StringRef title);
|
||||
static void SelectTab(std::string_view title);
|
||||
|
||||
/**
|
||||
* Enables user control of widgets containing actuators: speed controllers,
|
||||
@@ -141,7 +141,7 @@ class Shuffleboard final {
|
||||
*
|
||||
* @param format the format for the
|
||||
*/
|
||||
static void SetRecordingFileNameFormat(wpi::StringRef format);
|
||||
static void SetRecordingFileNameFormat(std::string_view format);
|
||||
|
||||
/**
|
||||
* Clears the custom name format for recording files. New recordings will use
|
||||
@@ -163,7 +163,8 @@ class Shuffleboard final {
|
||||
* @param description a description of the event
|
||||
* @param importance the importance of the event
|
||||
*/
|
||||
static void AddEventMarker(wpi::StringRef name, wpi::StringRef description,
|
||||
static void AddEventMarker(std::string_view name,
|
||||
std::string_view description,
|
||||
ShuffleboardEventImportance importance);
|
||||
|
||||
/**
|
||||
@@ -177,7 +178,7 @@ class Shuffleboard final {
|
||||
* @param name the name of the event
|
||||
* @param importance the importance of the event
|
||||
*/
|
||||
static void AddEventMarker(wpi::StringRef name,
|
||||
static void AddEventMarker(std::string_view name,
|
||||
ShuffleboardEventImportance importance);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user