Editor code: tidy up BOOLs,NULLs and overrides pt5. (#2876)

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

Signed-off-by: Nemerle <nemerle5+git@gmail.com>

Co-authored-by: Nemerle <nemerle5+git@gmail.com>
This commit is contained in:
Artur K
2021-08-09 20:06:29 +02:00
committed by GitHub
parent c237ee352e
commit 6bf6ae9485
35 changed files with 248 additions and 249 deletions
+14 -14
View File
@@ -415,7 +415,7 @@ void CEditorImpl::Update()
}
if (IsInPreviewMode())
{
SetModifiedFlag(FALSE);
SetModifiedFlag(false);
SetModifiedModule(eModifiedNothing);
}
@@ -550,7 +550,7 @@ QString CEditorImpl::GetResolvedUserFolder()
void CEditorImpl::SetDataModified()
{
GetDocument()->SetModifiedFlag(TRUE);
GetDocument()->SetModifiedFlag(true);
}
void CEditorImpl::SetStatusText(const QString& pszString)
@@ -597,9 +597,9 @@ ITransformManipulator* CEditorImpl::ShowTransformManipulator(bool bShow)
GetObjectManager()->GetGizmoManager()->RemoveGizmo(m_pAxisGizmo);
m_pAxisGizmo->Release();
}
m_pAxisGizmo = 0;
m_pAxisGizmo = nullptr;
}
return 0;
return nullptr;
}
ITransformManipulator* CEditorImpl::GetTransformManipulator()
@@ -614,7 +614,7 @@ void CEditorImpl::SetAxisConstraints(AxisConstrains axisFlags)
SetTerrainAxisIgnoreObjects(false);
// Update all views.
UpdateViews(eUpdateObjects, NULL);
UpdateViews(eUpdateObjects, nullptr);
}
AxisConstrains CEditorImpl::GetAxisConstrains()
@@ -637,15 +637,15 @@ void CEditorImpl::SetReferenceCoordSys(RefCoordSys refCoords)
m_refCoordsSys = refCoords;
// Update all views.
UpdateViews(eUpdateObjects, NULL);
UpdateViews(eUpdateObjects, nullptr);
// Update the construction plane infos.
CViewport* pViewport = GetActiveView();
if (pViewport)
{
//Pre and Post widget rendering calls are made here to make sure that the proper camera state is set.
//MakeConstructionPlane will make a call to ViewToWorldRay which needs the correct camera state
//in the CRenderViewport to be set.
//MakeConstructionPlane will make a call to ViewToWorldRay which needs the correct camera state
//in the CRenderViewport to be set.
pViewport->PreWidgetRendering();
pViewport->MakeConstructionPlane(GetIEditor()->GetAxisConstrains());
@@ -671,7 +671,7 @@ CBaseObject* CEditorImpl::NewObject(const char* typeName, const char* fileName,
editor->SetModifiedFlag();
editor->SetModifiedModule(eModifiedBrushes);
}
CBaseObject* object = editor->GetObjectManager()->NewObject(typeName, 0, fileName, name);
CBaseObject* object = editor->GetObjectManager()->NewObject(typeName, nullptr, fileName, name);
if (!object)
{
return nullptr;
@@ -932,7 +932,7 @@ void CEditorImpl::CloseView(const GUID& classId)
IDataBaseManager* CEditorImpl::GetDBItemManager([[maybe_unused]] EDataBaseItemType itemType)
{
return 0;
return nullptr;
}
bool CEditorImpl::SelectColor(QColor& color, QWidget* parent)
@@ -1109,7 +1109,7 @@ void CEditorImpl::DetectVersion()
char ver[1024 * 8];
GetModuleFileName(NULL, exe, _MAX_PATH);
GetModuleFileName(nullptr, exe, _MAX_PATH);
int verSize = GetFileVersionInfoSize(exe, &dwHandle);
if (verSize > 0)
@@ -1431,7 +1431,7 @@ void CEditorImpl::NotifyExcept(EEditorNotifyEvent event, IEditorNotifyListener*
{
m_pAxisGizmo->Release();
}
m_pAxisGizmo = 0;
m_pAxisGizmo = nullptr;
}
if (event == eNotify_OnInit)
@@ -1472,7 +1472,7 @@ ISourceControl* CEditorImpl::GetSourceControl()
for (int i = 0; i < classes.size(); i++)
{
IClassDesc* pClass = classes[i];
ISourceControl* pSCM = NULL;
ISourceControl* pSCM = nullptr;
HRESULT hRes = pClass->QueryInterface(__uuidof(ISourceControl), (void**)&pSCM);
if (!FAILED(hRes) && pSCM)
{
@@ -1482,7 +1482,7 @@ ISourceControl* CEditorImpl::GetSourceControl()
}
}
return 0;
return nullptr;
}
bool CEditorImpl::IsSourceControlAvailable()