Editor code: tidy up BOOLs,NULLs and overrides pt6.

A few 'typedefs' replaced by 'using's
This shouldn't have any functional changes at all, just c++17 modernization
It's a part 6 of a split #2847

Signed-off-by: Nemerle <nemerle5+git@gmail.com>
This commit is contained in:
Nemerle
2021-08-05 16:52:43 +02:00
parent 7404622b48
commit 769fd78189
32 changed files with 136 additions and 136 deletions
+7 -7
View File
@@ -186,7 +186,7 @@ const CToolBoxMacro* CToolBoxManager::GetMacro(int iIndex, bool bToolbox) const
assert(0 <= iIndex && iIndex < m_shelveMacros.size());
return m_shelveMacros[iIndex];
}
return NULL;
return nullptr;
}
//////////////////////////////////////////////////////////////////////////
@@ -202,7 +202,7 @@ CToolBoxMacro* CToolBoxManager::GetMacro(int iIndex, bool bToolbox)
assert(0 <= iIndex && iIndex < m_shelveMacros.size());
return m_shelveMacros[iIndex];
}
return NULL;
return nullptr;
}
//////////////////////////////////////////////////////////////////////////
@@ -240,14 +240,14 @@ CToolBoxMacro* CToolBoxManager::NewMacro(const QString& title, bool bToolbox, in
const int macroCount = m_macros.size();
if (macroCount > ID_TOOL_LAST - ID_TOOL_FIRST + 1)
{
return NULL;
return nullptr;
}
for (size_t i = 0; i < macroCount; ++i)
{
if (QString::compare(m_macros[i]->GetTitle(), title, Qt::CaseInsensitive) == 0)
{
return NULL;
return nullptr;
}
}
@@ -264,7 +264,7 @@ CToolBoxMacro* CToolBoxManager::NewMacro(const QString& title, bool bToolbox, in
const int shelveMacroCount = m_shelveMacros.size();
if (shelveMacroCount > ID_TOOL_SHELVE_LAST - ID_TOOL_SHELVE_FIRST + 1)
{
return NULL;
return nullptr;
}
CToolBoxMacro* pNewTool = new CToolBoxMacro(title);
@@ -275,7 +275,7 @@ CToolBoxMacro* CToolBoxManager::NewMacro(const QString& title, bool bToolbox, in
m_shelveMacros.push_back(pNewTool);
return pNewTool;
}
return NULL;
return nullptr;
}
//////////////////////////////////////////////////////////////////////////
@@ -333,7 +333,7 @@ void CToolBoxManager::Load([[maybe_unused]] ActionManager* actionManager)
void CToolBoxManager::Load(QString xmlpath, AmazonToolbar* pToolbar, bool bToolbox, ActionManager* actionManager)
{
XmlNodeRef toolBoxNode = XmlHelpers::LoadXmlFromFile(xmlpath.toUtf8().data());
if (toolBoxNode == NULL)
if (toolBoxNode == nullptr)
{
return;
}