[Renderer] Added missing calling convention in FnPtr template declaration

This fixes compilation of Windows x86 builds when creating template instantiations of FnPtr with functions using __stdcall.
This commit is contained in:
Thomas Roß 2024-10-27 15:49:21 +01:00
parent 73d2764573
commit 09a961988d

View File

@ -63,7 +63,7 @@ inline void CheckError() {
template <typename T> struct FnPtr; template <typename T> struct FnPtr;
template <typename Ret, typename... Args> template <typename Ret, typename... Args>
struct FnPtr<Ret(Args...)> { struct FnPtr<Ret GLFUNCCALL(Args...)> {
explicit FnPtr(std::string_view name, bool optional = false); explicit FnPtr(std::string_view name, bool optional = false);
Ret operator()(Args... args) const { Ret operator()(Args... args) const {
@ -99,7 +99,7 @@ static void LoadGLFnPtrs() {
} }
template<typename Ret, typename... Args> template<typename Ret, typename... Args>
FnPtr<Ret(Args...)>::FnPtr(std::string_view name, bool optional) : fn_{} { FnPtr<Ret GLFUNCCALL(Args...)>::FnPtr(std::string_view name, bool optional) : fn_{} {
inits_.push_back(std::make_tuple(reinterpret_cast<void**>(&fn_), name, optional)); inits_.push_back(std::make_tuple(reinterpret_cast<void**>(&fn_), name, optional));
} }