add GetChars() accessors to many FString uses where const char* is wanted.
By no means complete, it's just a start to get rid of that automatic type conversion operator.
This commit is contained in:
parent
a3eb1ec1fd
commit
1717ff47b2
28 changed files with 92 additions and 97 deletions
|
|
@ -429,14 +429,14 @@ void FKeyBindings::ArchiveBindings(FConfigFile *f, const char *matchcmd)
|
|||
f->ClearKey(ConfigKeyName(i));
|
||||
}
|
||||
}
|
||||
else if (matchcmd == nullptr || stricmp(Binds[i], matchcmd) == 0)
|
||||
else if (matchcmd == nullptr || Binds[i].CompareNoCase(matchcmd) == 0)
|
||||
{
|
||||
if (Binds[i][0] == '\1')
|
||||
{
|
||||
Binds[i] = "";
|
||||
continue;
|
||||
}
|
||||
f->SetValueForKey(ConfigKeyName(i), Binds[i]);
|
||||
f->SetValueForKey(ConfigKeyName(i), Binds[i].GetChars());
|
||||
if (matchcmd != nullptr)
|
||||
{ // If saving a specific command, set a marker so that
|
||||
// it does not get saved in the general binding list.
|
||||
|
|
@ -465,7 +465,7 @@ int FKeyBindings::GetKeysForCommand (const char *cmd, int *first, int *second)
|
|||
|
||||
while (i < NUM_KEYS && c < 2)
|
||||
{
|
||||
if (stricmp (cmd, Binds[i]) == 0)
|
||||
if (stricmp (cmd, Binds[i].GetChars()) == 0)
|
||||
{
|
||||
if (c++ == 0)
|
||||
*first = i;
|
||||
|
|
@ -490,7 +490,7 @@ TArray<int> FKeyBindings::GetKeysForCommand (const char *cmd)
|
|||
|
||||
while (i < NUM_KEYS)
|
||||
{
|
||||
if (stricmp (cmd, Binds[i]) == 0)
|
||||
if (stricmp (cmd, Binds[i].GetChars()) == 0)
|
||||
{
|
||||
result.Push(i);
|
||||
}
|
||||
|
|
@ -511,7 +511,7 @@ void FKeyBindings::UnbindACommand (const char *str)
|
|||
|
||||
for (i = 0; i < NUM_KEYS; i++)
|
||||
{
|
||||
if (!stricmp (str, Binds[i]))
|
||||
if (!stricmp (str, Binds[i].GetChars()))
|
||||
{
|
||||
Binds[i] = "";
|
||||
}
|
||||
|
|
@ -538,7 +538,7 @@ void FKeyBindings::DefaultBind(const char *keyname, const char *cmd)
|
|||
}
|
||||
for (int i = 0; i < NUM_KEYS; ++i)
|
||||
{
|
||||
if (!Binds[i].IsEmpty() && stricmp (Binds[i], cmd) == 0)
|
||||
if (!Binds[i].IsEmpty() && stricmp (Binds[i].GetChars(), cmd) == 0)
|
||||
{ // This command is already bound to a key.
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue