Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need InitDefaultData that initializes a TypeRef with the default-default data for the type #601

Open
siddhukrs opened this issue Apr 11, 2019 · 0 comments

Comments

@siddhukrs
Copy link
Contributor

siddhukrs commented Apr 11, 2019

Calling InitData on a local remembers the user-defined default data for local and sets the data to that value. We need a similar InitDefaultData that can set the default-default value of the type as the value. For instance, 0 for numerics and '' for strings.

It should do something like this

TypeRef t = outputType; while (t->HasCustomDefault()) { t = t->BaseType(); } t->InitData(outputData);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant