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

wrapper添加 MakeConstVariable #1867

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zombieyang
Copy link
Contributor

针对手机平台编译时,static const修饰的成员变量会报以下问题的解决方案:
image

使用方式:

    .Variable("VARIANT_MODE_POSTPROCESS", MakeConstVariable(Stage::VARIANT_MODE_POSTPROCESS))

相比MakeReadonlyVariable,不需要&取地址。

@chexiongsheng
Copy link
Collaborator

这个修改比较大的局限性。
我之前一直想添加对getter、setter的支持,刚好可以解决这问题,我已经加好了:b6fab1a

对于你这里,可以先写个getter,然后再用MakeVariableByGetterSetter来生成wrapper,setter没有可以填nullptr。

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

Successfully merging this pull request may close these issues.

2 participants