diff options
| author | Lioncash <mathew1800@gmail.com> | 2016-10-02 18:13:08 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2016-10-02 18:13:08 -0400 |
| commit | a7b19e23b303a970f425d4e44ef01af598ea1feb (patch) | |
| tree | 30bbcc8d47e01a667e649242a8274d6feee2e723 /Source/Core/DolphinWX/LogWindow.cpp | |
| parent | 2e4ef57b47c1ef06ede4121d4b22ad60abe19082 (diff) | |
LogWindow: Convert #define macros into typed constants
Diffstat (limited to 'Source/Core/DolphinWX/LogWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/LogWindow.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/DolphinWX/LogWindow.cpp b/Source/Core/DolphinWX/LogWindow.cpp index 1b47f16883..d72900924f 100644 --- a/Source/Core/DolphinWX/LogWindow.cpp +++ b/Source/Core/DolphinWX/LogWindow.cpp @@ -30,9 +30,9 @@ #include "DolphinWX/WxUtils.h" // Milliseconds between msgQueue flushes to wxTextCtrl -#define UPDATETIME 200 +constexpr int UPDATE_TIME_MS = 200; // Max size of msgQueue, old messages will be discarded when there are too many. -#define MSGQUEUE_MAX_SIZE 100 +constexpr size_t MSGQUEUE_MAX_SIZE = 100; CLogWindow::CLogWindow(CFrame* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name) @@ -48,7 +48,7 @@ CLogWindow::CLogWindow(CFrame* parent, wxWindowID id, const wxPoint& pos, const CreateGUIControls(); m_LogTimer.SetOwner(this); - m_LogTimer.Start(UPDATETIME); + m_LogTimer.Start(UPDATE_TIME_MS); } void CLogWindow::CreateGUIControls() @@ -292,7 +292,7 @@ void CLogWindow::UpdateLog() // the GUI will lock up, which could be an issue if new messages are flooding in faster than // this function can render them to the screen. // So we limit this function to processing MSGQUEUE_MAX_SIZE messages each time it's called. - for (int num = 0; num < MSGQUEUE_MAX_SIZE; num++) + for (size_t num = 0; num < MSGQUEUE_MAX_SIZE; num++) { u8 log_level; wxString log_msg; |
