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

c_converter: Function template for numeric fields, add v3s16 default #7090

Merged
merged 2 commits into from Mar 3, 2018

Conversation

SmallJoker
Copy link
Member

Simplifies the c_converter functions to templates which can not be anywhere else than in headers.
Also adds an implementation of getv3s16field_default for #7070

How to test

  1. Compile
  2. No linker errors

@SmallJoker SmallJoker added @ Script API Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements Feature ✨ PRs that add or enhance a feature labels Mar 2, 2018
@paramat
Copy link
Contributor

paramat commented Mar 2, 2018

Thanks for this.

}

template<class T>
bool getv3field(lua_State *L, int index,
Copy link
Contributor

@paramat paramat Mar 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the name should make it clear it is for v3 ints? getv3intField? We might add a 'get v3 float field' later.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. Changed that one.

@nerzhul
Copy link
Member

nerzhul commented Mar 3, 2018

Thanks for doing better C++ :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature ✨ PRs that add or enhance a feature Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements One approval ✅ ◻️ @ Script API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants