summaryrefslogtreecommitdiff
path: root/plugins/MirandaG15
diff options
context:
space:
mode:
authorGoraf <22941576+Goraf@users.noreply.github.com>2018-02-24 15:32:06 +0100
committerGoraf <22941576+Goraf@users.noreply.github.com>2018-02-24 18:20:46 +0100
commit1c0172cca4f1e90679321912e20436a7f42f122d (patch)
tree77a544d2c09332ec176f42ebcf58a40d9c5d2b93 /plugins/MirandaG15
parentdff565f40105b20b0e8e4dba1f48ccc9b8e7ff44 (diff)
more nullptr
Diffstat (limited to 'plugins/MirandaG15')
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDGfx.h2
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDList.h80
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h2
-rw-r--r--plugins/MirandaG15/src/LCDFramework/misc.h4
4 files changed, 44 insertions, 44 deletions
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.h b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.h
index 9ac2288262..cc43966413 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.h
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.h
@@ -45,7 +45,7 @@ public:
BITMAPINFO *GetBitmapInfo(void);
HBITMAP GetHBITMAP(void);
- void StartTransition(ETransitionType eType = TRANSITION_RANDOM,LPRECT rect = NULL);
+ void StartTransition(ETransitionType eType = TRANSITION_RANDOM,LPRECT rect = nullptr);
protected:
void Cache();
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDList.h b/plugins/MirandaG15/src/LCDFramework/CLCDList.h
index 93284ba71a..84be7da53a 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDList.h
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDList.h
@@ -15,9 +15,9 @@ public:
{
m_iIndex = -1;
m_iEntryCount = 0;
- m_Position = NULL;
+ m_Position = nullptr;
m_pParent = pParent;
- if(pParent == NULL)
+ if(pParent == nullptr)
{
m_iLevel = 0;
m_eType = ROOT;
@@ -39,28 +39,28 @@ public:
virtual CListEntry<T,G> *GetNextEntry()
{
- if(m_pParent == NULL)
- return NULL;
+ if(m_pParent == nullptr)
+ return nullptr;
return m_pParent->GetNextEntry(this);
}
virtual CListEntry<T,G> *GetPreviousEntry()
{
- if(m_pParent == NULL)
- return NULL;
+ if(m_pParent == nullptr)
+ return nullptr;
return m_pParent->GetPreviousEntry(this);
}
virtual CListEntry<T,G> *GetNextEntry(CListEntry<T,G>*)
{
- return NULL;
+ return nullptr;
}
virtual CListEntry<T,G> *GetPreviousEntry(CListEntry<T,G>*)
{
- return NULL;
+ return nullptr;
}
EListEntryType GetType()
@@ -175,7 +175,7 @@ public:
CListContainer(CListEntry<T,G> *pParent) : CListEntry<T,G>(pParent)
{
- if(m_pParent != NULL)
+ if(m_pParent != nullptr)
{
m_eType = CONTAINER;
m_bOpen = false;
@@ -186,7 +186,7 @@ public:
~CListContainer()
{
- if(m_pRoot != NULL) {
+ if(m_pRoot != nullptr) {
m_pRoot->DeleteGroup(GetGroupData());
}
Clear();
@@ -202,7 +202,7 @@ public:
if(m_pRoot && m_pRoot->GetPosition() == *iter)
{
if(GetType() == ROOT)
- m_pRoot->SetPosition(NULL);
+ m_pRoot->SetPosition(nullptr);
else
m_pRoot->SetPosition(this);
}
@@ -225,7 +225,7 @@ public:
CListEntry<T,G> *GetLastOwnEntry()
{
if(m_Entrys.empty())
- return NULL;
+ return nullptr;
return *(--m_Entrys.end());
}
@@ -240,14 +240,14 @@ public:
return pEntry;
return ((CListContainer<T,G>*)pEntry)->GetLastEntry();
}
- return NULL;
+ return nullptr;
}
CListEntry<T,G> *GetFirstEntry()
{
if(!m_Entrys.empty())
return *(m_Entrys.begin());
- return NULL;
+ return nullptr;
}
CListEntry<T,G> *GetNextEntry()
@@ -255,7 +255,7 @@ public:
if(!IsOpen() || m_Entrys.empty())
{
if(!m_pParent)
- return NULL;
+ return nullptr;
return m_pParent->GetNextEntry(this);
}
@@ -271,8 +271,8 @@ public:
{
if(++iter == m_Entrys.end())
{
- if(m_pParent == NULL)
- return NULL;
+ if(m_pParent == nullptr)
+ return nullptr;
return m_pParent->GetNextEntry(this);
}
else
@@ -280,7 +280,7 @@ public:
}
iter++;
}
- return NULL;
+ return nullptr;
}
CListEntry<T,G> *GetPreviousEntry(CListEntry<T,G> *pEntry)
@@ -293,8 +293,8 @@ public:
{
if(iter == m_Entrys.begin())
{
- if(m_pParent == NULL)
- return NULL;
+ if(m_pParent == nullptr)
+ return nullptr;
return this;
}
else
@@ -311,7 +311,7 @@ public:
}
iter++;
}
- return NULL;
+ return nullptr;
}
virtual CListItem<T,G> *InsertItem(iterator _Where,T Entry)
@@ -352,7 +352,7 @@ public:
virtual void RemoveGroup(G Group)
{
list< CListEntry<T,G>* >::iterator iter = m_Entrys.begin();
- CListContainer<T,G> *pContainer = NULL;
+ CListContainer<T,G> *pContainer = nullptr;
while(iter != m_Entrys.end())
{
if((*iter)->GetType() == CONTAINER)
@@ -382,7 +382,7 @@ public:
virtual void RemoveItem(T Entry)
{
list< CListEntry<T,G>* >::iterator iter = m_Entrys.begin();
- CListItem<T,G> *pItem = NULL;
+ CListItem<T,G> *pItem = nullptr;
while(iter != m_Entrys.end())
{
if((*iter)->GetType() == ITEM)
@@ -412,7 +412,7 @@ public:
CListContainer<T,G> *GetGroup(G Group)
{
list< CListEntry<T,G>* >::iterator iter = m_Entrys.begin();
- CListContainer<T,G> *pContainer = NULL;
+ CListContainer<T,G> *pContainer = nullptr;
while(iter != m_Entrys.end())
{
if((*iter)->GetType() == CONTAINER)
@@ -423,7 +423,7 @@ public:
}
iter++;
}
- return NULL;
+ return nullptr;
}
G GetGroupData()
@@ -462,7 +462,7 @@ public:
void CollapseAll()
{
list< CListEntry<T,G>* >::iterator iter = m_Entrys.begin();
- CListContainer<T,G>* pContainer = NULL;
+ CListContainer<T,G>* pContainer = nullptr;
while(iter != m_Entrys.end())
{
if((*iter)->GetType() == CONTAINER)
@@ -478,7 +478,7 @@ public:
void ExpandAll()
{
list< CListEntry<T,G>* >::iterator iter = m_Entrys.begin();
- CListContainer<T,G>* pContainer = NULL;
+ CListContainer<T,G>* pContainer = nullptr;
while(iter != m_Entrys.end())
{
if((*iter)->GetType() == CONTAINER)
@@ -512,7 +512,7 @@ public:
if(GetType() == ROOT)
{
- if(GetPosition() == NULL && !m_Entrys.empty())
+ if(GetPosition() == nullptr && !m_Entrys.empty())
SetPosition(*m_Entrys.begin());
else
SetPosition(GetPosition());
@@ -541,9 +541,9 @@ public:
//************************************************************************
// Constructor
//************************************************************************
- CLCDList() : CListContainer<T,G>(NULL)
+ CLCDList() : CListContainer<T,G>(nullptr)
{
- m_pScrollbar = NULL;
+ m_pScrollbar = nullptr;
m_iIndention = 10;
m_iColumns = 1;
m_bDrawTreeLines = true;
@@ -613,7 +613,7 @@ public:
CListEntry<T,G> *pPosition = m_Position;
// if nothing is selected, skip drawing
- if(pPosition == NULL)
+ if(pPosition == nullptr)
return true;
bool bDrawGroup = false;
@@ -642,7 +642,7 @@ public:
}
// bottom selection
- while(pPosition != NULL )
+ while(pPosition != nullptr)
{
iYOffset = iHeight;
@@ -757,7 +757,7 @@ public:
{
CListContainer<T,G>::SetPosition(pEntry);
- if(pEntry == NULL)
+ if(pEntry == nullptr)
return;
int iPerPage = (GetHeight()/m_iEntryHeight)*m_iColumns;
@@ -773,10 +773,10 @@ public:
//************************************************************************
bool ScrollUp()
{
- if(m_Position != NULL)
+ if(m_Position != nullptr)
{
CListEntry<T,G> *pEntry = m_Position->GetPreviousEntry();
- if(pEntry != NULL)
+ if(pEntry != nullptr)
{
m_Position = pEntry;
@@ -793,10 +793,10 @@ public:
//************************************************************************
bool ScrollDown()
{
- if(m_Position != NULL)
+ if(m_Position != nullptr)
{
CListEntry<T,G> *pEntry = m_Position->GetNextEntry();
- if(pEntry != NULL)
+ if(pEntry != nullptr)
{
m_Position = pEntry;
@@ -825,8 +825,8 @@ public:
m_pScrollbar = pScrollbar;
if(m_pScrollbar)
{
- m_pScrollbar->SetRange(0,m_iEntryCount-1);
- m_pScrollbar->ScrollTo(m_Position != NULL?m_Position->GetIndex():0);
+ m_pScrollbar->SetRange(0, m_iEntryCount - 1);
+ m_pScrollbar->ScrollTo(m_Position != nullptr ? m_Position->GetIndex() : 0);
m_pScrollbar->SetAlignment(TOP);
}
@@ -892,7 +892,7 @@ protected:
if(m_pScrollbar)
{
m_pScrollbar->SetRange(0,m_iEntryCount-1);
- if(GetPosition() != NULL)
+ if(GetPosition() != nullptr)
m_pScrollbar->ScrollTo(GetPosition()->GetIndex());
}
}
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h b/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h
index 1011e5d551..adb338c7c6 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.h
@@ -49,7 +49,7 @@ public:
void SetButtonRepeatDelay(DWORD dwDelay);
// starts a screen transition
- void StartTransition(ETransitionType eTransition = TRANSITION_RANDOM,LPRECT rect = NULL);
+ void StartTransition(ETransitionType eTransition = TRANSITION_RANDOM,LPRECT rect = nullptr);
// called by CLCDConnection when connected to a device
void OnDeviceConnected();
diff --git a/plugins/MirandaG15/src/LCDFramework/misc.h b/plugins/MirandaG15/src/LCDFramework/misc.h
index c5f2bb4f06..0ff1a01668 100644
--- a/plugins/MirandaG15/src/LCDFramework/misc.h
+++ b/plugins/MirandaG15/src/LCDFramework/misc.h
@@ -52,7 +52,7 @@ inline std::string toNarrowString( const std::string& str )
}
inline std::tstring toTstring( const wchar_t* p , int len=-1 )
{
- return p == NULL?L"":((len < 0) ? p : std::wstring(p,len));
+ return p == nullptr ?L"":((len < 0) ? p : std::wstring(p,len));
}
extern tstring Utf8_Decode(const char *str);
@@ -75,7 +75,7 @@ inline std::string toNarrowString( const std::string& str )
}
inline std::tstring toTstring( const char* p , int len=-1 )
{
- if(p == NULL)
+ if(p == nullptr)
return "";
return (len < 0) ? p : std::string(p,len) ;
}