mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 15:22:08 +00:00
made FCommandLine::operator[] return a const char * and fixed two places where this triggered a compile error.
This commit is contained in:
parent
b5fdd6deff
commit
769274656e
4 changed files with 5 additions and 6 deletions
|
@ -193,7 +193,7 @@ int FCommandLine::argc ()
|
||||||
return _argc;
|
return _argc;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *FCommandLine::operator[] (int i)
|
const char *FCommandLine::operator[] (int i)
|
||||||
{
|
{
|
||||||
if (_argv == NULL)
|
if (_argv == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
FCommandLine (const char *commandline, bool no_escapes = false);
|
FCommandLine (const char *commandline, bool no_escapes = false);
|
||||||
~FCommandLine ();
|
~FCommandLine ();
|
||||||
int argc ();
|
int argc ();
|
||||||
char *operator[] (int i);
|
const char *operator[] (int i);
|
||||||
const char *args () { return cmd; }
|
const char *args () { return cmd; }
|
||||||
void Shift();
|
void Shift();
|
||||||
|
|
||||||
|
|
|
@ -248,7 +248,7 @@ CCMD (vid_scaletoheight)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool atob(char* I)
|
inline bool atob(const char* I)
|
||||||
{
|
{
|
||||||
if (stricmp (I, "true") == 0 || stricmp (I, "1") == 0)
|
if (stricmp (I, "true") == 0 || stricmp (I, "1") == 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -100,12 +100,11 @@ CCMD (addkeysection)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Limit the ini name to 32 chars
|
// Limit the ini name to 32 chars
|
||||||
if (strlen (argv[2]) > 32)
|
FString name(argv[2], 32);
|
||||||
argv[2][32] = 0;
|
|
||||||
|
|
||||||
for (unsigned i = 0; i < KeySections.Size(); i++)
|
for (unsigned i = 0; i < KeySections.Size(); i++)
|
||||||
{
|
{
|
||||||
if (KeySections[i].mTitle.CompareNoCase(argv[2]) == 0)
|
if (KeySections[i].mTitle.CompareNoCase(name) == 0)
|
||||||
{
|
{
|
||||||
CurrentKeySection = i;
|
CurrentKeySection = i;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue