mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 10:06:03 +00:00
IDLGenerators: Cast wrapped references to a known reference type
They may be GC::Ref<T> objects, which should be converted to T const& before being so nicely const-cast to T&.
This commit is contained in:
parent
95cc2bd810
commit
f341bb0522
Notes:
github-actions[bot]
2025-04-22 14:44:58 +00:00
Author: https://github.com/alimpfard
Commit: f341bb0522
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4423
Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 1 additions and 1 deletions
|
@ -2074,7 +2074,7 @@ static void generate_wrap_statement(SourceGenerator& generator, ByteString const
|
||||||
)~~~");
|
)~~~");
|
||||||
} else {
|
} else {
|
||||||
scoped_generator.append(R"~~~(
|
scoped_generator.append(R"~~~(
|
||||||
@result_expression@ &const_cast<@type@&>(@value@);
|
@result_expression@ &const_cast<@type@&>(static_cast<@type@ const&>(@value@));
|
||||||
)~~~");
|
)~~~");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue