diff --git a/src/common/PhysicalJoystick.cxx b/src/common/PhysicalJoystick.cxx index b499da0ee..a893b1962 100644 --- a/src/common/PhysicalJoystick.cxx +++ b/src/common/PhysicalJoystick.cxx @@ -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(PhysicalJoystick::Port::NUM_PORTS)> NAMES = diff --git a/src/common/PhysicalJoystick.hxx b/src/common/PhysicalJoystick.hxx index ee0aaa422..07aef67c8 100644 --- a/src/common/PhysicalJoystick.hxx +++ b/src/common/PhysicalJoystick.hxx @@ -90,7 +90,7 @@ class PhysicalJoystick // Convert from string to Port type and vice versa 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) { os << " ID: " << s.ID << ", name: " << s.name << ", numaxis: " << s.numAxes