From edda018d543bf80cd70fa2c2952e2425c650f26e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 2 Jan 2016 14:45:41 -0500 Subject: OnScreenDisplay: Make CallbackType an enum class --- Source/Core/VideoCommon/OnScreenDisplay.cpp | 2 +- Source/Core/VideoCommon/OnScreenDisplay.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'Source/Core/VideoCommon') diff --git a/Source/Core/VideoCommon/OnScreenDisplay.cpp b/Source/Core/VideoCommon/OnScreenDisplay.cpp index dfd597f0ed..ebce4f79ea 100644 --- a/Source/Core/VideoCommon/OnScreenDisplay.cpp +++ b/Source/Core/VideoCommon/OnScreenDisplay.cpp @@ -83,7 +83,7 @@ void DoCallbacks(CallbackType type) } // Wipe all callbacks on shutdown - if (type == OSD_SHUTDOWN) + if (type == CallbackType::Shutdown) s_callbacks.clear(); } diff --git a/Source/Core/VideoCommon/OnScreenDisplay.h b/Source/Core/VideoCommon/OnScreenDisplay.h index 17a5494345..8bf6852061 100644 --- a/Source/Core/VideoCommon/OnScreenDisplay.h +++ b/Source/Core/VideoCommon/OnScreenDisplay.h @@ -17,13 +17,13 @@ void DrawMessages(); // draw the current messages on the screen. Only call once void ClearMessages(); // On-screen callbacks -enum CallbackType +enum class CallbackType { - OSD_INIT = 0, - OSD_ONFRAME, - OSD_SHUTDOWN + Initialization, + OnFrame, + Shutdown }; -typedef std::function Callback; +using Callback = std::function; void AddCallback(CallbackType type, Callback cb); void DoCallbacks(CallbackType type); -- cgit v1.2.3