mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00: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:
parent
ba6ee9d7ba
commit
e5b91f00b0
21 changed files with 57 additions and 97 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue