| 582 | } |
| 583 | |
| 584 | static bool IsInt(hx::Object *inPtr) |
| 585 | { |
| 586 | if (!inPtr) |
| 587 | return false; |
| 588 | if (TCanCast<IntData>(inPtr)) |
| 589 | return true; |
| 590 | DoubleData *d = dynamic_cast<DoubleData *>(inPtr); |
| 591 | if (!d) |
| 592 | { |
| 593 | Int64Data *i64 = dynamic_cast<Int64Data *>(inPtr); |
| 594 | if (i64) |
| 595 | { |
| 596 | int val = i64->mValue; |
| 597 | return val==i64->mValue; |
| 598 | } |
| 599 | return false; |
| 600 | } |
| 601 | double val = d->__ToDouble(); |
| 602 | return ((int)val == val); |
| 603 | } |
| 604 | |
| 605 | static Dynamic createEmptyInt64() |
| 606 | { |
nothing calls this directly
no test coverage detected