| 1099 | } |
| 1100 | |
| 1101 | void asCScriptObject::CopyObject(const void *src, void *dst, asCObjectType *in_objType, asCScriptEngine *engine) |
| 1102 | { |
| 1103 | int funcIndex = in_objType->beh.copy; |
| 1104 | if( funcIndex ) |
| 1105 | { |
| 1106 | asCScriptFunction *func = engine->scriptFunctions[in_objType->beh.copy]; |
| 1107 | if( func->funcType == asFUNC_SYSTEM ) |
| 1108 | engine->CallObjectMethod(dst, const_cast<void*>(src), funcIndex); |
| 1109 | else |
| 1110 | { |
| 1111 | // Call the script class' opAssign method |
| 1112 | asASSERT(in_objType->flags & asOBJ_SCRIPT_OBJECT ); |
| 1113 | reinterpret_cast<asCScriptObject*>(dst)->CopyFrom(reinterpret_cast<const asCScriptObject*>(src)); |
| 1114 | } |
| 1115 | } |
| 1116 | else if( in_objType->size && (in_objType->flags & asOBJ_POD) ) |
| 1117 | memcpy(dst, src, in_objType->size); |
| 1118 | } |
| 1119 | |
| 1120 | void asCScriptObject::CopyHandle(asPWORD *src, asPWORD *dst, asCObjectType *in_objType, asCScriptEngine *engine) |
| 1121 | { |
nothing calls this directly
no test coverage detected