mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11: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:
@@ -9,12 +9,11 @@
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <wpi/StringRef.h>
|
||||
#include <wpi/Twine.h>
|
||||
#include <wpi/condition_variable.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
@@ -45,12 +44,12 @@ class DispatcherBase : public IDispatcher {
|
||||
|
||||
unsigned int GetNetworkMode() const;
|
||||
void StartLocal();
|
||||
void StartServer(const wpi::Twine& persist_filename,
|
||||
void StartServer(std::string_view persist_filename,
|
||||
std::unique_ptr<wpi::NetworkAcceptor> acceptor);
|
||||
void StartClient();
|
||||
void Stop();
|
||||
void SetUpdateRate(double interval);
|
||||
void SetIdentity(const wpi::Twine& name);
|
||||
void SetIdentity(std::string_view name);
|
||||
void Flush();
|
||||
std::vector<ConnectionInfo> GetConnections() const;
|
||||
bool IsConnected() const;
|
||||
@@ -132,12 +131,12 @@ class Dispatcher : public DispatcherBase {
|
||||
wpi::Logger& logger)
|
||||
: DispatcherBase(storage, notifier, logger) {}
|
||||
|
||||
void StartServer(const wpi::Twine& persist_filename,
|
||||
void StartServer(std::string_view persist_filename,
|
||||
const char* listen_address, unsigned int port);
|
||||
|
||||
void SetServer(const char* server_name, unsigned int port);
|
||||
void SetServer(
|
||||
wpi::ArrayRef<std::pair<wpi::StringRef, unsigned int>> servers);
|
||||
wpi::ArrayRef<std::pair<std::string_view, unsigned int>> servers);
|
||||
void SetServerTeam(unsigned int team, unsigned int port);
|
||||
|
||||
void SetServerOverride(const char* server_name, unsigned int port);
|
||||
|
||||
Reference in New Issue
Block a user