Update VideoApi to use LuaBind
The main part is the usual and uninteresting translation to complete #1579 for the VideoApi.
And as usual I have inserted a few bits of clean-up. This didn't change any behaviour, it just saved some lines of code and hopefully improved some names.
-
CheckArg
is nowCheckStack
. With the addition of the error context these are no longer actually checking the arguments, but Lua stack values whose (as shown by context) may have a more complex relationship to the actual arguments. - Removed
check_arg
and inlined all calls to directly referenceCheckStack
. Because it was about the same amount of work as renaming it tocheck_stack
and saves a bunch of text in the declarations. - Removed unneeded
CheckStack
specialization. I believe specializations don't have to be forward declared like that because the templates are only really checked later. Anyways, I tried removing it and everything seemed to work. -
NumFieldContext
is nowIndexContext
. There may be a use for a numeric field context, but I thinkValueContext
might already cover that and it is used in places were the fields will probably be thought of as indexes anyways. - Inlined some using declarations. There were some
using M = Martialling<T>;
s that were only used once, inlining them fits comfortably on one line and I don't think the intermediate nameM
is doing much either. - I went through and wrapped any overflowing comments.