Fix clang 13 compilation problems (#5791)
* Fix clang 13 compilation problems Re-instated ShowPlayedSequencesDebug logic by introducing no-op lambda which replaces missing `Draw2dLabel` functionality ( added TODO marker there ) Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * apply review suggestions Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * Fix type in assert message Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
This commit is contained in:
@@ -606,11 +606,9 @@ void CBaseLibraryManager::RegisterItem(CBaseLibraryItem* pItem, REFGUID newGuid)
|
||||
|
||||
if (m_bUniqGuidMap)
|
||||
{
|
||||
bool bNewItem = true;
|
||||
REFGUID oldGuid = pItem->GetGUID();
|
||||
if (!GuidUtil::IsEmpty(oldGuid))
|
||||
{
|
||||
bNewItem = false;
|
||||
m_itemsGuidMap.erase(oldGuid);
|
||||
}
|
||||
if (GuidUtil::IsEmpty(newGuid))
|
||||
|
||||
@@ -487,7 +487,6 @@ bool CLayoutWnd::LoadConfig()
|
||||
|
||||
CreateLayout((EViewLayout)layout, false);
|
||||
|
||||
bool bRebindViewports = false;
|
||||
if (m_splitWnd)
|
||||
{
|
||||
const QString str = settings.value("Viewports").toString();
|
||||
@@ -498,14 +497,12 @@ bool CLayoutWnd::LoadConfig()
|
||||
{
|
||||
break;
|
||||
}
|
||||
bRebindViewports = true;
|
||||
if (!resToken.isEmpty())
|
||||
{
|
||||
m_viewType[nIndex] = resToken;
|
||||
}
|
||||
nIndex++;
|
||||
}
|
||||
;
|
||||
}
|
||||
|
||||
BindViewports();
|
||||
|
||||
@@ -329,7 +329,6 @@ bool CAxisGizmo::MouseCallback(CViewport* view, EMouseEvent event, QPoint& point
|
||||
hc.b2DViewport = view->GetType() != ET_ViewportCamera;
|
||||
hc.point2d = point;
|
||||
view->ViewToWorldRay(point, hc.raySrc, hc.rayDir);
|
||||
bool bHit = false;
|
||||
if (HitTest(hc))
|
||||
{
|
||||
switch (hc.manipulatorMode)
|
||||
@@ -344,7 +343,6 @@ bool CAxisGizmo::MouseCallback(CViewport* view, EMouseEvent event, QPoint& point
|
||||
view->SetCurrentCursor(STD_CURSOR_SCALE);
|
||||
break;
|
||||
}
|
||||
bHit = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,17 +186,6 @@ CBaseObject* CObjectManager::NewObject(CObjectClassDesc* cls, CBaseObject* prev,
|
||||
if (obj->GetType() != OBJTYPE_AZENTITY)
|
||||
{
|
||||
GetIEditor()->RecordUndo(new CUndoBaseObjectNew(obj));
|
||||
|
||||
// check for script entities
|
||||
const char* scriptClassName = "";
|
||||
CEntityObject* entityObj = qobject_cast<CEntityObject*>(obj);
|
||||
QByteArray entityClass; // Leave it outside of the if. Otherwise buffer is deleted.
|
||||
if (entityObj)
|
||||
{
|
||||
entityClass = entityObj->GetEntityClass().toUtf8();
|
||||
scriptClassName = entityClass.data();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -498,13 +498,11 @@ void SandboxIntegrationManager::EntityParentChanged(
|
||||
// before finally being saved, it will result in all of those layers saving, too.
|
||||
AZ::EntityId oldAncestor = oldParentId;
|
||||
|
||||
bool wasNotInLayer = false;
|
||||
AZ::EntityId oldLayer;
|
||||
do
|
||||
{
|
||||
if (!oldAncestor.IsValid())
|
||||
{
|
||||
wasNotInLayer = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -530,13 +528,11 @@ void SandboxIntegrationManager::EntityParentChanged(
|
||||
|
||||
AZ::EntityId newAncestor = newParentId;
|
||||
|
||||
bool isGoingToRootScene = false;
|
||||
AZ::EntityId newLayer;
|
||||
do
|
||||
{
|
||||
if (!newAncestor.IsValid())
|
||||
{
|
||||
isGoingToRootScene = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -108,18 +108,15 @@ void CSoundKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selec
|
||||
{
|
||||
ISoundKey soundKey;
|
||||
keyHandle.GetKey(&soundKey);
|
||||
bool bChangedSoundFile = false;
|
||||
|
||||
if (pVar == mv_startTrigger.GetVar())
|
||||
{
|
||||
QString sFilename = mv_startTrigger;
|
||||
bChangedSoundFile = sFilename != soundKey.sStartTrigger.c_str();
|
||||
soundKey.sStartTrigger = sFilename.toUtf8().data();
|
||||
}
|
||||
else if (pVar == mv_stopTrigger.GetVar())
|
||||
{
|
||||
QString sFilename = mv_stopTrigger;
|
||||
bChangedSoundFile = sFilename != soundKey.sStopTrigger.c_str();
|
||||
soundKey.sStopTrigger = sFilename.toUtf8().data();
|
||||
}
|
||||
|
||||
|
||||
@@ -2233,7 +2233,6 @@ void CTrackViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKey
|
||||
|
||||
if (pTrack && inRange)
|
||||
{
|
||||
bool keyCreated = false;
|
||||
if (bTryAddKeysInGroup && pNode->GetParentNode()) // Add keys in group
|
||||
{
|
||||
CTrackViewTrackBundle tracksInGroup = pNode->GetTracksByParam(pTrack->GetParameterType());
|
||||
@@ -2248,8 +2247,6 @@ void CTrackViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKey
|
||||
AzToolsFramework::ScopedUndoBatch undoBatch("Create Key");
|
||||
pCurrTrack->CreateKey(keyTime);
|
||||
undoBatch.MarkEntityDirty(sequence->GetSequenceComponentEntityId());
|
||||
|
||||
keyCreated = true;
|
||||
}
|
||||
}
|
||||
else // A compound track
|
||||
@@ -2262,8 +2259,6 @@ void CTrackViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKey
|
||||
AzToolsFramework::ScopedUndoBatch undoBatch("Create Key");
|
||||
pSubTrack->CreateKey(keyTime);
|
||||
undoBatch.MarkEntityDirty(sequence->GetSequenceComponentEntityId());
|
||||
|
||||
keyCreated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2276,15 +2271,13 @@ void CTrackViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKey
|
||||
AzToolsFramework::ScopedUndoBatch undoBatch("Create Key");
|
||||
pTrack->CreateKey(keyTime);
|
||||
undoBatch.MarkEntityDirty(sequence->GetSequenceComponentEntityId());
|
||||
|
||||
keyCreated = true;
|
||||
}
|
||||
}
|
||||
else // A compound track
|
||||
{
|
||||
if (pTrack->GetValueType() == AnimValueType::RGB)
|
||||
{
|
||||
keyCreated = CreateColorKey(pTrack, keyTime);
|
||||
CreateColorKey(pTrack, keyTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2295,7 +2288,6 @@ void CTrackViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKey
|
||||
if (IsOkToAddKeyHere(pSubTrack, keyTime))
|
||||
{
|
||||
pSubTrack->CreateKey(keyTime);
|
||||
keyCreated = true;
|
||||
}
|
||||
}
|
||||
undoBatch.MarkEntityDirty(sequence->GetSequenceComponentEntityId());
|
||||
@@ -2617,7 +2609,6 @@ void CTrackViewDopeSheetBase::DrawSelectTrack(const Range& timeRange, QPainter*
|
||||
void CTrackViewDopeSheetBase::DrawBoolTrack(const Range& timeRange, QPainter* painter, CTrackViewTrack* pTrack, const QRect& rc)
|
||||
{
|
||||
int x0 = TimeToClient(timeRange.start);
|
||||
float t0 = timeRange.start;
|
||||
|
||||
const QBrush prevBrush = painter->brush();
|
||||
painter->setBrush(m_visibilityBrush);
|
||||
@@ -2648,7 +2639,6 @@ void CTrackViewDopeSheetBase::DrawBoolTrack(const Range& timeRange, QPainter* pa
|
||||
painter->fillRect(QRect(QPoint(x0, rc.top() + 4), QPoint(x, rc.bottom() - 4)), gradient);
|
||||
}
|
||||
|
||||
t0 = time;
|
||||
x0 = x;
|
||||
}
|
||||
int x = TimeToClient(timeRange.end);
|
||||
|
||||
@@ -198,7 +198,6 @@ void CTrackViewKeyPropertiesDlg::OnKeySelectionChanged(CTrackViewSequence* seque
|
||||
|
||||
m_wndProps->setEnabled(false);
|
||||
m_wndTrackProps->setEnabled(false);
|
||||
bool bAssigned = false;
|
||||
if (selectedKeys.GetKeyCount() > 0 && selectedKeys.AreAllKeysOfSameType())
|
||||
{
|
||||
CTrackViewTrack* pTrack = selectedKeys.GetKey(0).GetTrack();
|
||||
@@ -215,12 +214,6 @@ void CTrackViewKeyPropertiesDlg::OnKeySelectionChanged(CTrackViewSequence* seque
|
||||
{
|
||||
AddVars(m_keyControls[i]);
|
||||
}
|
||||
|
||||
if (m_keyControls[i]->OnKeySelectionChange(selectedKeys))
|
||||
{
|
||||
bAssigned = true;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,11 +197,9 @@ bool CImageGif::Load(const QString& fileName, CImageEx& outImage)
|
||||
return false;
|
||||
}
|
||||
|
||||
int numcols;
|
||||
unsigned char ch, ch1;
|
||||
uint8* ptr1;
|
||||
int i;
|
||||
short transparency = -1;
|
||||
|
||||
TImage<uint8> outImageIndex;
|
||||
|
||||
@@ -246,7 +244,6 @@ bool CImageGif::Load(const QString& fileName, CImageEx& outImage)
|
||||
HasColormap = ((ch & COLORMAPMASK) ? true : false);
|
||||
|
||||
BitsPerPixel = (ch & 7) + 1;
|
||||
numcols = ColorMapSize = 1 << BitsPerPixel;
|
||||
BitMask = ColorMapSize - 1;
|
||||
|
||||
Background = NEXTBYTE; /* background color... not used. */
|
||||
@@ -290,10 +287,6 @@ bool CImageGif::Load(const QString& fileName, CImageEx& outImage)
|
||||
{
|
||||
case GRAPHIC_EXT:
|
||||
ch = NEXTBYTE;
|
||||
if (ptr[0] & 0x1)
|
||||
{
|
||||
transparency = ptr[3]; /* transparent color index */
|
||||
}
|
||||
ptr += ch;
|
||||
break;
|
||||
case PLAINTEXT_EXT:
|
||||
@@ -317,9 +310,6 @@ bool CImageGif::Load(const QString& fileName, CImageEx& outImage)
|
||||
}
|
||||
}
|
||||
|
||||
//if (transparency >= 0)
|
||||
//mfSet_transparency(transparency);
|
||||
|
||||
/* Now read in values from the image descriptor */
|
||||
|
||||
ch = NEXTBYTE;
|
||||
|
||||
Reference in New Issue
Block a user