Merge pull request #3434 from lioncash/enum

OnScreenDisplay: Make CallbackType an enum class
This commit is contained in:
Markus Wick
2016-01-04 13:47:22 +01:00
7 changed files with 14 additions and 14 deletions

View File

@ -83,7 +83,7 @@ void DoCallbacks(CallbackType type)
}
// Wipe all callbacks on shutdown
if (type == OSD_SHUTDOWN)
if (type == CallbackType::Shutdown)
s_callbacks.clear();
}

View File

@ -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<void()> Callback;
using Callback = std::function<void()>;
void AddCallback(CallbackType type, Callback cb);
void DoCallbacks(CallbackType type);