Fix EncodeT assignment in make_virtuals.py

• Adding EncodeT type casting allows generated code to support enum classes.
This commit is contained in:
Thaddeus Crews 2023-12-05 08:34:22 -06:00
parent ceb6dadf4e
commit c9a4086da6
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84

View file

@ -121,7 +121,9 @@ def generate_version(argcount, const=False, returns=False):
callargtext += f"m_type{i + 1} arg{i + 1}"
callsiargs += f"Variant(arg{i + 1})"
callsiargptrs += f"&vargs[{i}]"
callptrargs += f"PtrToArg<m_type{i + 1}>::EncodeT argval{i + 1} = arg{i + 1};\\\n"
callptrargs += (
f"PtrToArg<m_type{i + 1}>::EncodeT argval{i + 1} = (PtrToArg<m_type{i + 1}>::EncodeT)arg{i + 1};\\\n"
)
callptrargsptr += f"&argval{i + 1}"
if method_info:
method_info += "\\\n\t\t"