diff options
author | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:03:31 +0100 |
---|---|---|
committer | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:07:33 +0100 |
commit | a7c24ca48995cf2bf436156302f96b91bf135409 (patch) | |
tree | 953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp')
-rw-r--r-- | plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp index cf8c680d12..a40b18d2a8 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp @@ -9,16 +9,16 @@ #include "CLCDOutputManager.h" #include <time.h> -CLCDOutputManager *CLCDOutputManager::m_pInstance = NULL; +CLCDOutputManager *CLCDOutputManager::m_pInstance = nullptr; //************************************************************************ // Constructor //************************************************************************ -CLCDOutputManager::CLCDOutputManager() : m_dwButtonRepeatDelay(300), m_pGfx(0), - m_pdwButtonRepeatTimers(0), m_pdwButtonRepeatStarts(0), m_pbButtonStates(0), - m_pLcdConnection(0), m_bInitialized(false), m_dwLastUpdate(0), m_pActiveScreen(NULL) +CLCDOutputManager::CLCDOutputManager() : m_dwButtonRepeatDelay(300), m_pGfx(nullptr), + m_pdwButtonRepeatTimers(nullptr), m_pdwButtonRepeatStarts(nullptr), m_pbButtonStates(nullptr), + m_pLcdConnection(nullptr), m_bInitialized(false), m_dwLastUpdate(0), m_pActiveScreen(nullptr) { - ASSERT(m_pInstance == NULL); + ASSERT(m_pInstance == nullptr); m_pInstance = this; m_strAppletName = L""; @@ -29,7 +29,7 @@ CLCDOutputManager::CLCDOutputManager() : m_dwButtonRepeatDelay(300), m_pGfx(0), //************************************************************************ CLCDOutputManager::~CLCDOutputManager() { - m_pInstance = NULL; + m_pInstance = nullptr; } //************************************************************************ @@ -37,7 +37,7 @@ CLCDOutputManager::~CLCDOutputManager() //************************************************************************ CLCDOutputManager* CLCDOutputManager::GetInstance() { - ASSERT(m_pInstance != NULL); + ASSERT(m_pInstance != nullptr); return m_pInstance; } @@ -47,7 +47,7 @@ CLCDOutputManager* CLCDOutputManager::GetInstance() //************************************************************************ CLCDConnection *CLCDOutputManager::GetLCDConnection() { - ASSERT(m_pLcdConnection != NULL); + ASSERT(m_pLcdConnection != nullptr); return m_pLcdConnection; } @@ -64,7 +64,7 @@ CLCDScreen *CLCDOutputManager::GetActiveScreen() //************************************************************************ bool CLCDOutputManager::Initialize(tstring strAppletName,bool bAutostart, bool bConfigDialog) { - srand ( time(NULL) ); + srand ( time(nullptr) ); InitDebug(); @@ -96,8 +96,8 @@ bool CLCDOutputManager::IsInitialized() //************************************************************************ bool CLCDOutputManager::Shutdown() { - ASSERT(NULL != m_pLcdConnection); - ASSERT(NULL != m_pGfx); + ASSERT(nullptr != m_pLcdConnection); + ASSERT(nullptr != m_pGfx); // Shutdown all screens vector<CLCDScreen*>::iterator iter = m_Screens.begin(); @@ -194,7 +194,7 @@ bool CLCDOutputManager::Update() ASSERT(m_bInitialized); // Update the active screen - if(m_pActiveScreen != NULL) + if(m_pActiveScreen != nullptr) { m_pActiveScreen->Update(); // Check if the active screen has expired @@ -256,7 +256,7 @@ bool CLCDOutputManager::Update() // Draw - if(m_pActiveScreen != NULL && m_pGfx->IsInitialized()) + if(m_pActiveScreen != nullptr && m_pGfx->IsInitialized()) { m_pGfx->BeginDraw(); m_pGfx->ClearScreen(); @@ -278,11 +278,11 @@ bool CLCDOutputManager::Update() //************************************************************************ bool CLCDOutputManager::DeactivateScreen() { - if(m_pActiveScreen == NULL) + if(m_pActiveScreen == nullptr) return false; CLCDScreen *pActiveScreen = m_pActiveScreen; - m_pActiveScreen = NULL; + m_pActiveScreen = nullptr; if(pActiveScreen->HasExpired()) { @@ -306,7 +306,7 @@ bool CLCDOutputManager::ActivateScreen(CLCDScreen *pScreen) return false; // If another screen is currently active, deactivate it - if(m_pActiveScreen != NULL) + if(m_pActiveScreen != nullptr) DeactivateScreen(); m_pActiveScreen = pScreen; |