mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02:00
Common: Replace StringBeginsWith/StringEndsWith with std equivalents
Obsoletes these functions in favor of the standard member functions added in C++20.
This commit is contained in:
@ -642,7 +642,7 @@ void Init(const std::string& game_id)
|
||||
{
|
||||
hasbind = true;
|
||||
type = BIND_AXIS;
|
||||
if (StringBeginsWith(value, "Device ''"))
|
||||
if (value.starts_with("Device ''"))
|
||||
sscanf(value.c_str(), "Device ''-Axis %d%c", &bindnum, &modifier);
|
||||
else
|
||||
sscanf(value.c_str(), "Device '%127[^\']'-Axis %d%c", dev, &bindnum, &modifier);
|
||||
@ -651,7 +651,7 @@ void Init(const std::string& game_id)
|
||||
{
|
||||
hasbind = true;
|
||||
type = BIND_BUTTON;
|
||||
if (StringBeginsWith(value, "Device ''"))
|
||||
if (value.starts_with("Device ''"))
|
||||
sscanf(value.c_str(), "Device ''-Button %d", &bindnum);
|
||||
else
|
||||
sscanf(value.c_str(), "Device '%127[^\']'-Button %d", dev, &bindnum);
|
||||
|
Reference in New Issue
Block a user