-
-
Notifications
You must be signed in to change notification settings - Fork 641
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
Lua Network API #1718
Lua Network API #1718
Conversation
41e05b5
to
990b86b
Compare
@@ -355,7 +366,7 @@ class cLuaState | |||
|
|||
/** Variadic template: Counting args means add one to the count of the rest. */ | |||
template <typename T, typename... Args> | |||
int CountArgs(T, Args... args) | |||
int CountArgs(T &, Args &&... args) | |||
{ | |||
return 1 + CountArgs(args...); | |||
} |
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.
I should really replace this method with the sizeof...
operator.
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.
I had no idea that thing existed. It could be the easiest fix.
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.
I'm building the change now. I only discovered it existed yesterday.
I'll rebase this onto current master to make it auto-mergable again. |
Also added an example in the NetworkTest plugin.
Also added an example to the NetworkTest plugin.
dae14c4
to
0e769f1
Compare
} -- Listen callbacks | ||
end, -- fortune | ||
|
||
-- TODO: Other services (fortune, daytime, ...) |
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.
You say other services like fortune
, but it's defined right above here right?
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.
yea, forgot to update the comment.
I think this might be ready for a merge |
👍 |
Exported the cNetwork API to Lua, so that plugins can use it.