added even more explicit GetChars() calls.
This commit is contained in:
parent
1717ff47b2
commit
48ba63c022
42 changed files with 230 additions and 214 deletions
|
|
@ -54,7 +54,7 @@
|
|||
|
||||
int intvalue(const svalue_t &v)
|
||||
{
|
||||
return (v.type == svt_string ? atoi(v.string) :
|
||||
return (v.type == svt_string ? atoi(v.string.GetChars()) :
|
||||
v.type == svt_fixed ? (int)(v.value.f / 65536.) :
|
||||
v.type == svt_mobj ? -1 : v.value.i );
|
||||
}
|
||||
|
|
@ -68,7 +68,7 @@ int intvalue(const svalue_t &v)
|
|||
fsfix fixedvalue(const svalue_t &v)
|
||||
{
|
||||
return (v.type == svt_fixed ? v.value.f :
|
||||
v.type == svt_string ? (fsfix)(atof(v.string) * 65536.) :
|
||||
v.type == svt_string ? (fsfix)(atof(v.string.GetChars()) * 65536.) :
|
||||
v.type == svt_mobj ? -65536 : v.value.i * 65536 );
|
||||
}
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ fsfix fixedvalue(const svalue_t &v)
|
|||
double floatvalue(const svalue_t &v)
|
||||
{
|
||||
return
|
||||
v.type == svt_string ? atof(v.string) :
|
||||
v.type == svt_string ? atof(v.string.GetChars()) :
|
||||
v.type == svt_fixed ? v.value.f / 65536. :
|
||||
v.type == svt_mobj ? -1. : (double)v.value.i;
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@ const char *stringvalue(const svalue_t & v)
|
|||
switch(v.type)
|
||||
{
|
||||
case svt_string:
|
||||
return v.string;
|
||||
return v.string.GetChars();
|
||||
|
||||
case svt_mobj:
|
||||
// return the class name
|
||||
|
|
@ -349,7 +349,7 @@ DFsVariable *DFsScript::VariableForName(const char *name)
|
|||
|
||||
while(current)
|
||||
{
|
||||
if(!strcmp(name, current->Name)) // found it?
|
||||
if(!strcmp(name, current->Name.GetChars())) // found it?
|
||||
return current;
|
||||
current = current->next; // check next in chain
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue