| 432 | } |
| 433 | |
| 434 | bool ScriptingObject::CanCast(const ScriptingTypeHandle& from, const ScriptingTypeHandle& to) |
| 435 | { |
| 436 | if (from == to) |
| 437 | return true; |
| 438 | if (!from && !to) |
| 439 | return true; |
| 440 | CHECK_RETURN(from && to, false); |
| 441 | #if SCRIPTING_OBJECT_CAST_WITH_CSHARP |
| 442 | return CanCast(from.GetType().ManagedClass, to.GetType().ManagedClass); |
| 443 | #else |
| 444 | return to.IsAssignableFrom(from); |
| 445 | #endif |
| 446 | } |
| 447 | |
| 448 | bool ScriptingObject::CanCast(const MClass* from, const MClass* to) |
| 449 | { |
nothing calls this directly
no test coverage detected