Skip to content

Commit

Permalink
Fix EncodeT assignment in make_virtuals.py
Browse files Browse the repository at this point in the history
• Adding EncodeT type casting allows generated code to support enum classes.
  • Loading branch information
Repiteo committed Dec 5, 2023
1 parent ceb6dad commit c9a4086
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/object/make_virtuals.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c9a4086

Please sign in to comment.