From 439472d4f8b730887aee31e057cc27de9835aced Mon Sep 17 00:00:00 2001 From: willkuer Date: Mon, 5 Dec 2016 22:44:17 +0100 Subject: [PATCH] gsdx: Add template version of GetConfig It allows static_casts to be avoided for enum classes --- plugins/GSdx/GSdx.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/GSdx/GSdx.h b/plugins/GSdx/GSdx.h index f0d5c7a50e..ae64d5617d 100644 --- a/plugins/GSdx/GSdx.h +++ b/plugins/GSdx/GSdx.h @@ -58,6 +58,8 @@ public: void SetConfig(const char* entry, const char* value); void SetConfig(const char* entry, int value); // Avoid issue with overloading + template + T GetConfigT(const char* entry) { return static_cast(GetConfigI(entry)); } int GetConfigI(const char* entry); bool GetConfigB(const char* entry); string GetConfigS(const char* entry);