More fixes for Code/Editor
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -73,7 +73,7 @@ public:
|
||||
virtual IDataBaseLibrary* AddLibrary(const QString& library, bool bIsLevelLibrary = false, bool bIsLoading = true) override;
|
||||
virtual void DeleteLibrary(const QString& library, bool forceDeleteLevel = false) override;
|
||||
//! Get number of libraries.
|
||||
virtual int GetLibraryCount() const override { return m_libs.size(); };
|
||||
virtual int GetLibraryCount() const override { return static_cast<int>(m_libs.size()); };
|
||||
//! Get number of modified libraries.
|
||||
virtual int GetModifiedLibraryCount() const override;
|
||||
|
||||
|
||||
@@ -529,8 +529,8 @@ QString CEditorCommandManager::ExecuteAndLogReturn(CCommand* pCommand, const CCo
|
||||
void CEditorCommandManager::GetArgsFromString(const AZStd::string& argsTxt, CCommand::CArgs& argList)
|
||||
{
|
||||
const char quoteSymbol = '\'';
|
||||
int curPos = 0;
|
||||
int prevPos = 0;
|
||||
size_t curPos = 0;
|
||||
size_t prevPos = 0;
|
||||
AZStd::vector<AZStd::string> tokens;
|
||||
AZ::StringFunc::Tokenize(argsTxt, tokens, ' ');
|
||||
for(AZStd::string& arg : tokens)
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Config
|
||||
|
||||
uint32 CConfigGroup::GetVarCount()
|
||||
{
|
||||
return m_vars.size();
|
||||
return static_cast<uint32>(m_vars.size());
|
||||
}
|
||||
|
||||
IConfigVar* CConfigGroup::GetVar(const char* szName)
|
||||
|
||||
@@ -220,7 +220,7 @@ void ConsoleLineEdit::keyPressEvent(QKeyEvent* ev)
|
||||
}
|
||||
|
||||
// If a history command was reused directly via up arrow enter, do not reset history index
|
||||
if (m_history.size() > 0 && m_historyIndex < m_history.size() && m_history[m_historyIndex] == str)
|
||||
if (m_history.size() > 0 && m_historyIndex < static_cast<unsigned int>(m_history.size()) && m_history[m_historyIndex] == str)
|
||||
{
|
||||
m_bReusedHistory = true;
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ void CImageHistogramDisplay::paintEvent([[maybe_unused]] QPaintEvent* event)
|
||||
}
|
||||
}
|
||||
|
||||
crtX = rcGraph.left() + x + 1;
|
||||
crtX = static_cast<int>(rcGraph.left() + x + 1);
|
||||
painter.drawLine(crtX, graphBottom, crtX, graphBottom - scale * graphHeight);
|
||||
}
|
||||
}
|
||||
@@ -260,7 +260,7 @@ void CImageHistogramDisplay::paintEvent([[maybe_unused]] QPaintEvent* event)
|
||||
{
|
||||
i = ((float)x / graphWidth) * (kNumColorLevels - 1);
|
||||
i = CLAMP(i, 0, kNumColorLevels - 1);
|
||||
crtX = rcGraph.left() + x + 1;
|
||||
crtX = static_cast<UINT>(rcGraph.left() + x + 1);
|
||||
scaleR = scaleG = scaleB = scaleA = 0;
|
||||
|
||||
if (m_maxCount[0])
|
||||
@@ -385,7 +385,7 @@ void CImageHistogramDisplay::paintEvent([[maybe_unused]] QPaintEvent* event)
|
||||
}
|
||||
|
||||
painter.setPen(pPen);
|
||||
painter.drawLine(rcGraph.left() + x + 1, graphBottom, rcGraph.left() + x + 1, graphBottom - scale * graphHeight);
|
||||
painter.drawLine(rcGraph.left() + static_cast<int>(x) + 1, graphBottom, rcGraph.left() + static_cast<int>(x) + 1, graphBottom - scale * graphHeight);
|
||||
}
|
||||
|
||||
// then draw 3 lines so we separate the channels
|
||||
|
||||
@@ -56,8 +56,8 @@ CReflectedVarAnimation AnimationPropertyCtrl::value() const
|
||||
void AnimationPropertyCtrl::OnApplyClicked()
|
||||
{
|
||||
QStringList cSelectedAnimations;
|
||||
size_t nTotalAnimations(0);
|
||||
size_t nCurrentAnimation(0);
|
||||
int nTotalAnimations(0);
|
||||
int nCurrentAnimation(0);
|
||||
|
||||
QString combinedString = GetIEditor()->GetResourceSelectorHost()->GetGlobalSelection("animation");
|
||||
SplitString(combinedString, cSelectedAnimations, ',');
|
||||
|
||||
@@ -203,7 +203,7 @@ void ReflectedPropertyControl::CreateItems(XmlNodeRef node, CVarBlockPtr& outBlo
|
||||
outBlockPtr = new CVarBlock;
|
||||
for (size_t i = 0, iGroupCount(node->getChildCount()); i < iGroupCount; ++i)
|
||||
{
|
||||
XmlNodeRef groupNode = node->getChild(i);
|
||||
XmlNodeRef groupNode = node->getChild(static_cast<int>(i));
|
||||
|
||||
if (groupNode->haveAttr("hidden"))
|
||||
{
|
||||
|
||||
@@ -1583,7 +1583,7 @@ bool AbstractSplineWidget::IsKeySelected(ISplineInterpolator* pSpline, int nKey,
|
||||
int AbstractSplineWidget::GetNumSelected()
|
||||
{
|
||||
int nSelected = 0;
|
||||
for (int splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
for (size_t splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
{
|
||||
if (ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline)
|
||||
{
|
||||
@@ -1818,7 +1818,7 @@ AbstractSplineWidget::EHitCode AbstractSplineWidget::HitTest(const QPoint& point
|
||||
}
|
||||
|
||||
// For each Spline...
|
||||
for (int splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
for (size_t splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
ISplineInterpolator* pDetailSpline = m_splines[splineIndex].pDetailSpline;
|
||||
@@ -1973,7 +1973,7 @@ void AbstractSplineWidget::ScaleAmplitudeKeys(float time, float startValue, floa
|
||||
m_nHitKeyIndex = -1;
|
||||
m_nHitDimension = -1;
|
||||
|
||||
for (int splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
for (size_t splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
|
||||
@@ -2077,7 +2077,7 @@ void AbstractSplineWidget::TimeScaleKeys(float time, float startTime, float endT
|
||||
|
||||
float affectedRangeMin = FLT_MAX;
|
||||
float affectedRangeMax = -FLT_MAX;
|
||||
for (int splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
for (size_t splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
|
||||
@@ -2184,7 +2184,7 @@ void AbstractSplineWidget::ValueScaleKeys(float startValue, float endValue)
|
||||
m_nHitKeyIndex = -1;
|
||||
m_nHitDimension = -1;
|
||||
|
||||
for (int splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
for (size_t splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
|
||||
@@ -2223,7 +2223,7 @@ void AbstractSplineWidget::MoveSelectedKeys(Vec2 offset, bool copyKeys)
|
||||
}
|
||||
|
||||
// For each spline...
|
||||
for (int splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
for (size_t splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
|
||||
@@ -2298,7 +2298,7 @@ void AbstractSplineWidget::RemoveSelectedKeys()
|
||||
m_pHitDetailSpline = nullptr;
|
||||
m_nHitKeyIndex = -1;
|
||||
|
||||
for (int splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
for (size_t splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
|
||||
@@ -2338,7 +2338,7 @@ void AbstractSplineWidget::RemoveSelectedKeyTimesImpl()
|
||||
StoreUndo();
|
||||
SendNotifyEvent(SPLN_BEFORE_CHANGE);
|
||||
|
||||
for (int splineIndex = 0, end = m_splines.size(); splineIndex < end; ++splineIndex)
|
||||
for (size_t splineIndex = 0, end = m_splines.size(); splineIndex < end; ++splineIndex)
|
||||
{
|
||||
std::vector<KeyTime>::iterator itTime = m_keyTimes.begin(), endTime = m_keyTimes.end();
|
||||
for (int keyIndex = 0, endIndex = m_splines[splineIndex].pSpline->GetKeyCount(); keyIndex < endIndex; )
|
||||
@@ -2376,9 +2376,9 @@ void AbstractSplineWidget::RedrawWindowAroundMarker()
|
||||
{
|
||||
UpdateKeyTimes();
|
||||
std::vector<KeyTime>::iterator itKeyTime = std::lower_bound(m_keyTimes.begin(), m_keyTimes.end(), KeyTime(m_fTimeMarker, 0));
|
||||
int keyTimeIndex = (itKeyTime != m_keyTimes.end() ? itKeyTime - m_keyTimes.begin() : m_keyTimes.size());
|
||||
size_t keyTimeIndex = (itKeyTime != m_keyTimes.end() ? itKeyTime - m_keyTimes.begin() : m_keyTimes.size());
|
||||
int redrawRangeStart = (keyTimeIndex >= 2 ? TimeToXOfs(m_keyTimes[keyTimeIndex - 2].time) : m_rcSpline.left());
|
||||
int redrawRangeEnd = (keyTimeIndex < int(m_keyTimes.size()) - 2 ? TimeToXOfs(m_keyTimes[keyTimeIndex + 2].time) : m_rcSpline.right() + 1);
|
||||
int redrawRangeEnd = (keyTimeIndex < m_keyTimes.size() - 2 ? TimeToXOfs(m_keyTimes[keyTimeIndex + 2].time) : m_rcSpline.right() + 1);
|
||||
|
||||
QRect rc(QPoint(redrawRangeStart, m_rcSpline.top()), QPoint(redrawRangeEnd, m_rcSpline.bottom() + 1) - QPoint(1, 1));
|
||||
rc = rc.normalized().intersected(m_rcSpline);
|
||||
@@ -2478,7 +2478,7 @@ void AbstractSplineWidget::ClearSelection()
|
||||
{
|
||||
ConditionalStoreUndo();
|
||||
|
||||
for (int splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
for (size_t splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
|
||||
@@ -2521,7 +2521,7 @@ void AbstractSplineWidget::StoreUndo()
|
||||
if (CUndo::IsRecording() && !m_pCurrentUndo)
|
||||
{
|
||||
std::vector<ISplineInterpolator*> splines(m_splines.size());
|
||||
for (int splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
for (size_t splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
{
|
||||
splines[splineIndex] = m_splines[splineIndex].pSpline;
|
||||
}
|
||||
@@ -2564,7 +2564,7 @@ void AbstractSplineWidget::DuplicateSelectedKeys()
|
||||
|
||||
using KeysToAddContainer = std::vector<CKeyCopyInfo>;
|
||||
KeysToAddContainer keysToInsert;
|
||||
for (int splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
for (size_t splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
|
||||
@@ -2664,7 +2664,7 @@ void AbstractSplineWidget::KeyAll()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void AbstractSplineWidget::SelectAll()
|
||||
{
|
||||
for (int splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
for (size_t splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
|
||||
@@ -2815,7 +2815,7 @@ void AbstractSplineWidget::SelectRectangle(const QRect& rc, bool bSelect)
|
||||
{
|
||||
std::swap(t0, t1);
|
||||
}
|
||||
for (int splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
for (size_t splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
ISplineInterpolator* pDetailSpline = m_splines[splineIndex].pDetailSpline;
|
||||
@@ -3031,7 +3031,7 @@ void AbstractSplineWidget::ModifySelectedKeysFlags(int nRemoveFlags, int nAddFla
|
||||
|
||||
SendNotifyEvent(SPLN_BEFORE_CHANGE);
|
||||
|
||||
for (int splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
for (size_t splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
|
||||
@@ -3188,7 +3188,7 @@ void AbstractSplineWidget::GotoNextKey(bool previousKey)
|
||||
{
|
||||
bool boFoundTheSelectedKey(false);
|
||||
|
||||
for (int splineIndex = 0, endSpline = m_splines.size(); splineIndex < endSpline; ++splineIndex)
|
||||
for (size_t splineIndex = 0, endSpline = m_splines.size(); splineIndex < endSpline; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
for (int i = 0; i < pSpline->GetKeyCount(); i++)
|
||||
@@ -3230,7 +3230,7 @@ void AbstractSplineWidget::GotoNextKey(bool previousKey)
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int splineIndex = 0, endSpline = m_splines.size(); splineIndex < endSpline; ++splineIndex)
|
||||
for (size_t splineIndex = 0, endSpline = m_splines.size(); splineIndex < endSpline; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
|
||||
@@ -3281,7 +3281,7 @@ void AbstractSplineWidget::RemoveAllKeysButThis()
|
||||
{
|
||||
std::vector<int> keys;
|
||||
|
||||
for (int splineIndex = 0, endSpline = m_splines.size(); splineIndex < endSpline; ++splineIndex)
|
||||
for (size_t splineIndex = 0, endSpline = m_splines.size(); splineIndex < endSpline; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
void AddSpline(ISplineInterpolator * pSpline, ISplineInterpolator * pDetailSpline, QColor anColorArray[4]);
|
||||
void RemoveSpline(ISplineInterpolator* pSpline);
|
||||
void RemoveAllSplines();
|
||||
int GetSplineCount() const { return m_splines.size(); }
|
||||
int GetSplineCount() const { return static_cast<int>(m_splines.size()); }
|
||||
ISplineInterpolator* GetSpline(int nIndex) const { return m_splines[nIndex].pSpline; }
|
||||
|
||||
void SetTimeMarker(float fTime);
|
||||
|
||||
@@ -53,7 +53,7 @@ void CTextEditorCtrl::LoadFile(const QString& sFileName)
|
||||
size_t length = file.GetLength();
|
||||
|
||||
QByteArray text;
|
||||
text.resize(length);
|
||||
text.resize(static_cast<int>(length));
|
||||
file.ReadRaw(text.data(), length);
|
||||
|
||||
setPlainText(text);
|
||||
|
||||
@@ -613,7 +613,7 @@ public:
|
||||
}
|
||||
|
||||
// Get boolean options
|
||||
const int numOptions = options.size();
|
||||
const int numOptions = static_cast<int>(options.size());
|
||||
for (int i = 0; i < numOptions; ++i)
|
||||
{
|
||||
options[i].second = parser.isSet(options[i].first);
|
||||
@@ -3240,7 +3240,7 @@ bool CCryEditApp::CreateLevel(bool& wasCreateLevelOperationCancelled)
|
||||
{
|
||||
QFileInfo info(fullyQualifiedLevelName);
|
||||
const AZStd::string rawProjectDirectory = Path::GetEditingGameDataFolder();
|
||||
const QString projectDirectory = QDir::toNativeSeparators(QString::fromUtf8(rawProjectDirectory.data(), rawProjectDirectory.size()));
|
||||
const QString projectDirectory = QDir::toNativeSeparators(QString::fromUtf8(rawProjectDirectory.data(), static_cast<int>(rawProjectDirectory.size())));
|
||||
const QString elidedLevelName = QStringLiteral("%1...%2").arg(levelName.left(10)).arg(levelName.right(10));
|
||||
const QString elidedLevelFileName = QStringLiteral("%1...%2").arg(info.fileName().left(10)).arg(info.fileName().right(10));
|
||||
const QString message = QObject::tr(
|
||||
|
||||
@@ -1260,7 +1260,7 @@ bool CCryEditDoc::SaveLevel(const QString& filename)
|
||||
if (savedEntities)
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "CCryEditDoc::SaveLevel Updated PakFile levelEntities.editor_xml");
|
||||
pakFile.UpdateFile("LevelEntities.editor_xml", entitySaveBuffer.begin(), entitySaveBuffer.size());
|
||||
pakFile.UpdateFile("LevelEntities.editor_xml", entitySaveBuffer.begin(), static_cast<int>(entitySaveBuffer.size()));
|
||||
|
||||
// Save XML archive to pak file.
|
||||
bool bSaved = xmlAr.SaveToPak(Path::GetPath(tempSaveFile), pakFile);
|
||||
|
||||
@@ -1477,7 +1477,7 @@ bool EditorViewportWidget::AddCameraMenuItems(QMenu* menu)
|
||||
Camera::CameraBus::BroadcastResult(getCameraResults, &Camera::CameraRequests::GetCameras);
|
||||
|
||||
QVector<QAction*> additionalCameras;
|
||||
additionalCameras.reserve(getCameraResults.values.size());
|
||||
additionalCameras.reserve(static_cast<int>(getCameraResults.values.size()));
|
||||
|
||||
for (const AZ::EntityId& entityId : getCameraResults.values)
|
||||
{
|
||||
|
||||
@@ -119,7 +119,7 @@ void CErrorReportTableModel::setErrorReport(CErrorReport* report)
|
||||
|
||||
int CErrorReportTableModel::rowCount(const QModelIndex& parent) const
|
||||
{
|
||||
return parent.isValid() ? 0 : m_errorRecords.size();
|
||||
return parent.isValid() ? 0 : static_cast<int>(m_errorRecords.size());
|
||||
}
|
||||
|
||||
int CErrorReportTableModel::columnCount(const QModelIndex& parent) const
|
||||
|
||||
@@ -302,7 +302,7 @@ void CExportManager::ProcessEntityAnimationTrack(
|
||||
return;
|
||||
}
|
||||
|
||||
for (int trackNumber = 0; trackNumber < pEntityTrack->GetChildCount(); ++trackNumber)
|
||||
for (unsigned int trackNumber = 0; trackNumber < pEntityTrack->GetChildCount(); ++trackNumber)
|
||||
{
|
||||
CTrackViewTrack* pSubTrack = static_cast<CTrackViewTrack*>(pEntityTrack->GetChild(trackNumber));
|
||||
|
||||
@@ -964,7 +964,7 @@ bool CExportManager::AddObjectsFromSequence(CTrackViewSequence* pSequence, XmlNo
|
||||
}
|
||||
|
||||
const uint numKeys = pSequenceTrack->GetKeyCount();
|
||||
for (int keyIndex = 0; keyIndex < numKeys; ++keyIndex)
|
||||
for (uint keyIndex = 0; keyIndex < numKeys; ++keyIndex)
|
||||
{
|
||||
const CTrackViewKeyHandle& keyHandle = pSequenceTrack->GetKey(keyIndex);
|
||||
ISequenceKey sequenceKey;
|
||||
@@ -1043,7 +1043,7 @@ bool CExportManager::AddSelectedRegionObjects()
|
||||
std::vector<CBaseObject*> objects;
|
||||
GetIEditor()->GetObjectManager()->FindObjectsInAABB(box, objects);
|
||||
|
||||
int numObjects = objects.size();
|
||||
const size_t numObjects = objects.size();
|
||||
if (numObjects > m_data.m_objects.size())
|
||||
{
|
||||
m_data.m_objects.reserve(numObjects + 1); // +1 for terrain
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Export
|
||||
public:
|
||||
CMesh();
|
||||
|
||||
virtual int GetFaceCount() const { return m_faces.size(); }
|
||||
virtual int GetFaceCount() const { return static_cast<int>(m_faces.size()); }
|
||||
virtual const Face* GetFaceBuffer() const { return m_faces.size() ? &m_faces[0] : 0; }
|
||||
|
||||
private:
|
||||
@@ -53,22 +53,22 @@ namespace Export
|
||||
public:
|
||||
CObject(const char* pName);
|
||||
|
||||
virtual int GetVertexCount() const { return m_vertices.size(); }
|
||||
virtual const Vector3D* GetVertexBuffer() const{ return m_vertices.size() ? &m_vertices[0] : 0; }
|
||||
int GetVertexCount() const override { return static_cast<int>(m_vertices.size()); }
|
||||
const Vector3D* GetVertexBuffer() const override { return m_vertices.size() ? &m_vertices[0] : nullptr; }
|
||||
|
||||
virtual int GetNormalCount() const { return m_normals.size(); }
|
||||
virtual const Vector3D* GetNormalBuffer() const { return m_normals.size() ? &m_normals[0] : 0; }
|
||||
int GetNormalCount() const override { return static_cast<int>(m_normals.size()); }
|
||||
const Vector3D* GetNormalBuffer() const override { return m_normals.size() ? &m_normals[0] : nullptr; }
|
||||
|
||||
virtual int GetTexCoordCount() const { return m_texCoords.size(); }
|
||||
virtual const UV* GetTexCoordBuffer() const { return m_texCoords.size() ? &m_texCoords[0] : 0; }
|
||||
int GetTexCoordCount() const override { return static_cast<int>(m_texCoords.size()); }
|
||||
const UV* GetTexCoordBuffer() const override { return m_texCoords.size() ? &m_texCoords[0] : nullptr; }
|
||||
|
||||
virtual int GetMeshCount() const { return m_meshes.size(); }
|
||||
virtual Mesh* GetMesh(int index) const { return m_meshes[index]; }
|
||||
int GetMeshCount() const override { return static_cast<int>(m_meshes.size()); }
|
||||
Mesh* GetMesh(int index) const override { return m_meshes[index]; }
|
||||
|
||||
virtual size_t MeshHash() const{return m_MeshHash; }
|
||||
size_t MeshHash() const override{return m_MeshHash; }
|
||||
|
||||
void SetMaterialName(const char* pName);
|
||||
virtual int GetEntityAnimationDataCount() const {return m_entityAnimData.size(); }
|
||||
virtual int GetEntityAnimationDataCount() const {return static_cast<int>(m_entityAnimData.size()); }
|
||||
virtual const EntityAnimData* GetEntityAnimationData(int index) const {return &m_entityAnimData[index]; }
|
||||
virtual void SetEntityAnimationData(EntityAnimData entityData){ m_entityAnimData.push_back(entityData); };
|
||||
void SetLastPtr(CBaseObject* pObject){m_pLastObject = pObject; };
|
||||
@@ -92,7 +92,7 @@ namespace Export
|
||||
: public IData
|
||||
{
|
||||
public:
|
||||
virtual int GetObjectCount() const { return m_objects.size(); }
|
||||
virtual int GetObjectCount() const { return static_cast<int>(m_objects.size()); }
|
||||
virtual Object* GetObject(int index) const { return m_objects[index]; }
|
||||
virtual Object* AddObject(const char* objectName);
|
||||
void Clear();
|
||||
|
||||
@@ -227,7 +227,7 @@ QString COBJExporter::MakeRelativePath(const char* pMainFileName, const char* pF
|
||||
const char* ch = strrchr(pMainFileName, '\\');
|
||||
if (ch)
|
||||
{
|
||||
if (strlen(pFileName) > ch - pMainFileName && !_strnicmp(pMainFileName, pFileName, ch - pMainFileName))
|
||||
if (strlen(pFileName) > static_cast<size_t>(ch - pMainFileName) && !_strnicmp(pMainFileName, pFileName, ch - pMainFileName))
|
||||
{
|
||||
return QString(pFileName + (ch - pMainFileName) + 1);
|
||||
}
|
||||
@@ -256,7 +256,7 @@ const char* COBJExporter::TrimFloat(float fValue) const
|
||||
++nCurBuf;
|
||||
sprintf_s(pBuf, bufSize, "%f", fValue);
|
||||
|
||||
for (int i = strlen(pBuf) - 1; i > 0; --i)
|
||||
for (int i = static_cast<int>(strlen(pBuf)) - 1; i > 0; --i)
|
||||
{
|
||||
if (pBuf[i] == '0')
|
||||
{
|
||||
|
||||
@@ -215,7 +215,7 @@ bool COCMExporter::ExportToFile(const char* filename, const Export::IData* pExpo
|
||||
for (size_t a = 0; a < MeshCount; a++)
|
||||
{
|
||||
SOCMeshInfo MeshInfo;
|
||||
MeshInfo.m_MeshHash = pExportData->GetObject(a)->MeshHash();
|
||||
MeshInfo.m_MeshHash = pExportData->GetObject(static_cast<int>(a))->MeshHash();
|
||||
const tdMeshOffset::iterator it = std::find(MeshOffsets.begin(), MeshOffsets.end(), MeshInfo);
|
||||
if (it != MeshOffsets.end())
|
||||
{
|
||||
@@ -223,15 +223,15 @@ bool COCMExporter::ExportToFile(const char* filename, const Export::IData* pExpo
|
||||
}
|
||||
else
|
||||
{
|
||||
MeshInfo.m_Offset = Offset;
|
||||
Offset += SaveMesh(Writer, pExportData->GetObject(a), MeshInfo.m_OBBMat);
|
||||
MeshInfo.m_Offset = static_cast<uint32>(Offset);
|
||||
Offset += SaveMesh(Writer, pExportData->GetObject(static_cast<int>(a)), MeshInfo.m_OBBMat);
|
||||
}
|
||||
MeshOffsets.push_back(MeshInfo);
|
||||
}
|
||||
OffsetInstances = Offset;
|
||||
OffsetInstances = static_cast<uint32>(Offset);
|
||||
for (size_t a = 0; a < InstCount; a++)
|
||||
{
|
||||
SaveInstance(Writer, pExportData->GetObject(a), MeshOffsets[a]);
|
||||
SaveInstance(Writer, pExportData->GetObject(static_cast<int>(a)), MeshOffsets[a]);
|
||||
}
|
||||
Writer.Seek(4);
|
||||
Writer.Write(static_cast<uint32>(MeshOffsets.size()));
|
||||
@@ -263,7 +263,7 @@ const char* COCMExporter::TrimFloat(float fValue) const
|
||||
++nCurBuf;
|
||||
sprintf_s(pBuf, bufSize, "%f", fValue);
|
||||
|
||||
for (int i = strlen(pBuf) - 1; i > 0; --i)
|
||||
for (int i = static_cast<int>(strlen(pBuf)) - 1; i > 0; --i)
|
||||
{
|
||||
if (pBuf[i] == '0')
|
||||
{
|
||||
|
||||
@@ -252,11 +252,11 @@ void CGameExporter::ExportOcclusionMesh(const char* pszGamePath)
|
||||
{
|
||||
CMemoryBlock Temp;
|
||||
const size_t Size = FileIn.size();
|
||||
Temp.Allocate(Size);
|
||||
Temp.Allocate(static_cast<int>(Size));
|
||||
FileIn.read(reinterpret_cast<char*>(Temp.GetBuffer()), Size);
|
||||
FileIn.close();
|
||||
CCryMemFile FileOut;
|
||||
FileOut.Write(Temp.GetBuffer(), Size);
|
||||
FileOut.Write(Temp.GetBuffer(), static_cast<int>(Size));
|
||||
m_levelPak.m_pakFile.UpdateFile(levelDataFile.toUtf8().data(), FileOut);
|
||||
}
|
||||
}
|
||||
@@ -281,13 +281,13 @@ void CGameExporter::ExportLevelData(const QString& path, bool /*bExportMission*/
|
||||
QString levelDataFile = path + "LevelData.xml";
|
||||
XmlString xmlData = root->getXML();
|
||||
CCryMemFile file;
|
||||
file.Write(xmlData.c_str(), xmlData.length());
|
||||
file.Write(xmlData.c_str(), static_cast<unsigned int>(xmlData.length()));
|
||||
m_levelPak.m_pakFile.UpdateFile(levelDataFile.toUtf8().data(), file);
|
||||
|
||||
QString levelDataActionFile = path + "LevelDataAction.xml";
|
||||
XmlString xmlDataAction = rootAction->getXML();
|
||||
CCryMemFile fileAction;
|
||||
fileAction.Write(xmlDataAction.c_str(), xmlDataAction.length());
|
||||
fileAction.Write(xmlDataAction.c_str(), static_cast<unsigned int>(xmlDataAction.length()));
|
||||
m_levelPak.m_pakFile.UpdateFile(levelDataActionFile.toUtf8().data(), fileAction);
|
||||
|
||||
AZStd::vector<char> entitySaveBuffer;
|
||||
@@ -298,7 +298,7 @@ void CGameExporter::ExportLevelData(const QString& path, bool /*bExportMission*/
|
||||
{
|
||||
QString entitiesFile;
|
||||
entitiesFile = QStringLiteral("%1%2.entities_xml").arg(path, "Mission0");
|
||||
m_levelPak.m_pakFile.UpdateFile(entitiesFile.toUtf8().data(), entitySaveBuffer.begin(), entitySaveBuffer.size());
|
||||
m_levelPak.m_pakFile.UpdateFile(entitiesFile.toUtf8().data(), entitySaveBuffer.begin(), static_cast<int>(entitySaveBuffer.size()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ void CGameExporter::ExportLevelInfo(const QString& path)
|
||||
XmlString xmlData = root->getXML();
|
||||
|
||||
CCryMemFile file;
|
||||
file.Write(xmlData.c_str(), xmlData.length());
|
||||
file.Write(xmlData.c_str(), static_cast<unsigned int>(xmlData.length()));
|
||||
m_levelPak.m_pakFile.UpdateFile(filename.toUtf8().data(), file);
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ void CGameExporter::ExportLevelResourceList(const QString& path)
|
||||
CCryMemFile memFile;
|
||||
for (const char* filename = pResList->GetFirst(); filename; filename = pResList->GetNext())
|
||||
{
|
||||
memFile.Write(filename, strlen(filename));
|
||||
memFile.Write(filename, static_cast<unsigned int>(strlen(filename)));
|
||||
memFile.Write("\n", 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ void CGameResourcesExporter::Save(const QString& outputDirectory)
|
||||
{
|
||||
// Save this file in target folder.
|
||||
QString trgFilename = Path::Make(outputDirectory, srcFilename);
|
||||
int fsize = file.GetLength();
|
||||
int fsize = static_cast<int>(file.GetLength());
|
||||
if (fsize > data.GetSize())
|
||||
{
|
||||
data.Allocate(fsize + 16);
|
||||
@@ -123,23 +123,6 @@ void CGameResourcesExporter::Save(const QString& outputDirectory)
|
||||
m_files.clear();
|
||||
}
|
||||
|
||||
#if defined(WIN64) || defined(APPLE) || defined(AZ_PLATFORM_LINUX)
|
||||
template <class Container1, class Container2>
|
||||
void Append(Container1& a, const Container2& b)
|
||||
{
|
||||
a.reserve (a.size() + b.size());
|
||||
for (auto it = b.begin(); it != b.end(); ++it)
|
||||
{
|
||||
a.insert(a.end(), *it);
|
||||
}
|
||||
}
|
||||
#else
|
||||
template <class Container1, class Container2>
|
||||
void Append(Container1& a, const Container2& b)
|
||||
{
|
||||
a.insert (a.end(), b.begin(), b.end());
|
||||
}
|
||||
#endif
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Go through all editor objects and gathers files from thier properties.
|
||||
@@ -150,5 +133,5 @@ void CGameResourcesExporter::GetFilesFromObjects()
|
||||
CUsedResources rs;
|
||||
GetIEditor()->GetObjectManager()->GatherUsedResources(rs);
|
||||
|
||||
Append(m_files, rs.files);
|
||||
AZStd::copy(rs.files.begin(), rs.files.end(), AZStd::back_inserter(m_files));
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ void CTriMesh::UpdateIndexedMesh(IIndexedMesh* pIndexedMesh) const
|
||||
|
||||
pIndexedMesh->SetBBox(bb);
|
||||
|
||||
pIndexedMesh->SetSubSetCount(usedMaterialIds.size());
|
||||
pIndexedMesh->SetSubSetCount(static_cast<int>(usedMaterialIds.size()));
|
||||
for (int i = 0; i < usedMaterialIds.size(); i++)
|
||||
{
|
||||
pIndexedMesh->SetSubsetMaterialId(i, usedMaterialIds[i]);
|
||||
|
||||
@@ -477,7 +477,7 @@ bool CLevelFileDialog::ValidateLevelPath(const QString& levelPath) const
|
||||
QString currentPath = (Path::GetEditingGameDataFolder() + "/" + kLevelsFolder).c_str();
|
||||
for (size_t i = 0; i < splittedPath.size() - 1; ++i)
|
||||
{
|
||||
currentPath += "/" + splittedPath[i];
|
||||
currentPath += "/" + splittedPath[static_cast<int>(i)];
|
||||
|
||||
if (CFileUtil::FileExists(currentPath) || CheckLevelFolder(currentPath))
|
||||
{
|
||||
|
||||
@@ -1674,7 +1674,7 @@ void MainWindow::OnUpdateConnectionStatus()
|
||||
tooltip += m_connectionListener->LastAssetProcessorTask().c_str();
|
||||
tooltip += "\n";
|
||||
AZStd::set<AZStd::string> failedJobs = m_connectionListener->FailedJobsList();
|
||||
int failureCount = failedJobs.size();
|
||||
int failureCount = static_cast<int>(failedJobs.size());
|
||||
if (failureCount)
|
||||
{
|
||||
tooltip += "\n Failed Jobs\n";
|
||||
|
||||
@@ -840,8 +840,8 @@ void CBaseObject::DrawDefault(DisplayContext& dc, const QColor& labelColor)
|
||||
{
|
||||
dc.DrawLine(GetParentAttachPointWorldTM().GetTranslation(), wp, IsFrozen() ? kLinkColorGray : kLinkColorParent, IsFrozen() ? kLinkColorGray : kLinkColorChild);
|
||||
}
|
||||
int nChildCount = GetChildCount();
|
||||
for (int i = 0; i < nChildCount; ++i)
|
||||
size_t nChildCount = GetChildCount();
|
||||
for (size_t i = 0; i < nChildCount; ++i)
|
||||
{
|
||||
const CBaseObject* pChild = GetChild(i);
|
||||
dc.DrawLine(pChild->GetParentAttachPointWorldTM().GetTranslation(), pChild->GetWorldPos(), pChild->IsFrozen() ? kLinkColorGray : kLinkColorParent, pChild->IsFrozen() ? kLinkColorGray : kLinkColorChild);
|
||||
@@ -1375,7 +1375,7 @@ bool CBaseObject::IsHiddenBySpec() const
|
||||
return false;
|
||||
}
|
||||
|
||||
return (m_nMinSpec != 0 && gSettings.editorConfigSpec != 0 && m_nMinSpec > gSettings.editorConfigSpec);
|
||||
return (m_nMinSpec != 0 && gSettings.editorConfigSpec != 0 && m_nMinSpec > static_cast<uint32>(gSettings.editorConfigSpec));
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -1893,7 +1893,7 @@ bool CBaseObject::HitTestRectBounds(HitContext& hc, const AABB& box)
|
||||
|
||||
std::vector<Vec3> convexHullForRegion1;
|
||||
ConvexHull2D(convexHullForRegion1, pointsForRegion1);
|
||||
nEdgeList1Count = convexHullForRegion1.size();
|
||||
nEdgeList1Count = static_cast<int>(convexHullForRegion1.size());
|
||||
if (nEdgeList1Count < 3 || nEdgeList1Count > kMaxSizeOfEdgeList1)
|
||||
{
|
||||
return true;
|
||||
@@ -2062,7 +2062,7 @@ void CBaseObject::GetAllChildren(TBaseObjects& outAllChildren, CBaseObject* pObj
|
||||
{
|
||||
const CBaseObject* pBaseObj = pObj ? pObj : this;
|
||||
|
||||
for (int i = 0, iChildCount(pBaseObj->GetChildCount()); i < iChildCount; ++i)
|
||||
for (size_t i = 0, iChildCount(pBaseObj->GetChildCount()); i < iChildCount; ++i)
|
||||
{
|
||||
CBaseObject* pChild = pBaseObj->GetChild(i);
|
||||
if (pChild == nullptr)
|
||||
@@ -2078,7 +2078,7 @@ void CBaseObject::GetAllChildren(DynArray< _smart_ptr<CBaseObject> >& outAllChil
|
||||
{
|
||||
const CBaseObject* pBaseObj = pObj ? pObj : this;
|
||||
|
||||
for (int i = 0, iChildCount(pBaseObj->GetChildCount()); i < iChildCount; ++i)
|
||||
for (size_t i = 0, iChildCount(pBaseObj->GetChildCount()); i < iChildCount; ++i)
|
||||
{
|
||||
CBaseObject* pChild = pBaseObj->GetChild(i);
|
||||
if (pChild == nullptr)
|
||||
@@ -2094,7 +2094,7 @@ void CBaseObject::GetAllChildren(CSelectionGroup& outAllChildren, CBaseObject* p
|
||||
{
|
||||
const CBaseObject* pBaseObj = pObj ? pObj : this;
|
||||
|
||||
for (int i = 0, iChildCount(pBaseObj->GetChildCount()); i < iChildCount; ++i)
|
||||
for (size_t i = 0, iChildCount(pBaseObj->GetChildCount()); i < iChildCount; ++i)
|
||||
{
|
||||
CBaseObject* pChild = pBaseObj->GetChild(i);
|
||||
if (pChild == nullptr)
|
||||
@@ -2114,7 +2114,7 @@ void CBaseObject::CloneChildren(CBaseObject* pFromObject)
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0, nChildCount(pFromObject->GetChildCount()); i < nChildCount; ++i)
|
||||
for (size_t i = 0, nChildCount(pFromObject->GetChildCount()); i < nChildCount; ++i)
|
||||
{
|
||||
CBaseObject* pFromChildObject = pFromObject->GetChild(i);
|
||||
|
||||
@@ -2729,7 +2729,7 @@ void CBaseObject::SetMinSpec(uint32 nSpec, bool bSetChildren)
|
||||
// Set min spec for all childs.
|
||||
if (bSetChildren)
|
||||
{
|
||||
for (int i = m_childs.size() - 1; i >= 0; --i)
|
||||
for (size_t i = m_childs.size() - 1; i >= 0; --i)
|
||||
{
|
||||
m_childs[i]->SetMinSpec(nSpec, true);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ protected:
|
||||
|
||||
void Undo([[maybe_unused]] bool bUndo) override
|
||||
{
|
||||
for (int i = 0, iLinkSize(m_Links.size()); i < iLinkSize; ++i)
|
||||
for (int i = 0, iLinkSize = static_cast<int>(m_Links.size()); i < iLinkSize; ++i)
|
||||
{
|
||||
SLink& link = m_Links[i];
|
||||
CBaseObject* pObj = GetIEditor()->GetObjectManager()->FindObject(link.entityID);
|
||||
@@ -1217,7 +1217,7 @@ XmlNodeRef CEntityObject::Export([[maybe_unused]] const QString& levelPath, XmlN
|
||||
if (!m_links.empty())
|
||||
{
|
||||
XmlNodeRef linksNode = objNode->newChild("EntityLinks");
|
||||
for (int i = 0, num = m_links.size(); i < num; i++)
|
||||
for (size_t i = 0, num = m_links.size(); i < num; i++)
|
||||
{
|
||||
if (m_links[i].target)
|
||||
{
|
||||
@@ -1368,8 +1368,8 @@ void CEntityObject::PostClone(CBaseObject* pFromObject, CObjectCloneContext& ctx
|
||||
// Clone event targets.
|
||||
if (!pFromEntity->m_eventTargets.empty())
|
||||
{
|
||||
int numTargets = pFromEntity->m_eventTargets.size();
|
||||
for (int i = 0; i < numTargets; i++)
|
||||
size_t numTargets = pFromEntity->m_eventTargets.size();
|
||||
for (size_t i = 0; i < numTargets; i++)
|
||||
{
|
||||
CEntityEventTarget& et = pFromEntity->m_eventTargets[i];
|
||||
CBaseObject* pClonedTarget = ctx.FindClone(et.target);
|
||||
@@ -1386,7 +1386,7 @@ void CEntityObject::PostClone(CBaseObject* pFromObject, CObjectCloneContext& ctx
|
||||
// Clone links.
|
||||
if (!pFromEntity->m_links.empty())
|
||||
{
|
||||
int numTargets = pFromEntity->m_links.size();
|
||||
int numTargets = static_cast<int>(pFromEntity->m_links.size());
|
||||
for (int i = 0; i < numTargets; i++)
|
||||
{
|
||||
CEntityLink& et = pFromEntity->m_links[i];
|
||||
@@ -1437,7 +1437,7 @@ void CEntityObject::RemoveAllEntityLinks()
|
||||
{
|
||||
while (!m_links.empty())
|
||||
{
|
||||
RemoveEntityLink(m_links.size() - 1);
|
||||
RemoveEntityLink(static_cast<int>(m_links.size() - 1));
|
||||
}
|
||||
m_links.clear();
|
||||
SetModified(false);
|
||||
@@ -1448,7 +1448,7 @@ void CEntityObject::ReleaseEventTargets()
|
||||
{
|
||||
while (!m_eventTargets.empty())
|
||||
{
|
||||
RemoveEventTarget(m_eventTargets.size() - 1, false);
|
||||
RemoveEventTarget(static_cast<int>(m_eventTargets.size() - 1), false);
|
||||
}
|
||||
m_eventTargets.clear();
|
||||
SetModified(false);
|
||||
@@ -1518,7 +1518,7 @@ void CEntityObject::SaveLink(XmlNodeRef xmlNode)
|
||||
}
|
||||
|
||||
XmlNodeRef linksNode = xmlNode->newChild("EntityLinks");
|
||||
for (int i = 0, num = m_links.size(); i < num; i++)
|
||||
for (size_t i = 0, num = m_links.size(); i < num; i++)
|
||||
{
|
||||
XmlNodeRef linkNode = linksNode->newChild("Link");
|
||||
linkNode->setAttr("TargetId", m_links[i].targetId);
|
||||
@@ -1534,7 +1534,7 @@ void CEntityObject::OnObjectEvent(CBaseObject* target, int event)
|
||||
if (event == CBaseObject::ON_DELETE)
|
||||
{
|
||||
// Find this target in events list and remove.
|
||||
int numTargets = m_eventTargets.size();
|
||||
int numTargets = static_cast<int>(m_eventTargets.size());
|
||||
for (int i = 0; i < numTargets; i++)
|
||||
{
|
||||
if (m_eventTargets[i].target == target)
|
||||
@@ -1547,7 +1547,7 @@ void CEntityObject::OnObjectEvent(CBaseObject* target, int event)
|
||||
}
|
||||
else if (event == CBaseObject::ON_PREDELETE)
|
||||
{
|
||||
int numTargets = m_links.size();
|
||||
int numTargets = static_cast<int>(m_links.size());
|
||||
for (int i = 0; i < numTargets; i++)
|
||||
{
|
||||
if (m_links[i].target == target)
|
||||
@@ -1589,7 +1589,7 @@ int CEntityObject::AddEventTarget(CBaseObject* target, const QString& event, con
|
||||
m_eventTargets.push_back(et);
|
||||
|
||||
SetModified(false);
|
||||
return m_eventTargets.size() - 1;
|
||||
return static_cast<int>(m_eventTargets.size() - 1);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -1659,13 +1659,13 @@ int CEntityObject::AddEntityLink(const QString& name, GUID targetEntityId)
|
||||
|
||||
SetModified(false);
|
||||
|
||||
return m_links.size() - 1;
|
||||
return static_cast<int>(m_links.size() - 1);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CEntityObject::EntityLinkExists(const QString& name, GUID targetEntityId)
|
||||
{
|
||||
for (int i = 0, num = m_links.size(); i < num; ++i)
|
||||
for (size_t i = 0, num = m_links.size(); i < num; ++i)
|
||||
{
|
||||
if (m_links[i].targetId == targetEntityId && name.compare(m_links[i].name, Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
|
||||
@@ -126,7 +126,7 @@ void CObjectArchive::ResolveObjects()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Serialize All Objects from XML.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
int numObj = m_loadedObjects.size();
|
||||
int numObj = static_cast<int>(m_loadedObjects.size());
|
||||
for (i = 0; i < numObj; i++)
|
||||
{
|
||||
if (m_bProgressBarEnabled)
|
||||
@@ -143,7 +143,7 @@ void CObjectArchive::ResolveObjects()
|
||||
m_pCurrentErrorReport->SetCurrentValidatorObject(nullptr);
|
||||
|
||||
// Objects can be added to the list here (from Groups).
|
||||
numObj = m_loadedObjects.size();
|
||||
numObj = static_cast<int>(m_loadedObjects.size());
|
||||
}
|
||||
m_pCurrentErrorReport->SetCurrentValidatorObject(nullptr);
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -221,7 +221,7 @@ void CObjectArchive::ResolveObjects()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Serialize All Objects from XML.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
int numObj = m_loadedObjects.size();
|
||||
int numObj = static_cast<int>(m_loadedObjects.size());
|
||||
for (i = 0; i < numObj; i++)
|
||||
{
|
||||
if (m_bProgressBarEnabled)
|
||||
@@ -246,7 +246,7 @@ void CObjectArchive::ResolveObjects()
|
||||
// Call PostLoad on all these objects.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
{
|
||||
int numObj = m_loadedObjects.size();
|
||||
int numObj = static_cast<int>(m_loadedObjects.size());
|
||||
for (i = 0; i < numObj; i++)
|
||||
{
|
||||
SLoadedObjectInfo& obj = m_loadedObjects[i];
|
||||
|
||||
@@ -746,7 +746,7 @@ void CObjectManager::ChangeObjectName(CBaseObject* obj, const QString& newName)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
int CObjectManager::GetObjectCount() const
|
||||
{
|
||||
return m_objects.size();
|
||||
return static_cast<int>(m_objects.size());
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -765,7 +765,7 @@ void CObjectManager::GetObjects(DynArray<CBaseObject*>& objects) const
|
||||
CBaseObjectsArray objectArray;
|
||||
GetObjects(objectArray);
|
||||
objects.clear();
|
||||
for (int i = 0, iCount(objectArray.size()); i < iCount; ++i)
|
||||
for (size_t i = 0, iCount(objectArray.size()); i < iCount; ++i)
|
||||
{
|
||||
objects.push_back(objectArray[i]);
|
||||
}
|
||||
@@ -1336,11 +1336,11 @@ void CObjectManager::FindDisplayableObjects(DisplayContext& dc, [[maybe_unused]]
|
||||
bbox.max.zero();
|
||||
|
||||
pDispayedViewObjects->ClearObjects();
|
||||
pDispayedViewObjects->Reserve(m_visibleObjects.size());
|
||||
pDispayedViewObjects->Reserve(static_cast<int>(m_visibleObjects.size()));
|
||||
|
||||
if (dc.flags & DISPLAY_2D)
|
||||
{
|
||||
int numVis = m_visibleObjects.size();
|
||||
int numVis = static_cast<int>(m_visibleObjects.size());
|
||||
for (int i = 0; i < numVis; i++)
|
||||
{
|
||||
CBaseObject* obj = m_visibleObjects[i];
|
||||
@@ -1374,7 +1374,7 @@ void CObjectManager::FindDisplayableObjects(DisplayContext& dc, [[maybe_unused]]
|
||||
pSelection->GetObject(0)->CBaseObject::DrawDimensions(dc, &mergedAABB);
|
||||
}
|
||||
|
||||
int numVis = m_visibleObjects.size();
|
||||
int numVis = static_cast<int>(m_visibleObjects.size());
|
||||
for (int i = 0; i < numVis; i++)
|
||||
{
|
||||
CBaseObject* obj = m_visibleObjects[i];
|
||||
@@ -2016,7 +2016,7 @@ void CObjectManager::GetClassCategories(QStringList& categories)
|
||||
}
|
||||
}
|
||||
categories.clear();
|
||||
categories.reserve(cset.size());
|
||||
categories.reserve(static_cast<int>(cset.size()));
|
||||
for (std::set<QString>::iterator cit = cset.begin(); cit != cset.end(); ++cit)
|
||||
{
|
||||
categories.push_back(*cit);
|
||||
@@ -2629,7 +2629,7 @@ void CObjectManager::EnteredComponentMode(const AZStd::vector<AZ::Uuid>& /*compo
|
||||
const size_t gizmoCount = static_cast<size_t>(gizmoManager->GetGizmoCount());
|
||||
for (size_t i = 0; i < gizmoCount; ++i)
|
||||
{
|
||||
gizmoManager->RemoveGizmo(gizmoManager->GetGizmoByIndex(i));
|
||||
gizmoManager->RemoveGizmo(gizmoManager->GetGizmoByIndex(static_cast<int>(i)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ bool CSelectionGroup::SameObjectType()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
int CSelectionGroup::GetCount() const
|
||||
{
|
||||
return m_objects.size();
|
||||
return static_cast<int>(m_objects.size());
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -632,7 +632,7 @@ void CSelectionGroup::IndicateSnappingVertex(DisplayContext& dc) const
|
||||
void CSelectionGroup::FinishChanges()
|
||||
{
|
||||
Objects selectedObjects(m_objects);
|
||||
int iObjectSize(selectedObjects.size());
|
||||
int iObjectSize = static_cast<int>(selectedObjects.size());
|
||||
for (int i = 0; i < iObjectSize; ++i)
|
||||
{
|
||||
CBaseObject* pObject = selectedObjects[i];
|
||||
|
||||
@@ -472,7 +472,7 @@ void AssetCatalogModel::LoadDatabase()
|
||||
{
|
||||
m_fileCacheCurrentIndex = 0;
|
||||
Q_EMIT UpdateProgress(0);
|
||||
Q_EMIT SetTotalProgress(m_fileCache.size());
|
||||
Q_EMIT SetTotalProgress(static_cast<int>(m_fileCache.size()));
|
||||
};
|
||||
|
||||
EBUS_EVENT(AZ::Data::AssetCatalogRequestBus, EnumerateAssets, startCB, enumerateCB, endCB);
|
||||
|
||||
+1
-1
@@ -262,7 +262,7 @@ QModelIndex ComponentDataModel::parent([[maybe_unused]] const QModelIndex &child
|
||||
|
||||
int ComponentDataModel::rowCount([[maybe_unused]] const QModelIndex &parent /*= QModelIndex()*/) const
|
||||
{
|
||||
return m_componentList.size();
|
||||
return static_cast<int>(m_componentList.size());
|
||||
}
|
||||
|
||||
int ComponentDataModel::columnCount([[maybe_unused]] const QModelIndex &parent /*= QModelIndex()*/) const
|
||||
|
||||
@@ -89,7 +89,7 @@ REFGUID CStdPreferencesClassDesc::ClassID()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
int CStdPreferencesClassDesc::GetPagesCount()
|
||||
{
|
||||
return m_pageCreators.size();
|
||||
return static_cast<int>(m_pageCreators.size());
|
||||
}
|
||||
|
||||
IPreferencesPage* CStdPreferencesClassDesc::CreateEditorPreferencesPage(int index)
|
||||
|
||||
@@ -184,7 +184,7 @@ bool QtViewPane::CloseInstance(QDockWidget* dockWidget, CloseModes closeModes)
|
||||
const int numTopLevel = topLevelWidgets.size();
|
||||
for (size_t i = 0; i < numTopLevel; ++i)
|
||||
{
|
||||
QWidget* widget = topLevelWidgets[i];
|
||||
QWidget* widget = topLevelWidgets[static_cast<int>(i)];
|
||||
if (widget->isModal() && widget->isVisible())
|
||||
{
|
||||
widget->activateWindow();
|
||||
|
||||
@@ -1061,7 +1061,7 @@ void SEditorSettings::ConvertPath(const AZStd::string_view sourcePath, AZStd::st
|
||||
// The reason for the difference is to have this API be consistent with the path syntax in Open 3D Engine Python APIs.
|
||||
|
||||
// Find the last pipe separator ("|") in the path
|
||||
int lastSeparator = sourcePath.find_last_of("|");
|
||||
size_t lastSeparator = sourcePath.find_last_of("|");
|
||||
|
||||
// Everything before the last separator is the category (since only the category is hierarchical)
|
||||
category = sourcePath.substr(0, lastSeparator);
|
||||
|
||||
@@ -237,7 +237,7 @@ CToolBoxMacro* CToolBoxManager::NewMacro(const QString& title, bool bToolbox, in
|
||||
{
|
||||
if (bToolbox)
|
||||
{
|
||||
const int macroCount = m_macros.size();
|
||||
const int macroCount = static_cast<int>(m_macros.size());
|
||||
if (macroCount > ID_TOOL_LAST - ID_TOOL_FIRST + 1)
|
||||
{
|
||||
return nullptr;
|
||||
@@ -261,7 +261,7 @@ CToolBoxMacro* CToolBoxManager::NewMacro(const QString& title, bool bToolbox, in
|
||||
}
|
||||
else
|
||||
{
|
||||
const int shelveMacroCount = m_shelveMacros.size();
|
||||
const int shelveMacroCount = static_cast<int>(m_shelveMacros.size());
|
||||
if (shelveMacroCount > ID_TOOL_SHELVE_LAST - ID_TOOL_SHELVE_FIRST + 1)
|
||||
{
|
||||
return nullptr;
|
||||
|
||||
@@ -503,7 +503,7 @@ void ToolbarManager::InitializeStandardToolbars()
|
||||
{
|
||||
auto macroToolbars = GetIEditor()->GetToolBoxManager()->GetToolbars();
|
||||
|
||||
m_standardToolbars.reserve(5 + macroToolbars.size());
|
||||
m_standardToolbars.reserve(static_cast<int>(5 + macroToolbars.size()));
|
||||
m_standardToolbars.push_back(GetEditModeToolbar());
|
||||
m_standardToolbars.push_back(GetObjectToolbar());
|
||||
m_standardToolbars.push_back(GetPlayConsoleToolbar());
|
||||
|
||||
@@ -840,7 +840,7 @@ void CToolsConfigPage::FillScriptCmds()
|
||||
{
|
||||
EditorPythonConsoleInterface::GlobalFunctionCollection globalFunctionCollection;
|
||||
editorPythonConsoleInterface->GetGlobalFunctionList(globalFunctionCollection);
|
||||
commands.reserve(globalFunctionCollection.size());
|
||||
commands.reserve(static_cast<int>(globalFunctionCollection.size()));
|
||||
for (const EditorPythonConsoleInterface::GlobalFunction& globalFunction : globalFunctionCollection)
|
||||
{
|
||||
const QString fullCmd = QString("%1.%2()").arg(globalFunction.m_moduleName.data()).arg(globalFunction.m_functionName.data());
|
||||
|
||||
@@ -122,7 +122,7 @@ void CCommentKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& sel
|
||||
|
||||
for (size_t keyIndex = 0, num = selectedKeys.GetKeyCount(); keyIndex < num; keyIndex++)
|
||||
{
|
||||
CTrackViewKeyHandle keyHandle = selectedKeys.GetKey(keyIndex);
|
||||
CTrackViewKeyHandle keyHandle = selectedKeys.GetKey(static_cast<unsigned int>(keyIndex));
|
||||
|
||||
CAnimParamType paramType = keyHandle.GetTrack()->GetParameterType();
|
||||
if (paramType == AnimParamType::CommentText)
|
||||
|
||||
@@ -128,7 +128,7 @@ void CScreenFaderKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle&
|
||||
|
||||
for (size_t keyIndex = 0, num = selectedKeys.GetKeyCount(); keyIndex < num; ++keyIndex)
|
||||
{
|
||||
CTrackViewKeyHandle selectedKey = selectedKeys.GetKey(keyIndex);
|
||||
CTrackViewKeyHandle selectedKey = selectedKeys.GetKey(static_cast<unsigned int>(keyIndex));
|
||||
|
||||
CAnimParamType paramType = selectedKey.GetTrack()->GetParameterType();
|
||||
if (paramType == AnimParamType::ScreenFader)
|
||||
|
||||
@@ -357,7 +357,7 @@ void CSequenceBatchRenderDialog::OnRenderItemSelChange()
|
||||
QString cvarsText;
|
||||
for (size_t i = 0; i < item.cvars.size(); ++i)
|
||||
{
|
||||
cvarsText += item.cvars[i];
|
||||
cvarsText += item.cvars[static_cast<int>(i)];
|
||||
cvarsText += "\r\n";
|
||||
}
|
||||
m_ui->m_cvarsEdit->setPlainText(cvarsText);
|
||||
@@ -894,7 +894,7 @@ void CSequenceBatchRenderDialog::CaptureItemStart()
|
||||
// Set up the custom config cvars for this item.
|
||||
for (size_t i = 0; i < renderItem.cvars.size(); ++i)
|
||||
{
|
||||
GetIEditor()->GetSystem()->GetIConsole()->ExecuteString(renderItem.cvars[i].toUtf8().data());
|
||||
GetIEditor()->GetSystem()->GetIConsole()->ExecuteString(renderItem.cvars[static_cast<int>(i)].toUtf8().data());
|
||||
}
|
||||
|
||||
// Set specific capture options for this item.
|
||||
@@ -1519,7 +1519,7 @@ void CSequenceBatchRenderDialog::OnSaveBatch()
|
||||
// cvars
|
||||
for (size_t k = 0; k < item.cvars.size(); ++k)
|
||||
{
|
||||
itemNode->newChild("cvar")->setContent(item.cvars[k].toUtf8().data());
|
||||
itemNode->newChild("cvar")->setContent(item.cvars[static_cast<int>(k)].toUtf8().data());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ bool CSequenceKeyUIControls::OnKeySelectionChange(CTrackViewKeyBundle& selectedK
|
||||
mv_sequence->AddEnumItem(QObject::tr("<None>"), CTrackViewDialog::GetEntityIdAsString(AZ::EntityId(AZ::EntityId::InvalidEntityId)));
|
||||
|
||||
const CTrackViewSequenceManager* pSequenceManager = GetIEditor()->GetSequenceManager();
|
||||
for (int i = 0; i < pSequenceManager->GetCount(); ++i)
|
||||
for (unsigned int i = 0; i < pSequenceManager->GetCount(); ++i)
|
||||
{
|
||||
CTrackViewSequence* pCurrentSequence = pSequenceManager->GetSequenceByIndex(i);
|
||||
bool bNotMe = pCurrentSequence != pSequence;
|
||||
|
||||
@@ -363,7 +363,7 @@ int TVEventsModel::GetNumberOfUsageAndFirstTimeUsed(const char* eventName, float
|
||||
{
|
||||
CTrackViewTrack* pTrack = tracks.GetTrack(currentTrack);
|
||||
|
||||
for (int currentKey = 0; currentKey < pTrack->GetKeyCount(); ++currentKey)
|
||||
for (unsigned int currentKey = 0; currentKey < pTrack->GetKeyCount(); ++currentKey)
|
||||
{
|
||||
CTrackViewKeyHandle keyHandle = pTrack->GetKey(currentKey);
|
||||
|
||||
|
||||
@@ -452,7 +452,7 @@ CTrackViewAnimNode* CTrackViewAnimNode::CreateSubNode(
|
||||
{
|
||||
// Check for a duplicates
|
||||
CTrackViewAnimNodeBundle azEntityNodesFound = director2->GetAnimNodesByType(AnimNodeType::AzEntity);
|
||||
for (int x = 0; x < azEntityNodesFound.GetCount(); x++)
|
||||
for (unsigned int x = 0; x < azEntityNodesFound.GetCount(); x++)
|
||||
{
|
||||
if (azEntityNodesFound.GetNode(x)->GetAzEntityId() == owner)
|
||||
{
|
||||
|
||||
@@ -145,7 +145,7 @@ void CTrackViewCurveEditor::UpdateSplines()
|
||||
std::set<CTrackViewTrack*> newTracks;
|
||||
if (selectedTracks.AreAllOfSameType())
|
||||
{
|
||||
for (int i = 0; i < selectedTracks.GetCount(); i++)
|
||||
for (unsigned int i = 0; i < selectedTracks.GetCount(); i++)
|
||||
{
|
||||
CTrackViewTrack* pTrack = selectedTracks.GetTrack(i);
|
||||
|
||||
|
||||
@@ -782,7 +782,7 @@ void CTrackViewDialog::UpdateActions()
|
||||
}
|
||||
|
||||
bool allSelectedTracksUseMute = true;
|
||||
for (int i = 0; i < selectedTrackCount; i++)
|
||||
for (unsigned int i = 0; i < selectedTrackCount; i++)
|
||||
{
|
||||
CTrackViewTrack* pTrack = selectedTracks.GetTrack(i);
|
||||
if (pTrack && !pTrack->UsesMute())
|
||||
@@ -1121,7 +1121,7 @@ void CTrackViewDialog::ReloadSequencesComboBox()
|
||||
CTrackViewSequenceManager* pSequenceManager = GetIEditor()->GetSequenceManager();
|
||||
const unsigned int numSequences = pSequenceManager->GetCount();
|
||||
|
||||
for (int k = 0; k < numSequences; ++k)
|
||||
for (unsigned int k = 0; k < numSequences; ++k)
|
||||
{
|
||||
CTrackViewSequence* sequence = pSequenceManager->GetSequenceByIndex(k);
|
||||
QString entityIdString = GetEntityIdAsString(sequence->GetSequenceComponentEntityId());
|
||||
@@ -1799,7 +1799,7 @@ void CTrackViewDialog::SaveMiscSettings() const
|
||||
settings.setValue(s_kFrameSnappingFPSEntry, fps);
|
||||
settings.setValue(s_kTickDisplayModeEntry, static_cast<int>(m_wndDopeSheet->GetTickDisplayMode()));
|
||||
settings.setValue(s_kDefaultTracksEntry, QByteArray(reinterpret_cast<const char*>(m_defaultTracksForEntityNode.data()),
|
||||
m_defaultTracksForEntityNode.size() * sizeof(AnimParamType)));
|
||||
static_cast<int>(m_defaultTracksForEntityNode.size() * sizeof(AnimParamType))));
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1028,12 +1028,12 @@ void CTrackViewDopeSheetBase::SelectAllKeysWithinTimeFrame(const QRect& rc, cons
|
||||
CTrackViewTrackBundle tracks = sequence->GetAllTracks();
|
||||
|
||||
CTrackViewSequenceNotificationContext context(sequence);
|
||||
for (int i = 0; i < tracks.GetCount(); ++i)
|
||||
for (unsigned int i = 0; i < tracks.GetCount(); ++i)
|
||||
{
|
||||
CTrackViewTrack* pTrack = tracks.GetTrack(i);
|
||||
|
||||
// Check which keys we intersect.
|
||||
for (int j = 0; j < pTrack->GetKeyCount(); j++)
|
||||
for (unsigned int j = 0; j < pTrack->GetKeyCount(); j++)
|
||||
{
|
||||
CTrackViewKeyHandle keyHandle = pTrack->GetKey(j);
|
||||
const float time = keyHandle.GetTime();
|
||||
@@ -1429,7 +1429,7 @@ bool CTrackViewDopeSheetBase::IsOkToAddKeyHere(const CTrackViewTrack* pTrack, fl
|
||||
{
|
||||
const float timeEpsilon = 0.05f;
|
||||
|
||||
for (int i = 0; i < pTrack->GetKeyCount(); ++i)
|
||||
for (unsigned int i = 0; i < pTrack->GetKeyCount(); ++i)
|
||||
{
|
||||
const CTrackViewKeyConstHandle& keyHandle = pTrack->GetKey(i);
|
||||
|
||||
@@ -1764,7 +1764,7 @@ float CTrackViewDopeSheetBase::MagnetSnap(float newTime, const CTrackViewAnimNod
|
||||
newTime = keys.GetKey(0).GetTime();
|
||||
// But if there is an in-range key in a sibling track, use it instead.
|
||||
// Here a 'sibling' means a track that belongs to a same node.
|
||||
for (int i = 0; i < keys.GetKeyCount(); ++i)
|
||||
for (unsigned int i = 0; i < keys.GetKeyCount(); ++i)
|
||||
{
|
||||
CTrackViewKeyHandle keyHandle = keys.GetKey(i);
|
||||
if (keyHandle.GetTrack()->GetAnimNode() == pNode)
|
||||
|
||||
@@ -86,7 +86,7 @@ void CTrackViewKeyHandle::SetTime(float time, bool notifyListeners)
|
||||
if (!m_pTrack->IsSortMarkerKey(m_keyIndex))
|
||||
{
|
||||
CTrackViewKeyBundle allKeys = m_pTrack->GetAllKeys();
|
||||
for (int x = 0; x < allKeys.GetKeyCount(); x++)
|
||||
for (unsigned int x = 0; x < allKeys.GetKeyCount(); x++)
|
||||
{
|
||||
unsigned int curIndex = allKeys.GetKey(x).GetIndex();
|
||||
if (m_pTrack->IsSortMarkerKey(curIndex))
|
||||
|
||||
@@ -2306,7 +2306,7 @@ bool CTrackViewNodesCtrl::FillAddTrackMenu(STrackMenuTreeNode& menuAddTrack, con
|
||||
&Maestro::EditorSequenceComponentRequestBus::Events::GetAllAnimatablePropertiesForComponent,
|
||||
animatableProperties, azEntityId, animNode->GetComponentId());
|
||||
|
||||
paramCount = animatableProperties.size();
|
||||
paramCount = static_cast<int>(animatableProperties.size());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace
|
||||
|
||||
AZStd::string PyTrackViewGetSequenceName(unsigned int index)
|
||||
{
|
||||
if (index < PyTrackViewGetNumSequences())
|
||||
if (static_cast<int>(index) < PyTrackViewGetNumSequences())
|
||||
{
|
||||
const CTrackViewSequenceManager* pSequenceManager = GetIEditor()->GetSequenceManager();
|
||||
return pSequenceManager->GetSequenceByIndex(index)->GetName();
|
||||
@@ -378,7 +378,7 @@ namespace
|
||||
}
|
||||
|
||||
CTrackViewAnimNodeBundle foundNodes = pParentDirector->GetAllAnimNodes();
|
||||
if (index < 0 || index >= foundNodes.GetCount())
|
||||
if (index < 0 || index >= static_cast<int>(foundNodes.GetCount()))
|
||||
{
|
||||
throw std::runtime_error("Invalid node index");
|
||||
}
|
||||
|
||||
@@ -455,7 +455,7 @@ void CTrackViewSequence::OnNodeChanged(CTrackViewNode* node, ITrackViewSequenceL
|
||||
|
||||
// Make sure to deselect any keys
|
||||
CTrackViewKeyBundle keys = node->GetAllKeys();
|
||||
for (int key = 0; key < keys.GetKeyCount(); key++)
|
||||
for (unsigned int key = 0; key < keys.GetKeyCount(); key++)
|
||||
{
|
||||
CTrackViewKeyHandle keyHandle = keys.GetKey(key);
|
||||
if (keyHandle.IsSelected())
|
||||
@@ -1249,7 +1249,7 @@ void CTrackViewSequence::DeselectAllKeys()
|
||||
CTrackViewSequenceNotificationContext context(this);
|
||||
|
||||
CTrackViewKeyBundle selectedKeys = GetSelectedKeys();
|
||||
for (int i = 0; i < selectedKeys.GetKeyCount(); ++i)
|
||||
for (unsigned int i = 0; i < selectedKeys.GetKeyCount(); ++i)
|
||||
{
|
||||
CTrackViewKeyHandle keyHandle = selectedKeys.GetKey(i);
|
||||
keyHandle.Select(false);
|
||||
|
||||
@@ -227,7 +227,7 @@ void CTrackViewSequenceManager::AddTrackViewSequence(CTrackViewSequence* sequenc
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
void CTrackViewSequenceManager::DeleteSequence(CTrackViewSequence* sequence)
|
||||
{
|
||||
const int numSequences = m_sequences.size();
|
||||
const int numSequences = static_cast<int>(m_sequences.size());
|
||||
for (int sequenceIndex = 0; sequenceIndex < numSequences; ++sequenceIndex)
|
||||
{
|
||||
if (m_sequences[sequenceIndex].get() == sequence)
|
||||
@@ -246,7 +246,7 @@ void CTrackViewSequenceManager::DeleteSequence(CTrackViewSequence* sequence)
|
||||
{
|
||||
AZ::ComponentTypeList requiredComponents;
|
||||
AzToolsFramework::EditorEntityContextRequestBus::BroadcastResult(requiredComponents, &AzToolsFramework::EditorEntityContextRequestBus::Events::GetRequiredComponentTypes);
|
||||
const int numComponentToDeleteEntity = requiredComponents.size() + 1;
|
||||
const int numComponentToDeleteEntity = static_cast<int>(requiredComponents.size() + 1);
|
||||
|
||||
AZ::Entity::ComponentArrayType entityComponents = entity->GetComponents();
|
||||
if (entityComponents.size() == numComponentToDeleteEntity)
|
||||
@@ -413,9 +413,9 @@ void CTrackViewSequenceManager::OnDataBaseItemEvent([[maybe_unused]] IDataBaseIt
|
||||
{
|
||||
if (event != EDataBaseItemEvent::EDB_ITEM_EVENT_ADD)
|
||||
{
|
||||
const uint numSequences = m_sequences.size();
|
||||
const size_t numSequences = m_sequences.size();
|
||||
|
||||
for (uint i = 0; i < numSequences; ++i)
|
||||
for (size_t i = 0; i < numSequences; ++i)
|
||||
{
|
||||
m_sequences[i]->UpdateDynamicParams();
|
||||
}
|
||||
|
||||
@@ -706,7 +706,7 @@ void CTrackViewSplineCtrl::mouseMoveEvent(QMouseEvent* event)
|
||||
QString tipText;
|
||||
bool boFoundTheSelectedKey(false);
|
||||
|
||||
for (int splineIndex = 0, endSpline = m_splines.size(); splineIndex < endSpline; ++splineIndex)
|
||||
for (size_t splineIndex = 0, endSpline = m_splines.size(); splineIndex < endSpline; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
CTrackViewTrack* pTrack = m_tracks[splineIndex];
|
||||
@@ -796,7 +796,7 @@ void CTrackViewSplineCtrl::AdjustTCB(float d_tension, float d_continuity, float
|
||||
|
||||
SendNotifyEvent(SPLN_BEFORE_CHANGE);
|
||||
|
||||
for (int splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
for (size_t splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
CTrackViewTrack* pTrack = m_tracks[splineIndex];
|
||||
@@ -892,7 +892,7 @@ void CTrackViewSplineCtrl::OnUserCommand(UINT cmd)
|
||||
|
||||
bool CTrackViewSplineCtrl::IsUnifiedKeyCurrentlySelected() const
|
||||
{
|
||||
for (int splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
for (size_t splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ CTrackViewTrack* CUndoComponentEntityTrackObject::FindTrack(CTrackViewSequence*
|
||||
|
||||
CTrackViewTrack* track = nullptr;
|
||||
CTrackViewTrackBundle allTracks = sequence->GetAllTracks();
|
||||
for (int trackIndex = 0; trackIndex < allTracks.GetCount(); trackIndex++)
|
||||
for (unsigned int trackIndex = 0; trackIndex < allTracks.GetCount(); trackIndex++)
|
||||
{
|
||||
CTrackViewTrack* curTrack = allTracks.GetTrack(trackIndex);
|
||||
if (curTrack->GetAnimNode() && curTrack->GetAnimNode()->GetComponentId() == m_trackComponentId)
|
||||
|
||||
@@ -78,7 +78,7 @@ void CTVNewSequenceDialog::OnOK()
|
||||
return;
|
||||
}
|
||||
|
||||
for (int k = 0; k < GetIEditor()->GetSequenceManager()->GetCount(); ++k)
|
||||
for (unsigned int k = 0; k < GetIEditor()->GetSequenceManager()->GetCount(); ++k)
|
||||
{
|
||||
CTrackViewSequence* pSequence = GetIEditor()->GetSequenceManager()->GetSequenceByIndex(k);
|
||||
QString fullname = pSequence->GetName();
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
}
|
||||
void Undo(bool bUndo) override
|
||||
{
|
||||
for (int i = m_undoSteps.size() - 1; i >= 0; i--)
|
||||
for (size_t i = m_undoSteps.size() - 1; i >= 0; i--)
|
||||
{
|
||||
m_undoSteps[i]->Undo(bUndo);
|
||||
}
|
||||
@@ -624,13 +624,13 @@ void CUndoManager::SuperCancel()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
int CUndoManager::GetUndoStackLen() const
|
||||
{
|
||||
return m_undoStack.size();
|
||||
return static_cast<int>(m_undoStack.size());
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
int CUndoManager::GetRedoStackLen() const
|
||||
{
|
||||
return m_redoStack.size();
|
||||
return static_cast<int>(m_redoStack.size());
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -817,7 +817,7 @@ void CUndoManager::SignalNumUndoRedoToListeners()
|
||||
{
|
||||
for (IUndoManagerListener* listener : m_listeners)
|
||||
{
|
||||
listener->SignalNumUndoRedo(m_undoStack.size(), m_redoStack.size());
|
||||
listener->SignalNumUndoRedo(static_cast<unsigned int>(m_undoStack.size()), static_cast<unsigned int>(m_redoStack.size()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
return m_stackNames.size();
|
||||
return static_cast<int>(m_stackNames.size());
|
||||
}
|
||||
|
||||
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override
|
||||
@@ -101,13 +101,13 @@ public:
|
||||
|
||||
if (fresh.size() < m_stackNames.size())
|
||||
{
|
||||
beginRemoveRows(createIndex(-1, -1), fresh.size(), m_stackNames.size() - 1);
|
||||
beginRemoveRows(createIndex(-1, -1), static_cast<int>(fresh.size()), static_cast<int>(m_stackNames.size() - 1));
|
||||
m_stackNames = fresh;
|
||||
endRemoveRows();
|
||||
}
|
||||
else
|
||||
{
|
||||
beginInsertRows(createIndex(-1, -1), m_stackNames.size(), fresh.size() - 1);
|
||||
beginInsertRows(createIndex(-1, -1), static_cast<int>(m_stackNames.size()), static_cast<int>(fresh.size() - 1));
|
||||
m_stackNames = fresh;
|
||||
endInsertRows();
|
||||
}
|
||||
|
||||
@@ -1228,7 +1228,7 @@ bool CFileUtil::CreatePath(const QString& strPath)
|
||||
nTotalPathQueueElements = cstrDirectoryQueue.size();
|
||||
for (nCurrentPathQueue = 0; nCurrentPathQueue < nTotalPathQueueElements; ++nCurrentPathQueue)
|
||||
{
|
||||
strCurrentDirectoryPath += cstrDirectoryQueue[nCurrentPathQueue];
|
||||
strCurrentDirectoryPath += cstrDirectoryQueue[static_cast<int>(nCurrentPathQueue)];
|
||||
strCurrentDirectoryPath += "\\";
|
||||
// The value which will go out of this loop is the result of the attempt to create the
|
||||
// last directory, only.
|
||||
@@ -1368,8 +1368,8 @@ IFileUtil::ECopyTreeResult CFileUtil::CopyTree(const QString& strSourceDirectory
|
||||
return eCopyResult;
|
||||
}
|
||||
|
||||
QString sourceName = sourceDir.absoluteFilePath(cFiles[nCurrent]);
|
||||
QString targetName = targetDir.absoluteFilePath(cFiles[nCurrent]);
|
||||
QString sourceName = sourceDir.absoluteFilePath(cFiles[static_cast<int>(nCurrent)]);
|
||||
QString targetName = targetDir.absoluteFilePath(cFiles[static_cast<int>(nCurrent)]);
|
||||
|
||||
if (boConfirmOverwrite)
|
||||
{
|
||||
@@ -1387,7 +1387,7 @@ IFileUtil::ECopyTreeResult CFileUtil::CopyTree(const QString& strSourceDirectory
|
||||
const int ret = QMessageBox::question(AzToolsFramework::GetActiveWindow(),
|
||||
QObject::tr("Confirm file overwrite?"),
|
||||
QObject::tr("There is already a file named \"%1\" in the target folder. Do you want to move this file anyway replacing the old one?")
|
||||
.arg(cFiles[nCurrent]),
|
||||
.arg(cFiles[static_cast<int>(nCurrent)]),
|
||||
QMessageBox::YesToAll | QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
|
||||
|
||||
switch (ret) {
|
||||
@@ -1448,8 +1448,8 @@ IFileUtil::ECopyTreeResult CFileUtil::CopyTree(const QString& strSourceDirectory
|
||||
|
||||
bool bnLastDirectoryWasCreated(false);
|
||||
|
||||
QString sourceName = sourceDir.absoluteFilePath(cDirectories[nCurrent]);
|
||||
QString targetName = targetDir.absoluteFilePath(cDirectories[nCurrent]);
|
||||
QString sourceName = sourceDir.absoluteFilePath(cDirectories[static_cast<int>(nCurrent)]);
|
||||
QString targetName = targetDir.absoluteFilePath(cDirectories[static_cast<int>(nCurrent)]);
|
||||
|
||||
bnLastDirectoryWasCreated = QDir().mkpath(targetName);
|
||||
|
||||
@@ -1473,7 +1473,7 @@ IFileUtil::ECopyTreeResult CFileUtil::CopyTree(const QString& strSourceDirectory
|
||||
const int ret = QMessageBox::question(AzToolsFramework::GetActiveWindow(),
|
||||
QObject::tr("Confirm directory overwrite?"),
|
||||
QObject::tr("There is already a folder named \"%1\" in the target folder. Do you want to move this folder anyway?")
|
||||
.arg(cDirectories[nCurrent]),
|
||||
.arg(cDirectories[static_cast<int>(nCurrent)]),
|
||||
QMessageBox::YesToAll | QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
|
||||
|
||||
switch (ret) {
|
||||
@@ -1742,8 +1742,8 @@ IFileUtil::ECopyTreeResult CFileUtil::MoveTree(const QString& strSourceDirecto
|
||||
}
|
||||
|
||||
bool bnLastFileWasCopied(false);
|
||||
QString sourceName(sourceDir.absoluteFilePath(cFiles[nCurrent]));
|
||||
QString targetName(targetDir.absoluteFilePath(cFiles[nCurrent]));
|
||||
QString sourceName(sourceDir.absoluteFilePath(cFiles[static_cast<int>(nCurrent)]));
|
||||
QString targetName(targetDir.absoluteFilePath(cFiles[static_cast<int>(nCurrent)]));
|
||||
|
||||
if (boConfirmOverwrite)
|
||||
{
|
||||
@@ -1761,7 +1761,7 @@ IFileUtil::ECopyTreeResult CFileUtil::MoveTree(const QString& strSourceDirecto
|
||||
const int ret = QMessageBox::question(AzToolsFramework::GetActiveWindow(),
|
||||
QObject::tr("Confirm file overwrite?"),
|
||||
QObject::tr("There is already a file named \"%1\" in the target folder. Do you want to move this file anyway replacing the old one?")
|
||||
.arg(cFiles[nCurrent]),
|
||||
.arg(cFiles[static_cast<int>(nCurrent)]),
|
||||
QMessageBox::YesToAll | QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
|
||||
|
||||
switch (ret) {
|
||||
@@ -1822,8 +1822,8 @@ IFileUtil::ECopyTreeResult CFileUtil::MoveTree(const QString& strSourceDirecto
|
||||
return eCopyResult;
|
||||
}
|
||||
|
||||
QString sourceName(sourceDir.absoluteFilePath(cDirectories[nCurrent]));
|
||||
QString targetName(targetDir.absoluteFilePath(cDirectories[nCurrent]));
|
||||
QString sourceName(sourceDir.absoluteFilePath(cDirectories[static_cast<int>(nCurrent)]));
|
||||
QString targetName(targetDir.absoluteFilePath(cDirectories[static_cast<int>(nCurrent)]));
|
||||
|
||||
bnLastDirectoryWasCreated = QDir().mkdir(targetName);
|
||||
|
||||
@@ -1847,7 +1847,7 @@ IFileUtil::ECopyTreeResult CFileUtil::MoveTree(const QString& strSourceDirecto
|
||||
const int ret = QMessageBox::question(AzToolsFramework::GetActiveWindow(),
|
||||
QObject::tr("Confirm directory overwrite?"),
|
||||
QObject::tr("There is already a folder named \"%1\" in the target folder. Do you want to move this folder anyway?")
|
||||
.arg(cDirectories[nCurrent]),
|
||||
.arg(cDirectories[static_cast<int>(nCurrent)]),
|
||||
QMessageBox::YesToAll | QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
|
||||
|
||||
switch (ret) {
|
||||
|
||||
@@ -55,9 +55,9 @@ bool CImageASC::Save(const QString& fileName, const CFloatImage& image)
|
||||
fprintf(file, fileHeader.c_str());
|
||||
|
||||
// Then print all the pixels.
|
||||
for (int y = 0; y < height; y++)
|
||||
for (uint32 y = 0; y < height; y++)
|
||||
{
|
||||
for (int x = 0; x < width; x++)
|
||||
for (uint32 x = 0; x < width; x++)
|
||||
{
|
||||
fprintf(file, "%.7f ", pixels[x + y * width]);
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ bool CImageGif::Load(const QString& fileName, CImageEx& outImage)
|
||||
CLogFile::FormatLine("File not found %s", fileName.toUtf8().data());
|
||||
return false;
|
||||
}
|
||||
long filesize = file.GetLength();
|
||||
long filesize = static_cast<long>(file.GetLength());
|
||||
|
||||
data.resize(filesize);
|
||||
uint8* ptr = &data[0];
|
||||
|
||||
@@ -119,7 +119,7 @@ bool CImageTIF::Load(const QString& fileName, CImageEx& outImage)
|
||||
|
||||
std::vector<uint8> data;
|
||||
|
||||
memImage.size = file.GetLength();
|
||||
memImage.size = static_cast<uint32>(file.GetLength());
|
||||
|
||||
data.resize(memImage.size);
|
||||
memImage.buffer = &data[0];
|
||||
@@ -210,7 +210,7 @@ bool CImageTIF::Load(const QString& fileName, CFloatImage& outImage)
|
||||
|
||||
std::vector<uint8> data;
|
||||
|
||||
memImage.size = file.GetLength();
|
||||
memImage.size = static_cast<int>(file.GetLength());
|
||||
|
||||
data.resize(memImage.size);
|
||||
memImage.buffer = &data[0];
|
||||
@@ -460,7 +460,7 @@ const char* CImageTIF::GetPreset(const QString& fileName)
|
||||
|
||||
MemImage memImage;
|
||||
|
||||
memImage.size = file.GetLength();
|
||||
memImage.size = static_cast<uint32>(file.GetLength());
|
||||
|
||||
data.resize(memImage.size);
|
||||
memImage.buffer = &data[0];
|
||||
|
||||
@@ -106,9 +106,9 @@ bool CImageUtil::SavePGM(const QString& fileName, const CImageEx& image)
|
||||
fprintf(file, fileHeader.c_str());
|
||||
|
||||
// Then print all the pixels.
|
||||
for (int32 y = 0; y < height; y++)
|
||||
for (uint32 y = 0; y < height; y++)
|
||||
{
|
||||
for (int32 x = 0; x < width; x++)
|
||||
for (uint32 x = 0; x < width; x++)
|
||||
{
|
||||
fprintf(file, "%d ", pixels[x + (y * width)]);
|
||||
}
|
||||
@@ -478,7 +478,7 @@ unsigned char CImageUtil::GetBilinearFilteredAt(const int iniX256, const int ini
|
||||
DWORD x = (DWORD)(iniX256) >> 8;
|
||||
DWORD y = (DWORD)(iniY256) >> 8;
|
||||
|
||||
if (x >= image.GetWidth() - 1 || y >= image.GetHeight() - 1)
|
||||
if (x >= static_cast<DWORD>(image.GetWidth() - 1) || y >= static_cast<DWORD>(image.GetHeight() - 1))
|
||||
{
|
||||
return image.ValueAt(x, y); // border is not filtered, 255 to get in range 0..1
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ bool SearchForBestSplitPos(CKDTree::ESplitAxis axis, const std::vector<CKDTree::
|
||||
|
||||
outBestSplitPos = 0;
|
||||
|
||||
int nSizeOfIndices(indices.size());
|
||||
int nSizeOfIndices = static_cast<int>(indices.size());
|
||||
|
||||
for (int i = 0; i < nSizeOfIndices; ++i)
|
||||
{
|
||||
@@ -329,7 +329,7 @@ bool CKDTree::Build(IStatObj* pStatObj)
|
||||
entireBoundBox.Reset();
|
||||
|
||||
std::vector<uint32> indices;
|
||||
for (int i = 0, iStatObjSize(m_StatObjectList.size()); i < iStatObjSize; ++i)
|
||||
for (int i = 0, iStatObjSize = static_cast<uint32>(m_StatObjectList.size()); i < iStatObjSize; ++i)
|
||||
{
|
||||
IIndexedMesh* pMesh = m_StatObjectList[i].pStatObj->GetIndexedMesh(true);
|
||||
if (pMesh == nullptr)
|
||||
|
||||
@@ -158,7 +158,7 @@ bool CNamedData::Serialize(CArchive& ar)
|
||||
{
|
||||
if (ar.IsStoring())
|
||||
{
|
||||
int iSize = m_blocks.size();
|
||||
int iSize = static_cast<int>(m_blocks.size());
|
||||
ar << iSize;
|
||||
|
||||
for (TBlocks::iterator it = m_blocks.begin(); it != m_blocks.end(); it++)
|
||||
@@ -286,7 +286,7 @@ bool CNamedData::Load(const QString& levelPath, [[maybe_unused]] CPakFile& pakFi
|
||||
CCryFile cfile;
|
||||
if (cfile.Open(Path::Make(levelPath, filename).toUtf8().data(), "rb"))
|
||||
{
|
||||
int fileSize = cfile.GetLength();
|
||||
int fileSize = static_cast<int>(cfile.GetLength());
|
||||
if (fileSize > 0)
|
||||
{
|
||||
QString key = Path::GetFileName(filename);
|
||||
@@ -307,7 +307,7 @@ bool CNamedData::Load(const QString& levelPath, [[maybe_unused]] CPakFile& pakFi
|
||||
CCryFile cfile;
|
||||
if (cfile.Open(Path::Make(levelPath, filename).toUtf8().data(), "rb"))
|
||||
{
|
||||
int fileSize = cfile.GetLength();
|
||||
int fileSize = static_cast<uint32>(cfile.GetLength());
|
||||
if (fileSize > 0)
|
||||
{
|
||||
// Read uncompressed data size.
|
||||
|
||||
@@ -511,7 +511,7 @@ CVarGlobalEnumList::CVarGlobalEnumList(const QString& enumName)
|
||||
//! Get the name of specified value in enumeration.
|
||||
QString CVarGlobalEnumList::GetItemName(uint index)
|
||||
{
|
||||
if (!m_pEnum || index >= m_pEnum->strings.size())
|
||||
if (!m_pEnum || index >= static_cast<uint>(m_pEnum->strings.size()))
|
||||
{
|
||||
return QString();
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ bool CXmlArchive::SaveToPak([[maybe_unused]] const QString& levelPath, CPakFile&
|
||||
|
||||
// Save xml file.
|
||||
QString xmlFilename = "Level.editor_xml";
|
||||
pakFile.UpdateFile(xmlFilename.toUtf8().data(), (void*)pXmlStrData->GetString(), pXmlStrData->GetStringLength());
|
||||
pakFile.UpdateFile(xmlFilename.toUtf8().data(), (void*)pXmlStrData->GetString(), static_cast<int>(pXmlStrData->GetStringLength()));
|
||||
|
||||
if (pakFile.GetArchive())
|
||||
{
|
||||
|
||||
@@ -189,7 +189,7 @@ bool CWipFeatureManager::Load(const char* pFilename, bool bClearExisting)
|
||||
for (size_t i = 0, iCount = root->getChildCount(); i < iCount; ++i)
|
||||
{
|
||||
SWipFeatureInfo wf;
|
||||
XmlNodeRef node = root->getChild(i);
|
||||
XmlNodeRef node = root->getChild(static_cast<int>(i));
|
||||
XmlString str;
|
||||
|
||||
node->getAttr("id", wf.m_id);
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
|
||||
int rowCount(const QModelIndex& parent = QModelIndex()) const override
|
||||
{
|
||||
return parent.isValid() ? 0 : CWipFeatureManager::Instance()->GetFeatures().size();
|
||||
return parent.isValid() ? 0 : static_cast<int>(CWipFeatureManager::Instance()->GetFeatures().size());
|
||||
}
|
||||
|
||||
int columnCount(const QModelIndex& parent = QModelIndex()) const override
|
||||
|
||||
Reference in New Issue
Block a user