Skip to content

Commit

Permalink
[p-api]优化性能
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Oct 17, 2024
1 parent b78e543 commit 0be2f75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unreal/Puerts/Source/JsEnv/Private/PesapiV8Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ inline pesapi_value PesapiValueFromV8LocalValue(v8::Local<v8::Value> local)
inline v8::Local<v8::Value> V8LocalValueFromPesapiValue(pesapi_value v)
{
v8::Local<v8::Value> local;
memcpy(static_cast<void*>(&local), &v, sizeof(v));
*reinterpret_cast<pesapi_value*>(&local) = v;
return local;
}

Expand All @@ -90,7 +90,7 @@ inline pesapi_env PesapiEnvFromV8LocalContext(v8::Local<v8::Context> local)
inline v8::Local<v8::Context> V8LocalContextFromPesapiEnv(pesapi_env v)
{
v8::Local<v8::Context> local;
memcpy(static_cast<void*>(&local), &v, sizeof(v));
*reinterpret_cast<pesapi_env*>(&local) = v;
return local;
}
} // namespace v8impl
Expand Down

0 comments on commit 0be2f75

Please sign in to comment.