-
-
Notifications
You must be signed in to change notification settings - Fork 459
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
feat(plugins): add basic message construction #5754
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
|
||
void createUserType(sol::table &c2) | ||
{ | ||
c2.new_usertype<Message>("Message", sol::factories([](sol::table tbl) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: the parameter 'tbl' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
c2.new_usertype<Message>("Message", sol::factories([](sol::table tbl) {
^
This adds the API I described in #4999 (comment). There are minor differences (e.g. flags belong to a specific element). Some helper functions aren't there yet. This is only the bare-bones construction.
The
/hello-world
example works with this implementation.