DIRECTOR: LINGO: Fix reference->number conversion
This commit is contained in:
parent
3d36728754
commit
a3a6988178
1 changed files with 2 additions and 4 deletions
|
@ -714,8 +714,6 @@ int Datum::asInt() {
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case REFERENCE:
|
|
||||||
// fallthrough
|
|
||||||
case STRING:
|
case STRING:
|
||||||
{
|
{
|
||||||
Common::String src = asString();
|
Common::String src = asString();
|
||||||
|
@ -732,6 +730,7 @@ int Datum::asInt() {
|
||||||
// no-op
|
// no-op
|
||||||
break;
|
break;
|
||||||
case INT:
|
case INT:
|
||||||
|
case REFERENCE:
|
||||||
res = u.i;
|
res = u.i;
|
||||||
break;
|
break;
|
||||||
case FLOAT:
|
case FLOAT:
|
||||||
|
@ -748,8 +747,6 @@ double Datum::asFloat() {
|
||||||
double res = 0.0;
|
double res = 0.0;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case REFERENCE:
|
|
||||||
// fallthrough
|
|
||||||
case STRING:
|
case STRING:
|
||||||
{
|
{
|
||||||
Common::String src = asString();
|
Common::String src = asString();
|
||||||
|
@ -766,6 +763,7 @@ double Datum::asFloat() {
|
||||||
// no-op
|
// no-op
|
||||||
break;
|
break;
|
||||||
case INT:
|
case INT:
|
||||||
|
case REFERENCE:
|
||||||
res = (double)u.i;
|
res = (double)u.i;
|
||||||
break;
|
break;
|
||||||
case FLOAT:
|
case FLOAT:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue