mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix for bug 794959 (Use the right cast in GetAs* functions of union types in new DOM bindings). r=bz.
--HG-- extra : rebase_source : 051181aa319edd386679119846fd61c574957b54
This commit is contained in:
parent
225e9ed8d3
commit
212ca8e4dc
@ -3980,10 +3980,7 @@ class CGUnionStruct(CGThing):
|
||||
${externalType} GetAs${name}() const
|
||||
{
|
||||
MOZ_ASSERT(Is${name}(), "Wrong type!");
|
||||
// The cast to ${externalType} is needed to work around a bug in Apple's
|
||||
// clang compiler, for some reason it doesn't call |S::operator T&| when
|
||||
// casting S<T> to T& and T is forward declared.
|
||||
return (${externalType})mValue.m${name}.Value();
|
||||
return const_cast<${structType}&>(mValue.m${name}.Value());
|
||||
}
|
||||
${structType}& SetAs${name}()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user