mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[wpilibc] Use std::string_view instead of Twine (#3380)
Use fmtlib where needed for string formatting into std::string_view.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <initializer_list>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@@ -31,8 +32,7 @@ class FieldObject2d {
|
||||
struct private_init {};
|
||||
|
||||
public:
|
||||
FieldObject2d(std::string&& name, const private_init&)
|
||||
: m_name{std::move(name)} {}
|
||||
FieldObject2d(std::string_view name, const private_init&) : m_name{name} {}
|
||||
|
||||
FieldObject2d(FieldObject2d&& rhs);
|
||||
FieldObject2d& operator=(FieldObject2d&& rhs);
|
||||
|
||||
Reference in New Issue
Block a user