mirror of
https://github.com/libretro/stella2023.git
synced 2025-02-24 11:22:27 +00:00
Fix error using string_view where string is expected. This needs to be fixed in json eventually.
This commit is contained in:
parent
480f7ab9f0
commit
7c34bdd27b
@ -126,7 +126,7 @@ string PhysicalJoystick::getName(const PhysicalJoystick::Port _port) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
PhysicalJoystick::Port PhysicalJoystick::getPort(string_view portName) const
|
PhysicalJoystick::Port PhysicalJoystick::getPort(const string& portName) const
|
||||||
{
|
{
|
||||||
static constexpr std::array<string_view,
|
static constexpr std::array<string_view,
|
||||||
static_cast<int>(PhysicalJoystick::Port::NUM_PORTS)> NAMES =
|
static_cast<int>(PhysicalJoystick::Port::NUM_PORTS)> NAMES =
|
||||||
|
@ -90,7 +90,7 @@ class PhysicalJoystick
|
|||||||
|
|
||||||
// Convert from string to Port type and vice versa
|
// Convert from string to Port type and vice versa
|
||||||
string getName(const Port _port) const;
|
string getName(const Port _port) const;
|
||||||
Port getPort(string_view portName) const;
|
Port getPort(const string& portName) const; // FIXME: allow string_view
|
||||||
|
|
||||||
friend ostream& operator<<(ostream& os, const PhysicalJoystick& s) {
|
friend ostream& operator<<(ostream& os, const PhysicalJoystick& s) {
|
||||||
os << " ID: " << s.ID << ", name: " << s.name << ", numaxis: " << s.numAxes
|
os << " ID: " << s.ID << ", name: " << s.name << ", numaxis: " << s.numAxes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user