Skip to content

Commit

Permalink
build(ios): fix build error due to std::any_cast
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwcg committed Oct 25, 2024
1 parent 254b6b9 commit 6bea97a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion driver/js/src/modules/ui_layout_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ inline namespace module {
GEN_INVOKE_CB(LayoutModule, ResetLayoutCache)

void LayoutModule::ResetLayoutCache(CallbackInfo& info, void* data) {
auto scope_wrapper = reinterpret_cast<ScopeWrapper*>(std::any_cast<void*>(info.GetSlot()));
std::any slot_any = info.GetSlot();
auto scope_wrapper = reinterpret_cast<ScopeWrapper*>(std::any_cast<void*>(&slot_any));
auto scope = scope_wrapper->scope.lock();
FOOTSTONE_CHECK(scope);
if (!scope) {
Expand Down

0 comments on commit 6bea97a

Please sign in to comment.