Sandbox

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
pappeste
2021-06-18 16:36:30 -07:00
committed by Esteban Papp
parent f301c3b43a
commit 20a4ec9b7d
18 changed files with 31 additions and 31 deletions
+3 -3
View File
@@ -258,19 +258,19 @@ public:
m_relCameraRotX = 0;
m_relCameraRotZ = 0;
uint32 numSample6 = m_arrAnimatedCharacterPath.size();
uint32 numSample6 = static_cast<uint32>(m_arrAnimatedCharacterPath.size());
for (uint32 i = 0; i < numSample6; i++)
{
m_arrAnimatedCharacterPath[i] = Vec3(ZERO);
}
numSample6 = m_arrSmoothEntityPath.size();
numSample6 = static_cast<uint32>(m_arrSmoothEntityPath.size());
for (uint32 i = 0; i < numSample6; i++)
{
m_arrSmoothEntityPath[i] = Vec3(ZERO);
}
uint32 numSample7 = m_arrRunStrafeSmoothing.size();
uint32 numSample7 = static_cast<uint32>(m_arrRunStrafeSmoothing.size());
for (uint32 i = 0; i < numSample7; i++)
{
m_arrRunStrafeSmoothing[i] = 0;
+1 -1
View File
@@ -105,7 +105,7 @@ public:
bool IsEmpty() const;
//! Get number of contained error records.
int GetErrorCount() const { return m_errors.size(); };
int GetErrorCount() const { return static_cast<int>(m_errors.size()); };
//! Get access to indexed error record.
CErrorRecord& GetError(int i);
//! Clear all error records.
+5 -5
View File
@@ -74,12 +74,12 @@ void DisplayContext::DrawTri(const Vec3& p1, const Vec3& p2, const Vec3& p3)
void DisplayContext::DrawTriangles(const AZStd::vector<Vec3>& vertices, const ColorB& color)
{
pRenderAuxGeom->DrawTriangles(vertices.begin(), vertices.size(), color);
pRenderAuxGeom->DrawTriangles(vertices.begin(), static_cast<uint32>(vertices.size()), color);
}
void DisplayContext::DrawTrianglesIndexed(const AZStd::vector<Vec3>& vertices, const AZStd::vector<vtx_idx>& indices, const ColorB& color)
{
pRenderAuxGeom->DrawTriangles(vertices.begin(), vertices.size(), indices.begin(), indices.size(), color);
pRenderAuxGeom->DrawTriangles(vertices.begin(), static_cast<uint32>(vertices.size()), indices.begin(), static_cast<uint32_t>(indices.size()), color);
}
//////////////////////////////////////////////////////////////////////////
@@ -862,7 +862,7 @@ void DisplayContext::DrawLine(const Vec3& p1, const Vec3& p2, const QColor& rgb1
//////////////////////////////////////////////////////////////////////////
void DisplayContext::DrawLines(const AZStd::vector<Vec3>& points, const ColorF& color)
{
pRenderAuxGeom->DrawLines(points.begin(), points.size(), color, m_thickness);
pRenderAuxGeom->DrawLines(points.begin(), static_cast<uint32>(points.size()), color, m_thickness);
}
//////////////////////////////////////////////////////////////////////////
@@ -1287,8 +1287,8 @@ void DisplayContext::Flush2D()
uvs[3] = 0;
uvt[3] = 0;
int nLabels = m_textureLabels.size();
for (int i = 0; i < nLabels; i++)
const size_t nLabels = m_textureLabels.size();
for (size_t i = 0; i < nLabels; i++)
{
STextureLabel& t = m_textureLabels[i];
float w2 = t.w * 0.5f;
+2 -2
View File
@@ -163,7 +163,7 @@ public:
//////////////////////////////////////////////////////////////////////////
//! Return number of event targets of Script.
int GetEventTargetCount() const { return m_eventTargets.size(); };
int GetEventTargetCount() const { return static_cast<int>(m_eventTargets.size()); };
CEntityEventTarget& GetEventTarget(int index) { return m_eventTargets[index]; };
//! Add new event target, returns index of created event target.
//! Event targets are Always entities.
@@ -176,7 +176,7 @@ public:
// Entity Links.
//////////////////////////////////////////////////////////////////////////
//! Return number of event targets of Script.
int GetEntityLinkCount() const { return m_links.size(); };
int GetEntityLinkCount() const { return static_cast<int>(m_links.size()); };
CEntityLink& GetEntityLink(int index) { return m_links[index]; };
virtual int AddEntityLink(const QString& name, GUID targetEntityId);
virtual bool EntityLinkExists(const QString& name, GUID targetEntityId);
+1 -1
View File
@@ -70,7 +70,7 @@ AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING
CBaseObject* LoadObject(const XmlNodeRef& objNode, CBaseObject* pPrevObject = NULL);
//////////////////////////////////////////////////////////////////////////
int GetLoadedObjectsCount() { return m_loadedObjects.size(); }
int GetLoadedObjectsCount() { return static_cast<int>(m_loadedObjects.size()); }
CBaseObject* GetLoadedObject(int nIndex) const { return m_loadedObjects[nIndex].pObject; }
//! If true new loaded objects will be assigned new GUIDs.
+1 -1
View File
@@ -58,7 +58,7 @@ public:
class CBaseObjectsCache
{
public:
int GetObjectCount() const { return m_objects.size(); }
int GetObjectCount() const { return static_cast<int>(m_objects.size()); }
CBaseObject* GetObject(int nIndex) const { return m_objects[nIndex]; }
void AddObject(CBaseObject* object);
+1 -1
View File
@@ -71,7 +71,7 @@ public:
//! And save resulting objects to saveTo selection.
void FilterParents();
//! Get number of child filtered objects.
int GetFilteredCount() const { return m_filtered.size(); }
int GetFilteredCount() const { return static_cast<int>(m_filtered.size()); }
CBaseObject* GetFilteredObject(int i) const { return m_filtered[i]; }
//////////////////////////////////////////////////////////////////////////
@@ -53,7 +53,7 @@ namespace PerforceConnection
setEnabled(false);
int numSettingsToGet = m_retrievedSettings.size();
int numSettingsToGet = static_cast<int>(m_retrievedSettings.size());
auto applySettingResultFunction = [this, &numSettingsToGet](AZStd::string setting, const SourceControlSettingInfo& info) -> void
{
@@ -546,7 +546,7 @@ bool CAxisHelper::HitTestForRotationCircle(const Matrix34& worldTM, IDisplayView
Vec3 vShortestHitPos;
float shortestDist = 3e11f;
for (int i = 0, iCount(vList.size()); i < iCount; ++i)
for (int i = 0, iCount(static_cast<int>(vList.size())); i < iCount; ++i)
{
const Vec3& v0 = vList[i];
const Vec3& v1 = vList[(i + 1) % iCount];
+3 -3
View File
@@ -2342,7 +2342,7 @@ bool CRenderViewport::AddCameraMenuItems(QMenu* menu)
AZ::EBusAggregateResults<AZ::EntityId> getCameraResults;
Camera::CameraBus::BroadcastResult(getCameraResults, &Camera::CameraRequests::GetCameras);
const int numCameras = getCameraResults.values.size();
const int numCameras = static_cast<int>(getCameraResults.values.size());
// only enable if we're editing a sequence in Track View and have cameras in the level
bool enableSequenceCameraMenu = (GetIEditor()->GetAnimation()->GetSequence() && numCameras);
@@ -2354,7 +2354,7 @@ bool CRenderViewport::AddCameraMenuItems(QMenu* menu)
connect(action, &QAction::triggered, this, &CRenderViewport::SetSequenceCamera);
QVector<QAction*> additionalCameras;
additionalCameras.reserve(getCameraResults.values.size());
additionalCameras.reserve(static_cast<int>(getCameraResults.values.size()));
for (const AZ::EntityId& entityId : getCameraResults.values)
{
@@ -2930,7 +2930,7 @@ void CRenderViewport::RenderSelectedRegion()
// Draw volume
dc.DepthWriteOff();
dc.CullOff();
dc.pRenderAuxGeom->DrawTriangles(&verts[0], verts.size(), &inds[0], numInds, &colors[0]);
dc.pRenderAuxGeom->DrawTriangles(&verts[0], static_cast<uint32>(verts.size()), &inds[0], numInds, &colors[0]);
dc.CullOn();
dc.DepthWriteOn();
}
+3 -3
View File
@@ -275,19 +275,19 @@ public:
m_relCameraRotX = 0;
m_relCameraRotZ = 0;
uint32 numSample6 = m_arrAnimatedCharacterPath.size();
uint32 numSample6 = static_cast<uint32>(m_arrAnimatedCharacterPath.size());
for (uint32 i = 0; i < numSample6; i++)
{
m_arrAnimatedCharacterPath[i] = Vec3(ZERO);
}
numSample6 = m_arrSmoothEntityPath.size();
numSample6 = static_cast<uint32>(m_arrSmoothEntityPath.size());
for (uint32 i = 0; i < numSample6; i++)
{
m_arrSmoothEntityPath[i] = Vec3(ZERO);
}
uint32 numSample7 = m_arrRunStrafeSmoothing.size();
uint32 numSample7 = static_cast<uint32>(m_arrRunStrafeSmoothing.size());
for (uint32 i = 0; i < numSample7; i++)
{
m_arrRunStrafeSmoothing[i] = 0;
+1 -1
View File
@@ -27,7 +27,7 @@ class QWidget;
class CTrackViewAnimNodeBundle
{
public:
unsigned int GetCount() const { return m_animNodes.size(); }
unsigned int GetCount() const { return static_cast<unsigned int>(m_animNodes.size()); }
CTrackViewAnimNode* GetNode(const unsigned int index) { return m_animNodes[index]; }
const CTrackViewAnimNode* GetNode(const unsigned int index) const { return m_animNodes[index]; }
+2 -2
View File
@@ -123,7 +123,7 @@ public:
virtual bool AreAllKeysOfSameType() const override { return m_bAllOfSameType; }
virtual unsigned int GetKeyCount() const override { return m_keys.size(); }
virtual unsigned int GetKeyCount() const override { return static_cast<unsigned int>(m_keys.size()); }
virtual CTrackViewKeyHandle GetKey(unsigned int index) override { return m_keys[index]; }
virtual void SelectKeys(const bool bSelected) override;
@@ -174,7 +174,7 @@ public:
CTrackViewNode* GetParentNode() const { return m_pParentNode; }
// Children
unsigned int GetChildCount() const { return m_childNodes.size(); }
unsigned int GetChildCount() const { return static_cast<unsigned int>(m_childNodes.size()); }
CTrackViewNode* GetChild(unsigned int index) const { return m_childNodes[index].get(); }
// Snap time value to prev/next key in sequence
@@ -29,7 +29,7 @@ public:
virtual void OnEditorNotifyEvent(EEditorNotifyEvent event);
unsigned int GetCount() const { return m_sequences.size(); }
unsigned int GetCount() const { return static_cast<int>(m_sequences.size()); }
void CreateSequence(QString name, SequenceType sequenceType);
void DeleteSequence(CTrackViewSequence* pSequence);
+1 -1
View File
@@ -27,7 +27,7 @@ public:
: m_bAllOfSameType(true)
, m_bHasRotationTrack(false) {}
unsigned int GetCount() const { return m_tracks.size(); }
unsigned int GetCount() const { return static_cast<unsigned int>(m_tracks.size()); }
CTrackViewTrack* GetTrack(const unsigned int index) { return m_tracks[index]; }
const CTrackViewTrack* GetTrack(const unsigned int index) const { return m_tracks[index]; }
+2 -2
View File
@@ -61,12 +61,12 @@ public:
// Confetti: Get the size of m_undoObjects
virtual int GetCount() const
{
return m_undoObjects.size();
return static_cast<int>(m_undoObjects.size());
}
virtual bool IsEmpty() const { return m_undoObjects.empty(); };
virtual void Undo(bool bUndo)
{
for (int i = m_undoObjects.size() - 1; i >= 0; i--)
for (int i = static_cast<int>(m_undoObjects.size() - 1); i >= 0; i--)
{
m_undoObjects[i]->Undo(bUndo);
}
+1 -1
View File
@@ -86,7 +86,7 @@ public:
//////////////////////////////////////////////////////////////////////////
//! Get number of currently existing viewports.
virtual int GetViewCount() { return m_viewports.size(); };
virtual int GetViewCount() { return static_cast<int>(m_viewports.size()); };
//! Get viewport by index.
//! @param index 0 <= index < GetViewportCount()
virtual CViewport* GetView(int index) { return m_viewports[index]; }
+1 -1
View File
@@ -843,7 +843,7 @@ namespace Unicode
{
const size_t offset = Append ? out.size() : 0;
length += offset;
out.resize(length); // resize() can't fail without exceptions, so assert instead.
out.resize(static_cast<int>(length)); // resize() can't fail without exceptions, so assert instead.
assert((out.size() == length) && "Buffer resize failed (out-of-memory?)");
const CharType* base = length ? out.data() : 0;
ptr = const_cast<CharType*>(base + offset);