x64 build fixes

This commit is contained in:
ThePhD 2016-02-15 09:24:59 -05:00
parent 1293213775
commit f62c53f155
3 changed files with 6 additions and 3781 deletions

File diff suppressed because one or more lines are too long

View File

@ -33,7 +33,7 @@ struct overloaded_function : base_function {
overloads_t overloads;
overloaded_function(Functions... fxs)
: overloads({ function_traits<Unqualified<Functions>>::arity, fxs }...) {
: overloads({ static_cast<int>(function_traits<Unqualified<Functions>>::arity), fxs }...) {
}
@ -96,7 +96,7 @@ struct usertype_overloaded_function : base_function {
usertype_overloaded_function(Functions... fxs)
: overloads({function_traits<Functions>::arity, fxs}...) {
: overloads({static_cast<int>(function_traits<Functions>::arity), fxs}...) {
}
@ -154,7 +154,7 @@ struct usertype_indexing_function<overload_set<Functions...>, T> : base_function
: usertype_indexing_function(std::move(name), std::get<In>(set)...) {}
usertype_indexing_function(std::string name, Functions... fxs)
: overloads({function_traits<Functions>::arity, fxs}...), name(std::move(name)) {}
: overloads({static_cast<int>(function_traits<Functions>::arity), fxs}...), name(std::move(name)) {}
int match_arity(std::index_sequence<>, lua_State*, std::ptrdiff_t) {
throw error("no matching function call takes this number of arguments");

View File

@ -147,11 +147,6 @@ private:
return 0;
}
template<std::size_t N>
void build_cleanup() {
cleanup = &base_function::usertype<N>::gc;
}
template<std::size_t N>
void build_function_tables(function_map_t*& index, function_map_t*& newindex) {
int extracount = 0;
@ -195,14 +190,14 @@ private:
}
switch(extracount) {
case 2:
build_cleanup<N + 2>();
cleanup = &base_function::usertype<N + 2>::gc;
break;
case 1:
build_cleanup<N + 1>();
cleanup = &base_function::usertype<N + 1>::gc;
break;
case 0:
default:
build_cleanup<N + 0>();
cleanup = &base_function::usertype<N + 0>::gc;
break;
}
}
@ -318,18 +313,6 @@ public:
template<typename... Args>
usertype(Args&&... args): usertype(default_constructor, std::forward<Args>(args)...) {}
template<typename... Args>
SOL_DEPRECATED usertype(std::string, std::string, Args&&... args): usertype(default_constructor, std::forward<Args>(args)...) {}
template<typename... Args>
SOL_DEPRECATED usertype(const char*, std::string, Args&&... args): usertype(default_constructor, std::forward<Args>(args)...) {}
template<typename... Args, typename... CArgs>
SOL_DEPRECATED usertype(std::string, constructors<CArgs...> c, Args&&... args) : usertype(std::move(c), std::forward<Args>(args)...) {}
template<typename... Args, typename... CArgs>
SOL_DEPRECATED usertype(const char*, constructors<CArgs...> c, Args&&... args) : usertype(std::move(c), std::forward<Args>(args)...) {}
template<typename... Args, typename... CArgs>
usertype(constructors<CArgs...>, Args&&... args) {
functionnames.reserve(sizeof...(args) + 2);