Merge branch 'development' into lawalfua/atomToolsMainWindow
This commit is contained in:
@@ -122,7 +122,7 @@ protected:
|
||||
|
||||
public:
|
||||
//! Get number of child nodes.
|
||||
int GetChildCount() const { return m_childs.size(); };
|
||||
int GetChildCount() const { return static_cast<int>(m_childs.size()); };
|
||||
//! Get Child by id.
|
||||
ReflectedPropertyItem* GetChild(int index) const { return m_childs[index]; }
|
||||
PropertyType GetType() const { return m_type; }
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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]; }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -803,7 +803,7 @@ void SandboxIntegrationManager::SetupLayerContextMenu(QMenu* menu)
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
const int selectedLayerCount = layersInSelection.size();
|
||||
const int selectedLayerCount = static_cast<int>(layersInSelection.size());
|
||||
QString saveTitle = QObject::tr("Save layer");
|
||||
if(selectedLayerCount > 1)
|
||||
{
|
||||
|
||||
@@ -259,7 +259,7 @@ QVariant OutlinerListModel::dataForName(const QModelIndex& index, int role) cons
|
||||
if (highlightTextIndex >= 0)
|
||||
{
|
||||
const QString BACKGROUND_COLOR{ "#707070" };
|
||||
label.insert(highlightTextIndex + m_filterString.length(), "</span>");
|
||||
label.insert(static_cast<int>(highlightTextIndex + m_filterString.length()), "</span>");
|
||||
label.insert(highlightTextIndex, "<span style=\"background-color: " + BACKGROUND_COLOR + "\">");
|
||||
}
|
||||
} while(highlightTextIndex > 0);
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1088,7 +1088,7 @@ void SEditorSettings::ConvertPath(const AZStd::string_view sourcePath, AZStd::st
|
||||
|
||||
AzToolsFramework::EditorSettingsAPIRequests::SettingOutcome SEditorSettings::GetValue(const AZStd::string_view path)
|
||||
{
|
||||
if (path.find("|") < 0)
|
||||
if (path.find("|") == AZStd::string_view::npos)
|
||||
{
|
||||
return { AZStd::string("Invalid Path - could not find separator \"|\"") };
|
||||
}
|
||||
@@ -1106,7 +1106,7 @@ AzToolsFramework::EditorSettingsAPIRequests::SettingOutcome SEditorSettings::Get
|
||||
|
||||
AzToolsFramework::EditorSettingsAPIRequests::SettingOutcome SEditorSettings::SetValue(const AZStd::string_view path, const AZStd::any& value)
|
||||
{
|
||||
if (path.find("|") < 0)
|
||||
if (path.find("|") == AZStd::string_view::npos)
|
||||
{
|
||||
return { AZStd::string("Invalid Path - could not find separator \"|\"") };
|
||||
}
|
||||
|
||||
@@ -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]; }
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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]; }
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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]; }
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace AZ
|
||||
}
|
||||
|
||||
auto stackEntry = AZStd::make_shared<BlockCache>(
|
||||
cacheSize, blockSize, aznumeric_caster(hardware.m_maxPhysicalSectorSize), false);
|
||||
cacheSize, aznumeric_cast<AZ::u32>(blockSize), aznumeric_cast<AZ::u32>(hardware.m_maxPhysicalSectorSize), false);
|
||||
stackEntry->SetNext(AZStd::move(parent));
|
||||
return stackEntry;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace AZ
|
||||
}
|
||||
|
||||
auto stackEntry = AZStd::make_shared<DedicatedCache>(
|
||||
cacheSize, blockSize, aznumeric_caster(hardware.m_maxPhysicalSectorSize), m_writeOnlyEpilog);
|
||||
cacheSize, aznumeric_cast<AZ::u32>(blockSize), aznumeric_cast<AZ::u32>(hardware.m_maxPhysicalSectorSize), m_writeOnlyEpilog);
|
||||
stackEntry->SetNext(AZStd::move(parent));
|
||||
return stackEntry;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace AZ
|
||||
static Aabb CreateCenterRadius(const Vector3& center, float radius);
|
||||
|
||||
//! Creates an AABB which contains the specified points.
|
||||
static Aabb CreatePoints(const Vector3* pts, int numPts);
|
||||
static Aabb CreatePoints(const Vector3* pts, size_t numPts);
|
||||
|
||||
//! Creates an AABB which contains the specified OBB.
|
||||
static Aabb CreateFromObb(const Obb& obb);
|
||||
|
||||
@@ -60,10 +60,10 @@ namespace AZ
|
||||
}
|
||||
|
||||
|
||||
AZ_MATH_INLINE Aabb Aabb::CreatePoints(const Vector3* pts, int numPts)
|
||||
AZ_MATH_INLINE Aabb Aabb::CreatePoints(const Vector3* pts, size_t numPts)
|
||||
{
|
||||
Aabb aabb = Aabb::CreateFromPoint(pts[0]);
|
||||
for (int i = 1; i < numPts; ++i)
|
||||
for (size_t i = 1; i < numPts; ++i)
|
||||
{
|
||||
aabb.AddPoint(pts[i]);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <AzCore/Memory/OSAllocator.h>
|
||||
#include <AzCore/std/containers/unordered_map.h>
|
||||
#include <AzCore/Math/Crc.h>
|
||||
#include <AzCore/std/parallel/scoped_lock.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
@@ -75,6 +76,42 @@ namespace AZ
|
||||
bool operator==(const OSStdAllocator& a, const OSStdAllocator& b) { (void)a; (void)b; return true; }
|
||||
bool operator!=(const OSStdAllocator& a, const OSStdAllocator& b) { (void)a; (void)b; return false; }
|
||||
|
||||
void EnvironmentVariableHolderBase::UnregisterAndDestroy(DestructFunc destruct, bool moduleRelease)
|
||||
{
|
||||
const bool releaseByUseCount = (--m_useCount == 0);
|
||||
// We take over the lock, and release it before potentially destroying/freeing ourselves
|
||||
{
|
||||
AZStd::scoped_lock envLockHolder(AZStd::adopt_lock, m_mutex);
|
||||
const bool releaseByModule = (moduleRelease && !m_canTransferOwnership && m_moduleOwner == AZ::Environment::GetModuleId());
|
||||
|
||||
if (!releaseByModule && !releaseByUseCount)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// if the environment that created us is gone the owner can be null
|
||||
// which means (assuming intermodule allocator) that the variable is still alive
|
||||
// but can't be found as it's not part of any environment.
|
||||
if (m_environmentOwner)
|
||||
{
|
||||
m_environmentOwner->RemoveVariable(m_guid);
|
||||
m_environmentOwner = nullptr;
|
||||
}
|
||||
if (m_isConstructed)
|
||||
{
|
||||
destruct(this, DestroyTarget::Member); // destruct the value
|
||||
}
|
||||
}
|
||||
// m_mutex is no longer held here, envLockHolder has released it above.
|
||||
if (releaseByUseCount)
|
||||
{
|
||||
// m_mutex is unlocked before this is deleted
|
||||
Environment::AllocatorInterface* allocator = m_allocator;
|
||||
// Call child class dtor and clear the memory
|
||||
destruct(this, DestroyTarget::Self);
|
||||
allocator->DeAllocate(this);
|
||||
}
|
||||
}
|
||||
|
||||
// instance of the environment
|
||||
EnvironmentInterface* EnvironmentInterface::s_environment = nullptr;
|
||||
|
||||
@@ -110,7 +147,7 @@ namespace AZ
|
||||
#ifdef AZ_ENVIRONMENT_VALIDATE_ON_EXIT
|
||||
AZ_Assert(m_numAttached == 0, "We should not delete an environment while there are %d modules attached! Unload all DLLs first!", m_numAttached);
|
||||
#endif
|
||||
|
||||
|
||||
for (auto variableIt : m_variableMap)
|
||||
{
|
||||
EnvironmentVariableHolderBase* holder = reinterpret_cast<EnvironmentVariableHolderBase*>(variableIt.second);
|
||||
|
||||
@@ -200,6 +200,11 @@ namespace AZ
|
||||
class EnvironmentVariableHolderBase
|
||||
{
|
||||
friend class EnvironmentImpl;
|
||||
protected:
|
||||
enum class DestroyTarget {
|
||||
Member,
|
||||
Self
|
||||
};
|
||||
public:
|
||||
EnvironmentVariableHolderBase(u32 guid, AZ::Internal::EnvironmentInterface* environmentOwner, bool canOwnershipTransfer, Environment::AllocatorInterface* allocator)
|
||||
: m_environmentOwner(environmentOwner)
|
||||
@@ -217,12 +222,21 @@ namespace AZ
|
||||
return m_isConstructed;
|
||||
}
|
||||
|
||||
bool IsOwner() const
|
||||
{
|
||||
return m_moduleOwner == Environment::GetModuleId();
|
||||
}
|
||||
|
||||
u32 GetId() const
|
||||
{
|
||||
return m_guid;
|
||||
}
|
||||
|
||||
protected:
|
||||
using DestructFunc = void (*)(EnvironmentVariableHolderBase *, DestroyTarget);
|
||||
// Assumes the m_mutex is already locked.
|
||||
// On return m_mutex is in an unlocked state.
|
||||
void UnregisterAndDestroy(DestructFunc destruct, bool moduleRelease);
|
||||
|
||||
AZ::Internal::EnvironmentInterface* m_environmentOwner; ///< Used to know which environment we should use to free the variable if we can't transfer ownership
|
||||
void* m_moduleOwner; ///< Used when the variable can't transfered across module and we need to destruct the variable when the module is going away
|
||||
bool m_canTransferOwnership; ///< True if variable can be allocated in one module and freed in other. Usually true for POD types when they share allocator.
|
||||
@@ -242,41 +256,29 @@ namespace AZ
|
||||
memset(&m_value, 0, sizeof(T));
|
||||
}
|
||||
|
||||
template <class... Args>
|
||||
template<class... Args>
|
||||
void ConstructImpl(const AZStd::false_type& /* AZStd::has_trivial_constructor<T> */, Args&&... args)
|
||||
{
|
||||
// Construction of non-trivial types is left up to the type's constructor.
|
||||
new(&m_value) T(AZStd::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
void DestructImpl(const AZStd::true_type& /* AZStd::is_trivially_destructible<T> */)
|
||||
static void DestructDispatchNoLock(EnvironmentVariableHolderBase *base, DestroyTarget selfDestruct)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void DestructImpl(const AZStd::false_type& /* AZStd::is_trivially_destructible<T> */)
|
||||
{
|
||||
reinterpret_cast<T*>(&m_value)->~T();
|
||||
}
|
||||
|
||||
// Assumes the lock is already held
|
||||
void UnregisterAndDestruct()
|
||||
{
|
||||
// if the environment that created us is gone the owner can be null
|
||||
// which means (assuming intermodule allocator) that the variable is still alive
|
||||
// but can't be found as it's not part of any environment.
|
||||
if (m_environmentOwner)
|
||||
auto *self = reinterpret_cast<EnvironmentVariableHolder *>(base);
|
||||
if (selfDestruct == DestroyTarget::Self)
|
||||
{
|
||||
m_environmentOwner->RemoveVariable(m_guid);
|
||||
m_environmentOwner = nullptr;
|
||||
self->~EnvironmentVariableHolder();
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_isConstructed)
|
||||
AZ_Assert(self->m_isConstructed, "Variable is not constructed. Please check your logic and guard if needed!");
|
||||
self->m_isConstructed = false;
|
||||
self->m_moduleOwner = nullptr;
|
||||
if constexpr(!AZStd::is_trivially_destructible_v<T>)
|
||||
{
|
||||
DestructNoLock();
|
||||
reinterpret_cast<T*>(&self->m_value)->~T();
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
EnvironmentVariableHolder(u32 guid, bool isOwnershipTransfer, Environment::AllocatorInterface* allocator)
|
||||
: EnvironmentVariableHolderBase(guid, Environment::GetInstance(), isOwnershipTransfer, allocator)
|
||||
@@ -287,12 +289,6 @@ namespace AZ
|
||||
{
|
||||
AZ_Assert(!m_isConstructed, "To get the destructor we should have already destructed the variable!");
|
||||
}
|
||||
|
||||
bool IsOwner() const
|
||||
{
|
||||
return m_moduleOwner == Environment::GetModuleId();
|
||||
}
|
||||
|
||||
void AddRef()
|
||||
{
|
||||
AZStd::lock_guard<AZStd::spin_mutex> lock(m_mutex);
|
||||
@@ -303,30 +299,8 @@ namespace AZ
|
||||
void Release()
|
||||
{
|
||||
m_mutex.lock();
|
||||
|
||||
if (--s_moduleUseCount == 0)
|
||||
{
|
||||
if (!m_canTransferOwnership && m_moduleOwner == AZ::Environment::GetModuleId())
|
||||
{
|
||||
UnregisterAndDestruct();
|
||||
}
|
||||
}
|
||||
|
||||
if (--m_useCount == 0)
|
||||
{
|
||||
UnregisterAndDestruct();
|
||||
|
||||
// unlock before this is deleted
|
||||
m_mutex.unlock();
|
||||
|
||||
Environment::AllocatorInterface* allocator = m_allocator;
|
||||
// Call dtor and clear the memory
|
||||
this->~EnvironmentVariableHolder();
|
||||
allocator->DeAllocate(this);
|
||||
return;
|
||||
}
|
||||
|
||||
m_mutex.unlock();
|
||||
const bool moduleRelease = (--s_moduleUseCount == 0);
|
||||
UnregisterAndDestroy(DestructDispatchNoLock, moduleRelease);
|
||||
}
|
||||
|
||||
void Construct()
|
||||
@@ -352,18 +326,10 @@ namespace AZ
|
||||
}
|
||||
}
|
||||
|
||||
void DestructNoLock()
|
||||
{
|
||||
AZ_Assert(m_isConstructed, "Variable is not constructed. Please check your logic and guard if needed!");
|
||||
m_isConstructed = false;
|
||||
m_moduleOwner = nullptr;
|
||||
DestructImpl(typename AZStd::is_trivially_destructible<T>::type());
|
||||
}
|
||||
|
||||
void Destruct()
|
||||
{
|
||||
AZStd::lock_guard<AZStd::spin_mutex> lock(m_mutex);
|
||||
DestructNoLock();
|
||||
DestructDispatchNoLock(this, DestroyTarget::Member);
|
||||
}
|
||||
|
||||
// variable storage
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace AZ
|
||||
if (context.ShouldKeepDefaults() || !defaultValue || (valAsByteStream != *static_cast<const JsonByteStream*>(defaultValue)))
|
||||
{
|
||||
const auto base64ByteStream = AZ::StringFunc::Base64::Encode(valAsByteStream.data(), valAsByteStream.size());
|
||||
outputValue.SetString(base64ByteStream.c_str(), base64ByteStream.size(), context.GetJsonAllocator());
|
||||
outputValue.SetString(base64ByteStream.c_str(), static_cast<rapidjson::SizeType>(base64ByteStream.size()), context.GetJsonAllocator());
|
||||
return context.Report(Tasks::WriteValue, Outcomes::Success, "ByteStream successfully stored.");
|
||||
}
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ namespace AZStd
|
||||
// 20.9.3.2, observer:
|
||||
constexpr rep count() const { return m_rep; }
|
||||
// 20.9.3.3, arithmetic:
|
||||
constexpr duration operator+() const { *this; }
|
||||
constexpr duration operator+() const { return *this; }
|
||||
constexpr duration operator-() const { return duration(-m_rep); }
|
||||
constexpr duration& operator++() { ++m_rep; return *this; }
|
||||
constexpr duration operator++(int) { return duration(m_rep++); }
|
||||
|
||||
@@ -1056,7 +1056,7 @@ namespace AZStd
|
||||
inline void insert(const iterator& pos, ForwardIterator first, ForwardIterator last, const AZStd::forward_iterator_tag&)
|
||||
{
|
||||
size_type size = AZStd::distance(first, last);
|
||||
AZSTD_CONTAINER_ASSERT(size >= 0, "AZStd::ring_buffer::insert - there are no elements to insert!");
|
||||
AZSTD_CONTAINER_ASSERT(first > last, "AZStd::ring_buffer::insert - there are no elements to insert!");
|
||||
if (size == 0)
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -294,7 +294,7 @@ namespace AZStd
|
||||
T& m_v;
|
||||
constexpr addr_impl_ref(T& v)
|
||||
: m_v(v) {}
|
||||
constexpr addr_impl_ref& operator=(const addr_impl_ref& v) { m_v = v; }
|
||||
constexpr addr_impl_ref& operator=(const addr_impl_ref& v) { m_v = v; return *this; }
|
||||
constexpr operator T& () const { return m_v; }
|
||||
};
|
||||
|
||||
|
||||
@@ -163,7 +163,11 @@ namespace AzFramework
|
||||
AZ_TracePrintfOnce("AssetSystemComponent", "Failed to find asset platform, setting 'pc'\n");
|
||||
outputConnectionSettings.m_assetPlatform = "pc";
|
||||
}
|
||||
outputConnectionSettings.m_assetPlatform = assetsPlatform;
|
||||
else
|
||||
{
|
||||
outputConnectionSettings.m_assetPlatform = assetsPlatform;
|
||||
}
|
||||
|
||||
if (outputConnectionSettings.m_assetPlatform.empty())
|
||||
{
|
||||
assetsPlatform = AzFramework::OSPlatformToDefaultAssetPlatform(AZ_TRAIT_OS_PLATFORM_CODENAME);
|
||||
|
||||
+1
-1
@@ -269,7 +269,7 @@ namespace AzFramework
|
||||
int numEnvironmentVars = 0;
|
||||
if (processLaunchInfo.m_environmentVariables)
|
||||
{
|
||||
const int numEnvironmentVars = processLaunchInfo.m_environmentVariables->size();
|
||||
numEnvironmentVars = processLaunchInfo.m_environmentVariables->size();
|
||||
// Adding one more as exec expects the array to have a nullptr as the last element
|
||||
environmentVariables = new char*[numEnvironmentVars + 1];
|
||||
for (int i = 0; i < numEnvironmentVars; i++)
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace UnitTest
|
||||
// If an entry is removed from the octree as an unintended side effect of updating an existing entry,
|
||||
// GetEntryCount can't be relied upon to report the actual entry count.
|
||||
// So manually count the entries when using the entry count for validation.
|
||||
uint32_t manualEntryCount = 0;
|
||||
size_t manualEntryCount = 0;
|
||||
visScene->EnumerateNoCull([&manualEntryCount](const AzFramework::IVisibilityScene::NodeData& nodeData) { manualEntryCount += nodeData.m_entries.size(); });
|
||||
|
||||
EXPECT_EQ(manualEntryCount, expectedEntryCount);
|
||||
@@ -409,7 +409,7 @@ namespace UnitTest
|
||||
}
|
||||
|
||||
// Expect all the entries to be in the scene
|
||||
ValidateEntryCountEqualsExpectedCount(m_octreeScene, visEntries.size());
|
||||
ValidateEntryCountEqualsExpectedCount(m_octreeScene, static_cast<uint32_t>(visEntries.size()));
|
||||
|
||||
// Update them, without making any actual changes
|
||||
for (AzFramework::VisibilityEntry& entry : visEntries)
|
||||
@@ -418,6 +418,6 @@ namespace UnitTest
|
||||
}
|
||||
|
||||
// Expect all the entries to be in the scene
|
||||
ValidateEntryCountEqualsExpectedCount(m_octreeScene, visEntries.size());
|
||||
ValidateEntryCountEqualsExpectedCount(m_octreeScene, static_cast<uint32_t>(visEntries.size()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace AzNetworking
|
||||
}
|
||||
timeoutItem->UpdateTimeoutTime(startTimeMs);
|
||||
|
||||
NetworkOutputSerializer serializer(buffer.GetBuffer(), buffer.GetSize());
|
||||
NetworkOutputSerializer serializer(buffer.GetBuffer(), static_cast<uint32_t>(buffer.GetSize()));
|
||||
if (m_state == ConnectionState::Connecting)
|
||||
{
|
||||
const ConnectResult connectResult = m_networkInterface.GetConnectionListener().ValidateConnect(GetRemoteAddress(), header, serializer);
|
||||
@@ -198,7 +198,7 @@ namespace AzNetworking
|
||||
{
|
||||
TcpPacketEncodingBuffer buffer;
|
||||
{
|
||||
NetworkInputSerializer serializer(buffer.GetBuffer(), buffer.GetCapacity());
|
||||
NetworkInputSerializer serializer(buffer.GetBuffer(), static_cast<uint32_t>(buffer.GetCapacity()));
|
||||
if (!const_cast<IPacket&>(packet).Serialize(serializer))
|
||||
{
|
||||
AZ_Assert(false, "SendReliablePacket: Unable to serialize packet [Type: %d]", packet.GetPacketType());
|
||||
@@ -272,7 +272,7 @@ namespace AzNetworking
|
||||
{
|
||||
TcpPacketHeader header(packetType, aznumeric_cast<uint16_t>(payloadBuffer.GetSize()));
|
||||
header.SetPacketFlag(PacketFlag::Compressed, shouldCompress);
|
||||
NetworkInputSerializer serializer(headerBuffer.GetBuffer(), headerBuffer.GetCapacity());
|
||||
NetworkInputSerializer serializer(headerBuffer.GetBuffer(), static_cast<uint32_t>(headerBuffer.GetCapacity()));
|
||||
if (!header.Serialize(serializer))
|
||||
{
|
||||
return false;
|
||||
@@ -313,7 +313,7 @@ namespace AzNetworking
|
||||
m_networkInterface.GetMetrics().m_sendBytesCompressedDelta += (payloadSize - compressionMemBytesUsed);
|
||||
|
||||
writeBuffer.Resize(aznumeric_cast<int32_t>(compressionMemBytesUsed));
|
||||
payloadSize = writeBuffer.GetSize();
|
||||
payloadSize = static_cast<uint32_t>(writeBuffer.GetSize());
|
||||
srcData = writeBuffer.GetBuffer();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace AzNetworking
|
||||
{
|
||||
template <uint32_t SIZE>
|
||||
inline TcpRingBuffer<SIZE>::TcpRingBuffer()
|
||||
: m_impl(m_buffer.data(), m_buffer.size())
|
||||
: m_impl(m_buffer.data(), static_cast<uint32_t>(m_buffer.size()))
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace AzNetworking
|
||||
if (dtlsData.GetSize() > 0)
|
||||
{
|
||||
const uint8_t* encryptedData = dtlsData.GetBuffer();
|
||||
const uint32_t encryptedSize = dtlsData.GetSize();
|
||||
const uint32_t encryptedSize = static_cast<uint32_t>(dtlsData.GetSize());
|
||||
BIO_write(m_readBio, encryptedData, encryptedSize);
|
||||
}
|
||||
DtlsEndpoint::HandshakeState prevState = m_state;
|
||||
@@ -196,7 +196,7 @@ namespace AzNetworking
|
||||
// Need to do this... connection negotiation may have left data in the write bio that we need to send out
|
||||
if (BIO_ctrl_pending(m_writeBio) > 0)
|
||||
{
|
||||
const uint32_t maxBufferSize = outHandshakeData.GetCapacity();
|
||||
const uint32_t maxBufferSize = static_cast<uint32_t>(outHandshakeData.GetCapacity());
|
||||
outHandshakeData.Resize(maxBufferSize);
|
||||
const int32_t dataSize = BIO_read(m_writeBio, outHandshakeData.GetBuffer(), maxBufferSize);
|
||||
outHandshakeData.Resize(dataSize);
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace AzNetworking
|
||||
return true;
|
||||
}
|
||||
|
||||
totalPacketSize += packetFragments[index]->GetChunkBuffer().GetSize();
|
||||
totalPacketSize += static_cast<uint32_t>(packetFragments[index]->GetChunkBuffer().GetSize());
|
||||
}
|
||||
|
||||
// We now mark this sequence as delivered, so if by some chance all the individual chunks get redelivered again we don't double deliver the reconstructed packet
|
||||
@@ -125,7 +125,7 @@ namespace AzNetworking
|
||||
uint8_t* bufferPointer = buffer.GetBuffer();
|
||||
for (uint32_t index = 0; index < packetFragments.size(); ++index)
|
||||
{
|
||||
const uint32_t chunkSize = packetFragments[index]->GetChunkBuffer().GetSize();
|
||||
const uint32_t chunkSize = static_cast<uint32_t>(packetFragments[index]->GetChunkBuffer().GetSize());
|
||||
memcpy(bufferPointer, packetFragments[index]->GetChunkBuffer().GetBuffer(), chunkSize);
|
||||
bufferPointer += chunkSize;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ namespace AzNetworking
|
||||
// We can erase all the chunks now, packet is completed
|
||||
m_packetFragments.erase(fragmentSequence);
|
||||
|
||||
NetworkOutputSerializer networkSerializer(buffer.GetBuffer(), buffer.GetSize());
|
||||
NetworkOutputSerializer networkSerializer(buffer.GetBuffer(), static_cast<uint32_t>(buffer.GetSize()));
|
||||
{
|
||||
ISerializer& networkISerializer = networkSerializer; // To get the default typeinfo parameters in ISerializer
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ namespace AzNetworking
|
||||
continue;
|
||||
}
|
||||
decodedPacketData = m_decompressBuffer.GetBuffer();
|
||||
decodedPacketSize = m_decompressBuffer.GetSize();
|
||||
decodedPacketSize = static_cast<int32_t>(m_decompressBuffer.GetSize());
|
||||
}
|
||||
GetMetrics().m_recvBytesUncompressed += decodedPacketSize;
|
||||
|
||||
@@ -504,7 +504,7 @@ namespace AzNetworking
|
||||
{
|
||||
buffer.Resize(buffer.GetCapacity());
|
||||
|
||||
NetworkInputSerializer networkSerializer(buffer.GetBuffer(), buffer.GetCapacity());
|
||||
NetworkInputSerializer networkSerializer(buffer.GetBuffer(), static_cast<uint32_t>(buffer.GetCapacity()));
|
||||
ISerializer& serializer = networkSerializer; // To get the default typeinfo parameters in ISerializer
|
||||
|
||||
if (!header.SerializePacketFlags(serializer))
|
||||
@@ -527,7 +527,7 @@ namespace AzNetworking
|
||||
|
||||
buffer.Resize(serializer.GetSize());
|
||||
}
|
||||
uint32_t packetSize = buffer.GetSize();
|
||||
uint32_t packetSize = static_cast<uint32_t>(buffer.GetSize());
|
||||
uint8_t* packetData = buffer.GetBuffer();
|
||||
|
||||
// If the packet doesn't fit within our MTU (minus potential SSL encryption overhead), break it up
|
||||
@@ -559,7 +559,7 @@ namespace AzNetworking
|
||||
UdpPacketEncodingBuffer writeBuffer;
|
||||
if (m_compressor && shouldCompress)
|
||||
{
|
||||
NetworkInputSerializer flagSerializer(writeBuffer.GetBuffer(), writeBuffer.GetCapacity());
|
||||
NetworkInputSerializer flagSerializer(writeBuffer.GetBuffer(), static_cast<uint32_t>(writeBuffer.GetCapacity()));
|
||||
ISerializer& serializer = flagSerializer; // To get the default typeinfo parameters in ISerializer
|
||||
|
||||
header.SetPacketFlag(PacketFlag::Compressed, true);
|
||||
@@ -572,7 +572,7 @@ namespace AzNetworking
|
||||
AZ_Assert(flagSize == 1, "Flag bitfield should serialize to one byte");
|
||||
|
||||
// Compress the packet, make sure to offset by the size of the flag which is now serialized
|
||||
const uint32_t payloadSize = buffer.GetSize() - flagSize;
|
||||
const uint32_t payloadSize = static_cast<uint32_t>(buffer.GetSize() - flagSize);
|
||||
uint8_t* payload = buffer.GetBuffer() + flagSize;
|
||||
const AZStd::size_t maxSizeNeeded = m_compressor->GetMaxCompressedBufferSize(payloadSize);
|
||||
AZStd::size_t compressionMemBytesUsed = 0;
|
||||
@@ -588,7 +588,7 @@ namespace AzNetworking
|
||||
if (compressionMemBytesUsed < payloadSize)
|
||||
{
|
||||
writeBuffer.Resize(aznumeric_cast<int32_t>(flagSize + compressionMemBytesUsed));
|
||||
packetSize = writeBuffer.GetSize();
|
||||
packetSize = static_cast<uint32_t>(writeBuffer.GetSize());
|
||||
packetData = writeBuffer.GetBuffer();
|
||||
// Track byte delta caused by compression
|
||||
GetMetrics().m_sendBytesCompressedDelta += (packetSize - compressionMemBytesUsed);
|
||||
|
||||
@@ -177,7 +177,7 @@ namespace AzNetworking
|
||||
}
|
||||
|
||||
IpAddress address;
|
||||
const uint32_t bufferHead = receiveBuffer.GetSize();
|
||||
const uint32_t bufferHead = static_cast<uint32_t>(receiveBuffer.GetSize());
|
||||
if (bufferHead + MaxUdpTransmissionUnit >= receiveBuffer.GetCapacity())
|
||||
{
|
||||
AZLOG_INFO("Receive buffer full, leaving data on the socket. Size exceeded by %d",
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace AzNetworking
|
||||
#ifdef ENABLE_LATENCY_DEBUG
|
||||
int32_t UdpSocket::SendInternalDeferred(const DeferredData& data) const
|
||||
{
|
||||
return SendInternal(data.m_address, data.m_dataBuffer.GetBuffer(), data.m_dataBuffer.GetSize(), data.m_encrypt, *data.m_dtlsEndpoint);
|
||||
return SendInternal(data.m_address, data.m_dataBuffer.GetBuffer(), static_cast<uint32_t>(data.m_dataBuffer.GetSize()), data.m_encrypt, *data.m_dtlsEndpoint);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace AzToolsFramework
|
||||
SourceControlFileInfo GetSceneSourceControlInfo() override;
|
||||
|
||||
bool AreAnyEntitiesSelected() override { return !m_selectedEntities.empty(); }
|
||||
int GetSelectedEntitiesCount() override { return m_selectedEntities.size(); }
|
||||
int GetSelectedEntitiesCount() override { return static_cast<int>(m_selectedEntities.size()); }
|
||||
const EntityIdList& GetSelectedEntities() override { return m_selectedEntities; }
|
||||
const EntityIdList& GetHighlightedEntities() override { return m_highlightedEntities; }
|
||||
void SetSelectedEntities(const EntityIdList& selectedEntities) override;
|
||||
|
||||
@@ -34,8 +34,6 @@ namespace AzToolsFramework::AssetUtils::Internal
|
||||
return {};
|
||||
}
|
||||
|
||||
const int pathLen = sourceFolder.length() + 1;
|
||||
|
||||
AZ::IO::Path sourceWildcard{ sourceFolder };
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -164,7 +164,7 @@ namespace AzToolsFramework
|
||||
|
||||
AZStd::string path = prefix + pathIter->value.GetString();
|
||||
|
||||
pathIter->value.SetString(path.c_str(), path.length(), providedPatch.GetAllocator());
|
||||
pathIter->value.SetString(path.c_str(), static_cast<rapidjson::SizeType>(path.length()), providedPatch.GetAllocator());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ namespace AzToolsFramework
|
||||
m_updatingTemplateInstancesInQueue = true;
|
||||
|
||||
const int instanceCountToUpdateInBatch =
|
||||
m_instanceCountToUpdateInBatch == 0 ? m_instancesUpdateQueue.size() : m_instanceCountToUpdateInBatch;
|
||||
m_instanceCountToUpdateInBatch == 0 ? static_cast<int>(m_instancesUpdateQueue.size()) : m_instanceCountToUpdateInBatch;
|
||||
TemplateId currentTemplateId = InvalidTemplateId;
|
||||
TemplateReference currentTemplateReference = AZStd::nullopt;
|
||||
|
||||
|
||||
@@ -1458,7 +1458,7 @@ namespace AzToolsFramework
|
||||
if (&owningInstance->get() == &commonRootEntityOwningInstance)
|
||||
{
|
||||
// If it's the same instance, we can add this entity to the new instance entities.
|
||||
int priorEntitiesSize = entities.size();
|
||||
size_t priorEntitiesSize = entities.size();
|
||||
|
||||
entities.insert(entity);
|
||||
|
||||
@@ -1645,7 +1645,7 @@ namespace AzToolsFramework
|
||||
entityDomAfter.Parse(newEntityDomString.toUtf8().constData());
|
||||
|
||||
// Add the new Entity DOM to the Entities member of the instance
|
||||
rapidjson::Value aliasName(newEntityAlias.c_str(), newEntityAlias.length(), domToAddDuplicatedEntitiesUnder.GetAllocator());
|
||||
rapidjson::Value aliasName(newEntityAlias.c_str(), static_cast<rapidjson::SizeType>(newEntityAlias.length()), domToAddDuplicatedEntitiesUnder.GetAllocator());
|
||||
entitiesIter->value.AddMember(AZStd::move(aliasName), entityDomAfter, domToAddDuplicatedEntitiesUnder.GetAllocator());
|
||||
}
|
||||
|
||||
@@ -1717,7 +1717,7 @@ namespace AzToolsFramework
|
||||
nestedInstanceDomAfter.Parse(newInstanceDomString.toUtf8().constData());
|
||||
|
||||
// Add the new Instance DOM to the Instances member of the instance
|
||||
rapidjson::Value aliasName(newInstanceAlias.c_str(), newInstanceAlias.length(), domToAddDuplicatedInstancesUnder.GetAllocator());
|
||||
rapidjson::Value aliasName(newInstanceAlias.c_str(), static_cast<rapidjson::SizeType>(newInstanceAlias.length()), domToAddDuplicatedInstancesUnder.GetAllocator());
|
||||
instancesIter->value.AddMember(AZStd::move(aliasName), nestedInstanceDomAfter, domToAddDuplicatedInstancesUnder.GetAllocator());
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -251,7 +251,7 @@ namespace AzToolsFramework
|
||||
{
|
||||
EditorPythonConsoleInterface::GlobalFunctionCollection globalFunctionCollection;
|
||||
editorPythonConsoleInterface->GetGlobalFunctionList(globalFunctionCollection);
|
||||
m_items.reserve(globalFunctionCollection.size());
|
||||
m_items.reserve(static_cast<int>(globalFunctionCollection.size()));
|
||||
for (const EditorPythonConsoleInterface::GlobalFunction& globalFunction : globalFunctionCollection)
|
||||
{
|
||||
Item item;
|
||||
|
||||
+1
-1
@@ -247,7 +247,7 @@ namespace AzToolsFramework
|
||||
if (highlightTextIndex >= 0)
|
||||
{
|
||||
const QString BACKGROUND_COLOR{ "#707070" };
|
||||
label.insert(highlightTextIndex + m_filterString.length(), "</span>");
|
||||
label.insert(highlightTextIndex + static_cast<int>(m_filterString.length()), "</span>");
|
||||
label.insert(highlightTextIndex, "<span style=\"background-color: " + BACKGROUND_COLOR + "\">");
|
||||
}
|
||||
} while(highlightTextIndex > 0);
|
||||
|
||||
+6
-6
@@ -2643,22 +2643,22 @@ namespace AzToolsFramework
|
||||
m_gui->m_statusComboBox->setItalic(false);
|
||||
if (allActive)
|
||||
{
|
||||
m_gui->m_statusComboBox->setHeaderOverride(m_itemNames[StatusTypeToIndex(StatusType::StatusStartActive)]);
|
||||
m_gui->m_statusComboBox->setCurrentIndex(StatusTypeToIndex(StatusType::StatusStartActive));
|
||||
m_gui->m_statusComboBox->setHeaderOverride(m_itemNames[static_cast<int>(StatusTypeToIndex(StatusType::StatusStartActive))]);
|
||||
m_gui->m_statusComboBox->setCurrentIndex(static_cast<int>(StatusTypeToIndex(StatusType::StatusStartActive)));
|
||||
m_comboItems[StatusTypeToIndex(StatusType::StatusStartActive)]->setCheckState(Qt::Checked);
|
||||
}
|
||||
else
|
||||
if (allInactive)
|
||||
{
|
||||
m_gui->m_statusComboBox->setHeaderOverride(m_itemNames[StatusTypeToIndex(StatusType::StatusStartInactive)]);
|
||||
m_gui->m_statusComboBox->setCurrentIndex(StatusTypeToIndex(StatusType::StatusStartInactive));
|
||||
m_gui->m_statusComboBox->setHeaderOverride(m_itemNames[static_cast<int>(StatusTypeToIndex(StatusType::StatusStartInactive))]);
|
||||
m_gui->m_statusComboBox->setCurrentIndex(static_cast<int>(StatusTypeToIndex(StatusType::StatusStartInactive)));
|
||||
m_comboItems[StatusTypeToIndex(StatusType::StatusStartInactive)]->setCheckState(Qt::Checked);
|
||||
}
|
||||
else
|
||||
if (allEditorOnly)
|
||||
{
|
||||
m_gui->m_statusComboBox->setHeaderOverride(m_itemNames[StatusTypeToIndex(StatusType::StatusEditorOnly)]);
|
||||
m_gui->m_statusComboBox->setCurrentIndex(StatusTypeToIndex(StatusType::StatusEditorOnly));
|
||||
m_gui->m_statusComboBox->setHeaderOverride(m_itemNames[static_cast<int>(StatusTypeToIndex(StatusType::StatusEditorOnly))]);
|
||||
m_gui->m_statusComboBox->setCurrentIndex(static_cast<int>(StatusTypeToIndex(StatusType::StatusEditorOnly)));
|
||||
m_comboItems[StatusTypeToIndex(StatusType::StatusEditorOnly)]->setCheckState(Qt::Checked);
|
||||
}
|
||||
else // Some marked active, some not
|
||||
|
||||
@@ -110,8 +110,8 @@ namespace Benchmark
|
||||
|
||||
void BM_Prefab::SetUpMockValidatorForReadPrefab()
|
||||
{
|
||||
int pathCount = m_paths.size();
|
||||
for (int number = 0; number < pathCount; ++number)
|
||||
const size_t pathCount = m_paths.size();
|
||||
for (size_t number = 0; number < pathCount; ++number)
|
||||
{
|
||||
m_mockIOActionValidator->ReadPrefabDom(
|
||||
m_paths[number], UnitTest::PrefabTestDomUtils::CreatePrefabDom());
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace UnitTest
|
||||
const EntityAlias& entityAlias)
|
||||
{
|
||||
return GetPrefabDomEntitiesPath()
|
||||
.Append(entityAlias.c_str(), entityAlias.length());
|
||||
.Append(entityAlias.c_str(), static_cast<rapidjson::SizeType>(entityAlias.length()));
|
||||
};
|
||||
|
||||
inline PrefabDomPath GetPrefabDomEntityNamePath(
|
||||
@@ -62,7 +62,7 @@ namespace UnitTest
|
||||
inline PrefabDomPath GetPrefabDomInstancePath(
|
||||
const InstanceAlias& instanceAlias)
|
||||
{
|
||||
return GetPrefabDomInstancesPath().Append(instanceAlias.c_str(), instanceAlias.length());
|
||||
return GetPrefabDomInstancesPath().Append(instanceAlias.c_str(), static_cast<rapidjson::SizeType>(instanceAlias.length()));
|
||||
};
|
||||
|
||||
inline PrefabDomPath GetPrefabDomInstancePath(
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#define CRYINCLUDE_CRYCOMMON_CRYARRAY_H
|
||||
#pragma once
|
||||
|
||||
#include "CryLegacyAllocator.h"
|
||||
#include <CryLegacyAllocator.h>
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Convenient iteration macros
|
||||
@@ -675,7 +675,7 @@ namespace NArray
|
||||
|
||||
I capacity() const
|
||||
{
|
||||
I aligned_bytes = Align(size() * sizeof(T), sizeof(I));
|
||||
I aligned_bytes = static_cast<I>(Align(size() * sizeof(T), sizeof(I)));
|
||||
if (m_nSizeCap & nCAP_BIT)
|
||||
{
|
||||
// Capacity stored in word following data
|
||||
@@ -693,7 +693,7 @@ namespace NArray
|
||||
// Store size, and assert against overflow.
|
||||
assert(s <= c);
|
||||
m_nSizeCap = s;
|
||||
I aligned_bytes = Align(s * sizeof(T), sizeof(I));
|
||||
I aligned_bytes = static_cast<I>(Align(s * sizeof(T), sizeof(I)));
|
||||
if (c * sizeof(T) >= aligned_bytes + sizeof(I))
|
||||
{
|
||||
// Has extra capacity, more than word-alignment
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
|
||||
#include "LegacyAllocator.h"
|
||||
|
||||
#include <AzCore/std/algorithm.h>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// CryModule allocation API
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -95,128 +93,3 @@ inline void* CryModuleReallocAlignImpl(void* prev, size_t size, size_t alignment
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// CryCrt alloc API
|
||||
//-----------------------------------------------------------------------------
|
||||
inline size_t CryCrtSize(void* p)
|
||||
{
|
||||
return AZ::AllocatorInstance<AZ::LegacyAllocator>::Get().AllocationSize(p);
|
||||
}
|
||||
|
||||
inline void* CryCrtMalloc(size_t size)
|
||||
{
|
||||
return CryModuleMalloc(size);
|
||||
}
|
||||
|
||||
inline size_t CryCrtFree(void* p)
|
||||
{
|
||||
size_t size = CryCrtSize(p);
|
||||
CryModuleFree(p);
|
||||
return size;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// CrySystemCrt alloc API
|
||||
//-----------------------------------------------------------------------------
|
||||
inline size_t CrySystemCrtSize(void* p)
|
||||
{
|
||||
return AZ::AllocatorInstance<AZ::LegacyAllocator>::Get().AllocationSize(p);
|
||||
}
|
||||
|
||||
inline void* CrySystemCrtMalloc(size_t size)
|
||||
{
|
||||
return AZ::AllocatorInstance<AZ::LegacyAllocator>::Get().Allocate(size, 0, 0, "AZ::LegacyAllocator");
|
||||
}
|
||||
|
||||
inline void* CrySystemCrtRealloc(void* p, size_t size)
|
||||
{
|
||||
// Use LegacyAllocator's special ReAllocate
|
||||
return AZ::AllocatorInstance<AZ::LegacyAllocator>::Get().ReAllocate(p, size, 0);
|
||||
}
|
||||
|
||||
inline size_t CrySystemCrtFree(void* p)
|
||||
{
|
||||
size_t size = CrySystemCrtSize(p);
|
||||
CryModuleFree(p);
|
||||
return size;
|
||||
}
|
||||
|
||||
inline size_t CrySystemCrtGetUsedSpace()
|
||||
{
|
||||
return AZ::AllocatorInstance<AZ::LegacyAllocator>::Get().NumAllocatedBytes();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// CryMalloc API
|
||||
//-----------------------------------------------------------------------------
|
||||
inline void* CryMalloc(size_t size, size_t& allocated, size_t alignment)
|
||||
{
|
||||
if (!size)
|
||||
{
|
||||
allocated = 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// The original implementation guaranteed 16 byte min alignment
|
||||
alignment = AZStd::GetMax<size_t>(alignment, 16);
|
||||
void* ptr = AZ::AllocatorInstance<AZ::LegacyAllocator>::Get().Allocate(size, alignment, 0, "CryMalloc", __FILE__, __LINE__);
|
||||
allocated = AZ::AllocatorInstance<AZ::LegacyAllocator>::Get().AllocationSize(ptr);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
inline void* CryRealloc(void* memblock, size_t size, size_t& allocated, size_t& oldsize, size_t alignment)
|
||||
{
|
||||
oldsize = AZ::AllocatorInstance<AZ::LegacyAllocator>::Get().AllocationSize(memblock);
|
||||
void* ptr = AZ::AllocatorInstance<AZ::LegacyAllocator>::Get().ReAllocate(memblock, size, alignment);
|
||||
allocated = AZ::AllocatorInstance<AZ::LegacyAllocator>::Get().AllocationSize(ptr);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
inline size_t CryFree(void* p, size_t /*alignment*/)
|
||||
{
|
||||
size_t size = AZ::AllocatorInstance<AZ::LegacyAllocator>::Get().AllocationSize(p);
|
||||
AZ::AllocatorInstance<AZ::LegacyAllocator>::Get().DeAllocate(p, size);
|
||||
return size;
|
||||
}
|
||||
|
||||
inline size_t CryGetMemSize(void* memblock, size_t /*sourceSize*/)
|
||||
{
|
||||
return AZ::AllocatorInstance<AZ::LegacyAllocator>::Get().AllocationSize(memblock);
|
||||
}
|
||||
|
||||
inline int CryMemoryGetAllocatedSize()
|
||||
{
|
||||
return AZ::AllocatorInstance<AZ::LegacyAllocator>::Get().NumAllocatedBytes();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
inline int CryMemoryGetPoolSize()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
inline int CryStats([[maybe_unused]] char* buf)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline int CryGetUsedHeapSize()
|
||||
{
|
||||
return AZ::AllocatorInstance<AZ::LegacyAllocator>::Get().NumAllocatedBytes();
|
||||
}
|
||||
|
||||
inline int CryGetWastedHeapSize()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline void CryCleanup()
|
||||
{
|
||||
AZ::AllocatorInstance<AZ::LegacyAllocator>::Get().GarbageCollect();
|
||||
}
|
||||
|
||||
inline void CryResetStats(void)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ struct INameTable
|
||||
const char* GetStr() { return (char*)(this + 1); }
|
||||
void AddRef() { nRefCount++; /*InterlockedIncrement(&_header()->nRefCount);*/};
|
||||
int Release() { return --nRefCount; };
|
||||
int GetMemoryUsage() { return sizeof(SNameEntry) + strlen(GetStr()); }
|
||||
int GetMemoryUsage() { return static_cast<int>(sizeof(SNameEntry) + strlen(GetStr())); }
|
||||
int GetLength(){return nLength; }
|
||||
};
|
||||
|
||||
@@ -102,14 +102,14 @@ public:
|
||||
if (!pEntry)
|
||||
{
|
||||
// Create a new entry.
|
||||
unsigned int nLen = strlen(str);
|
||||
unsigned int allocLen = sizeof(SNameEntry) + (nLen + 1) * sizeof(char);
|
||||
size_t nLen = strlen(str);
|
||||
size_t allocLen = sizeof(SNameEntry) + (nLen + 1) * sizeof(char);
|
||||
pEntry = (SNameEntry*)CryModuleMalloc(allocLen);
|
||||
assert(pEntry != NULL);
|
||||
pEntry->nTag = SNameEntry::TAG;
|
||||
pEntry->nRefCount = 0;
|
||||
pEntry->nLength = nLen;
|
||||
pEntry->nAllocSize = allocLen;
|
||||
pEntry->nLength = static_cast<int>(nLen);
|
||||
pEntry->nAllocSize = static_cast<int>(allocLen);
|
||||
// Copy string to the end of name entry.
|
||||
char* pEntryStr = const_cast<char*>(pEntry->GetStr());
|
||||
memcpy(pEntryStr, str, nLen + 1);
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
int n = 0;
|
||||
for (it = m_nameMap.begin(); it != m_nameMap.end(); it++)
|
||||
{
|
||||
nSize += strlen(it->first);
|
||||
nSize += static_cast<int>(strlen(it->first));
|
||||
nSize += it->second->GetMemoryUsage();
|
||||
n++;
|
||||
}
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
}
|
||||
virtual int GetNumberOfEntries()
|
||||
{
|
||||
return m_nameMap.size();
|
||||
return static_cast<int>(m_nameMap.size());
|
||||
}
|
||||
|
||||
// Log all names inside CryName table.
|
||||
|
||||
@@ -159,8 +159,8 @@ public:
|
||||
return numElements != m_elements.size();
|
||||
}
|
||||
|
||||
ILINE int Count() const { return m_elements.size(); }
|
||||
ILINE unsigned int Size() const { return m_elements.size(); }
|
||||
ILINE size_t Count() const { return m_elements.size(); }
|
||||
ILINE size_t Size() const { return m_elements.size(); }
|
||||
|
||||
ILINE int IsEmpty() const { return m_elements.empty(); }
|
||||
|
||||
|
||||
@@ -1266,7 +1266,7 @@ inline void CryStringT<T>::resize(size_type nCount, value_type _Ch)
|
||||
}
|
||||
else if (nCount < length())
|
||||
{
|
||||
_header()->nLength = nCount;
|
||||
_header()->nLength = static_cast<int>(nCount);
|
||||
m_str[length()] = 0; // Make null terminated string.
|
||||
}
|
||||
}
|
||||
@@ -1971,7 +1971,7 @@ inline CryStringT<T>& CryStringT<T>::erase(size_type nIndex, size_type nCount)
|
||||
_MakeUnique();
|
||||
size_type nNumToCopy = length() - (nIndex + nCount) + 1;
|
||||
_move(m_str + nIndex, m_str + nIndex + nCount, nNumToCopy);
|
||||
_header()->nLength = length() - nCount;
|
||||
_header()->nLength = static_cast<int>(length() - nCount);
|
||||
}
|
||||
|
||||
return *this;
|
||||
@@ -2013,7 +2013,7 @@ inline CryStringT<T>& CryStringT<T>::insert(size_type nIndex, size_type nCount,
|
||||
|
||||
_move(m_str + nIndex + nCount, m_str + nIndex, (nNewLength - nIndex - nCount) + 1);
|
||||
_set(m_str + nIndex, ch, nCount);
|
||||
_header()->nLength = nNewLength;
|
||||
_header()->nLength = static_cast<int>(nNewLength);
|
||||
CRY_STRING_DEBUG(m_str)
|
||||
|
||||
return *this;
|
||||
@@ -2050,7 +2050,7 @@ inline CryStringT<T>& CryStringT<T>::insert(size_type nIndex, const_str pstr, si
|
||||
|
||||
_move(m_str + nIndex + nInsertLength, m_str + nIndex, (nNewLength - nIndex - nInsertLength + 1));
|
||||
_copy(m_str + nIndex, pstr, nInsertLength);
|
||||
_header()->nLength = nNewLength;
|
||||
_header()->nLength = static_cast<int>(nNewLength);
|
||||
m_str[length()] = 0;
|
||||
}
|
||||
CRY_STRING_DEBUG(m_str)
|
||||
@@ -2164,7 +2164,7 @@ inline CryStringT<T>& CryStringT<T>::replace(const_str strOld, const_str strNew)
|
||||
}
|
||||
strStart += _strlen(strStart) + 1;
|
||||
}
|
||||
_header()->nLength = nNewLength;
|
||||
_header()->nLength = static_cast<int>(nNewLength);
|
||||
}
|
||||
CRY_STRING_DEBUG(m_str)
|
||||
|
||||
@@ -2289,7 +2289,7 @@ inline CryStringT<T>& CryStringT<T>::TrimRight(const value_type* sCharSet)
|
||||
// Just shrink length of the string.
|
||||
size_type nNewLength = (size_type)(str - m_str) + 1; // m_str can change in _MakeUnique
|
||||
_MakeUnique();
|
||||
_header()->nLength = nNewLength;
|
||||
_header()->nLength = static_cast<int>(nNewLength);
|
||||
m_str[nNewLength] = 0;
|
||||
}
|
||||
|
||||
@@ -2317,7 +2317,7 @@ inline CryStringT<T>& CryStringT<T>::TrimRight()
|
||||
// Just shrink length of the string.
|
||||
size_type nNewLength = (size_type)(str - m_str) + 1; // m_str can change in _MakeUnique
|
||||
_MakeUnique();
|
||||
_header()->nLength = nNewLength;
|
||||
_header()->nLength = static_cast<int>(nNewLength);
|
||||
m_str[nNewLength] = 0;
|
||||
}
|
||||
|
||||
@@ -2353,7 +2353,7 @@ inline CryStringT<T>& CryStringT<T>::TrimLeft(const value_type* sCharSet)
|
||||
_MakeUnique();
|
||||
size_type nNewLength = length() - nOff;
|
||||
_move(m_str, m_str + nOff, nNewLength + 1);
|
||||
_header()->nLength = nNewLength;
|
||||
_header()->nLength = static_cast<int>(nNewLength);
|
||||
m_str[nNewLength] = 0;
|
||||
}
|
||||
|
||||
@@ -2376,7 +2376,7 @@ inline CryStringT<T>& CryStringT<T>::TrimLeft()
|
||||
_MakeUnique();
|
||||
size_type nNewLength = length() - nOff;
|
||||
_move(m_str, m_str + nOff, nNewLength + 1);
|
||||
_header()->nLength = nNewLength;
|
||||
_header()->nLength = static_cast<int>(nNewLength);
|
||||
m_str[nNewLength] = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -2094,7 +2094,7 @@ public:
|
||||
{
|
||||
if (activeStreams & (1U << i))
|
||||
{
|
||||
nMeshSize += ((i == VSF_GENERAL) ? sizeof(SVF_P3S_C4B_T2S) : cSizeStream[i]) * GetVertexCount();
|
||||
nMeshSize += static_cast<uint32>(((i == VSF_GENERAL) ? sizeof(SVF_P3S_C4B_T2S) : cSizeStream[i]) * GetVertexCount());
|
||||
nMeshSize += TARGET_DEFAULT_ALIGN - (nMeshSize & (TARGET_DEFAULT_ALIGN - 1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1426,9 +1426,9 @@ struct STexSamplerFX
|
||||
SAFE_RELEASE(m_pITarget);
|
||||
}
|
||||
|
||||
int Size()
|
||||
size_t Size()
|
||||
{
|
||||
int nSize = sizeof(*this);
|
||||
size_t nSize = sizeof(*this);
|
||||
nSize += m_szName.capacity();
|
||||
nSize += m_szTexture.capacity();
|
||||
#if SHADER_REFLECT_TEXTURE_SLOTS
|
||||
@@ -1805,9 +1805,9 @@ struct SEfResTexture
|
||||
return m_Ext.m_pTexModifier;
|
||||
}
|
||||
|
||||
int Size() const
|
||||
size_t Size() const
|
||||
{
|
||||
int nSize = sizeof(SEfResTexture) - sizeof(STexSamplerRT) - sizeof(SEfResTextureExt);
|
||||
size_t nSize = sizeof(SEfResTexture) - sizeof(STexSamplerRT) - sizeof(SEfResTextureExt);
|
||||
nSize += m_Name.size();
|
||||
nSize += m_Sampler.Size();
|
||||
nSize += m_Ext.Size();
|
||||
@@ -1900,9 +1900,9 @@ struct SBaseShaderResources
|
||||
|
||||
uint8 m_VoxelCoverage;
|
||||
|
||||
int Size() const
|
||||
size_t Size() const
|
||||
{
|
||||
int nSize = sizeof(SBaseShaderResources) + m_ShaderParams.size() * sizeof(SShaderParam);
|
||||
size_t nSize = sizeof(SBaseShaderResources) + m_ShaderParams.size() * sizeof(SShaderParam);
|
||||
return nSize;
|
||||
}
|
||||
|
||||
@@ -2032,9 +2032,9 @@ struct SInputShaderResources
|
||||
TexturesResourcesMap m_TexturesResourcesMap; // a map of all textures resources used by the shader by name
|
||||
SDeformInfo m_DeformInfo;
|
||||
|
||||
int Size() const
|
||||
size_t Size() const
|
||||
{
|
||||
int nSize = SBaseShaderResources::Size();// -sizeof(SEfResTexture) * m_TexturesResourcesMap.size();
|
||||
size_t nSize = SBaseShaderResources::Size();// -sizeof(SEfResTexture) * m_TexturesResourcesMap.size();
|
||||
nSize += m_TexturePath.size();
|
||||
nSize += sizeof(SDeformInfo);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -408,8 +408,7 @@ typename VectorMap<K, V, T, A>::key_compare VectorMap<K, V, T, A>::key_comp() co
|
||||
template <typename K, typename V, typename T, typename A>
|
||||
typename VectorMap<K, V, T, A>::iterator VectorMap<K, V, T, A>::lower_bound(const key_type& key)
|
||||
{
|
||||
int count = 0;
|
||||
count = m_entries.size();
|
||||
int count = static_cast<int>(m_entries.size());
|
||||
iterator first = m_entries.begin();
|
||||
iterator last = m_entries.end();
|
||||
for (; 0 < count; )
|
||||
@@ -432,8 +431,7 @@ typename VectorMap<K, V, T, A>::iterator VectorMap<K, V, T, A>::lower_bound(cons
|
||||
template <typename K, typename V, typename T, typename A>
|
||||
typename VectorMap<K, V, T, A>::const_iterator VectorMap<K, V, T, A>::lower_bound(const key_type& key) const
|
||||
{
|
||||
int count = 0;
|
||||
count = m_entries.size();
|
||||
int count = static_cast<int>(m_entries.size());
|
||||
const_iterator first = m_entries.begin();
|
||||
const_iterator last = m_entries.end();
|
||||
for (; 0 < count; )
|
||||
|
||||
@@ -475,8 +475,6 @@ ILINE DestinationType alias_cast(SourceType pPtr)
|
||||
return conv_union.pDst;
|
||||
}
|
||||
|
||||
#include "CryLegacyAllocator.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#ifndef DEPRECATED
|
||||
#define DEPRECATED
|
||||
|
||||
@@ -112,7 +112,7 @@ bool CConsoleBatchFile::ExecuteConfigFile(const char* sFilename)
|
||||
CryLog("%s \"%s\" found in %s ...", szLog, PathUtil::GetFile(filenameLog.c_str()), PathUtil::GetPath(filenameLog).c_str());
|
||||
}
|
||||
|
||||
int nLen = file.GetLength();
|
||||
size_t nLen = file.GetLength();
|
||||
char* sAllText = new char [nLen + 16];
|
||||
file.ReadRaw(sAllText, nLen);
|
||||
sAllText[nLen] = '\0';
|
||||
|
||||
@@ -161,7 +161,7 @@ struct SLevelNameAutoComplete
|
||||
: public IConsoleArgumentAutoComplete
|
||||
{
|
||||
AZStd::vector<AZStd::string> levels;
|
||||
virtual int GetCount() const { return levels.size(); };
|
||||
virtual int GetCount() const { return static_cast<int>(levels.size()); };
|
||||
virtual const char* GetValue(int nIndex) const { return levels[nIndex].c_str(); };
|
||||
};
|
||||
// definition and declaration must be separated for devirtualization
|
||||
|
||||
@@ -479,7 +479,7 @@ void CLocalizedStringsManager::ParseFirstLine(IXmlTableReader* pXmlTableReader,
|
||||
if (i == ELOCALIZED_COLUMN_SOUNDMOOD)
|
||||
{
|
||||
const char* pSoundMoodName = pFind + strlen(sLocalizedColumnNames[i]) + 1;
|
||||
int nSoundMoodNameLength = sCellContent.length() - strlen(sLocalizedColumnNames[i]) - 1;
|
||||
int nSoundMoodNameLength = static_cast<int>(sCellContent.length() - strlen(sLocalizedColumnNames[i]) - 1);
|
||||
if (nSoundMoodNameLength > 0)
|
||||
{
|
||||
SoundMoodIndex[nCellIndex] = pSoundMoodName;
|
||||
@@ -490,7 +490,7 @@ void CLocalizedStringsManager::ParseFirstLine(IXmlTableReader* pXmlTableReader,
|
||||
if (i == ELOCALIZED_COLUMN_EVENTPARAMETER)
|
||||
{
|
||||
const char* pParameterName = pFind + strlen(sLocalizedColumnNames[i]) + 1;
|
||||
int nParameterNameLength = sCellContent.length() - strlen(sLocalizedColumnNames[i]) - 1;
|
||||
int nParameterNameLength = static_cast<int>(sCellContent.length() - strlen(sLocalizedColumnNames[i]) - 1);
|
||||
if (nParameterNameLength > 0)
|
||||
{
|
||||
EventParameterIndex[nCellIndex] = pParameterName;
|
||||
@@ -622,7 +622,7 @@ bool CLocalizedStringsManager::InitLocalizationData(
|
||||
|
||||
CRY_ASSERT(m_tagFileNames.size() < 255);
|
||||
|
||||
uint8 curNumTags = m_tagFileNames.size();
|
||||
uint8 curNumTags = static_cast<uint8>(m_tagFileNames.size());
|
||||
|
||||
m_tagFileNames[sType].filenames = vEntries;
|
||||
m_tagFileNames[sType].id = curNumTags + 1;
|
||||
@@ -757,7 +757,7 @@ bool CLocalizedStringsManager::ReleaseLocalizationDataByTag(
|
||||
|
||||
bool bVecEntryErased = false;
|
||||
//Then remove the entries in the storage vector
|
||||
const uint32 numEntries = m_pLanguage->m_vLocalizedStrings.size();
|
||||
const int32 numEntries = static_cast<int32>(m_pLanguage->m_vLocalizedStrings.size());
|
||||
for (int32 i = numEntries - 1; i >= 0; i--)
|
||||
{
|
||||
SLocalizedStringEntry* entry = m_pLanguage->m_vLocalizedStrings[i];
|
||||
@@ -1405,7 +1405,7 @@ bool CLocalizedStringsManager::DoLoadExcelXmlSpreadsheet(const char* sFileName,
|
||||
|
||||
// SoundMood Entries
|
||||
{
|
||||
pEntry->SoundMoods.resize(SoundMoodValues.size());
|
||||
pEntry->SoundMoods.resize(static_cast<int>(SoundMoodValues.size()));
|
||||
if (SoundMoodValues.size() > 0)
|
||||
{
|
||||
std::map<int, float>::const_iterator itEnd = SoundMoodValues.end();
|
||||
@@ -1421,7 +1421,7 @@ bool CLocalizedStringsManager::DoLoadExcelXmlSpreadsheet(const char* sFileName,
|
||||
|
||||
// EventParameter Entries
|
||||
{
|
||||
pEntry->EventParameters.resize(EventParameterValues.size());
|
||||
pEntry->EventParameters.resize(static_cast<int>(EventParameterValues.size()));
|
||||
if (EventParameterValues.size() > 0)
|
||||
{
|
||||
std::map<int, float>::const_iterator itEnd = EventParameterValues.end();
|
||||
@@ -2196,7 +2196,7 @@ int CLocalizedStringsManager::GetLocalizedStringCount()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return m_pLanguage->m_vLocalizedStrings.size();
|
||||
return static_cast<int>(m_pLanguage->m_vLocalizedStrings.size());
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -2310,10 +2310,10 @@ void InternalFormatStringMessage(StringClass& outString, const StringClass& sStr
|
||||
int maxArgUsed = 0;
|
||||
int lastPos = 0;
|
||||
int curPos = 0;
|
||||
const int sourceLen = sString.length();
|
||||
const int sourceLen = static_cast<int>(sString.length());
|
||||
while (true)
|
||||
{
|
||||
int foundPos = sString.find(token, curPos);
|
||||
int foundPos = static_cast<int>(sString.find(token, curPos));
|
||||
if (foundPos != string::npos)
|
||||
{
|
||||
if (foundPos + 1 < sourceLen)
|
||||
|
||||
@@ -484,7 +484,7 @@ void CLog::LogV(const ELogType type, [[maybe_unused]]int flags, const char* szFo
|
||||
break;
|
||||
}
|
||||
|
||||
int bufferlen = sizeof(szBuffer) - prefixSize;
|
||||
int bufferlen = static_cast<int>(sizeof(szBuffer) - prefixSize);
|
||||
if (bufferlen > 0)
|
||||
{
|
||||
#if defined(AZ_RESTRICTED_PLATFORM)
|
||||
|
||||
@@ -216,8 +216,8 @@ public:
|
||||
CryFatalError("Can't replace strings in an xml node that reuses strings");
|
||||
}
|
||||
|
||||
int nStrLen1 = strlen(str1);
|
||||
int nStrLen2 = strlen(str2);
|
||||
int nStrLen1 = static_cast<int>(strlen(str1));
|
||||
int nStrLen2 = static_cast<int>(strlen(str2));
|
||||
|
||||
// undo ptr1 add.
|
||||
if (m_ptr != m_start)
|
||||
|
||||
@@ -285,7 +285,7 @@ public:
|
||||
pos = 1;
|
||||
for (;; )
|
||||
{
|
||||
pos = szValue.find_first_of("\\", pos);
|
||||
pos = static_cast<int>(szValue.find_first_of("\\", pos));
|
||||
|
||||
if (pos == string::npos)
|
||||
{
|
||||
@@ -300,7 +300,7 @@ public:
|
||||
pos = 1;
|
||||
for (;; )
|
||||
{
|
||||
pos = szValue.find_first_of("\"", pos);
|
||||
pos = static_cast<int>(szValue.find_first_of("\"", pos));
|
||||
|
||||
if (pos == string::npos)
|
||||
{
|
||||
@@ -414,7 +414,7 @@ bool CSystemConfiguration::ParseSystemConfig()
|
||||
|
||||
INDENT_LOG_DURING_SCOPE();
|
||||
|
||||
int nLen = file.GetLength();
|
||||
int nLen = static_cast<int>(file.GetLength());
|
||||
if (nLen == 0)
|
||||
{
|
||||
CryWarning(VALIDATOR_MODULE_SYSTEM, VALIDATOR_WARNING, "Couldn't get length for Config file %s", filename.c_str());
|
||||
|
||||
@@ -173,7 +173,7 @@ void CView::SetViewShakeEx(const SShakeParams& params)
|
||||
return;
|
||||
}
|
||||
|
||||
int shakes(m_shakes.size());
|
||||
int shakes = static_cast<int>(m_shakes.size());
|
||||
SShake* pSetShake(NULL);
|
||||
|
||||
for (int i = 0; i < shakes; ++i)
|
||||
@@ -250,7 +250,7 @@ void CView::ProcessShaking(float frameTime)
|
||||
m_viewParams.shakingRatio = 0;
|
||||
m_viewParams.groundOnly = false;
|
||||
|
||||
int shakes(m_shakes.size());
|
||||
int shakes = static_cast<int>(m_shakes.size());
|
||||
for (int i = 0; i < shakes; ++i)
|
||||
{
|
||||
ProcessShake(&m_shakes[i], frameTime);
|
||||
@@ -556,7 +556,7 @@ void CView::ProcessShakeNormal_DoShaking(SShake* pShake, float frameTime)
|
||||
//------------------------------------------------------------------------
|
||||
void CView::StopShake(int shakeID)
|
||||
{
|
||||
uint32 num = m_shakes.size();
|
||||
uint32 num = static_cast<int>(m_shakes.size());
|
||||
for (uint32 i = 0; i < num; ++i)
|
||||
{
|
||||
if (m_shakes[i].ID == shakeID && m_shakes[i].updating)
|
||||
|
||||
@@ -1341,7 +1341,7 @@ bool CXConsole::ProcessInput(const AzFramework::InputChannel& inputChannel)
|
||||
{
|
||||
if (isCtrlModifierActive)
|
||||
{
|
||||
m_nScrollLine = m_dqConsoleBuffer.size() - 1;
|
||||
m_nScrollLine = static_cast<int>(m_dqConsoleBuffer.size() - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1454,7 +1454,7 @@ bool CXConsole::GetLineNo(const int indwLineNo, char* outszBuffer, const int ind
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
int CXConsole::GetLineCount() const
|
||||
{
|
||||
return m_dqConsoleBuffer.size();
|
||||
return static_cast<int>(m_dqConsoleBuffer.size());
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -2675,7 +2675,7 @@ void CXConsole::RemoveOutputPrintSink(IOutputPrintSink* inpSink)
|
||||
{
|
||||
assert(inpSink);
|
||||
|
||||
int nCount = m_OutputSinks.size();
|
||||
int nCount = static_cast<int>(m_OutputSinks.size());
|
||||
|
||||
for (int i = 0; i < nCount; i++)
|
||||
{
|
||||
@@ -2965,7 +2965,7 @@ bool CXConsole::IsHashCalculated()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
int CXConsole::GetNumCheatVars()
|
||||
{
|
||||
return m_randomCheckedVariables.size();
|
||||
return static_cast<int>(m_randomCheckedVariables.size());
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -70,7 +70,7 @@ struct CConsoleCommandArgs
|
||||
CConsoleCommandArgs(string& line, std::vector<string>& args)
|
||||
: m_line(line)
|
||||
, m_args(args) {};
|
||||
virtual int GetArgCount() const { return m_args.size(); };
|
||||
virtual int GetArgCount() const { return static_cast<int>(m_args.size()); };
|
||||
// Get argument by index, nIndex must be in 0 <= nIndex < GetArgCount()
|
||||
virtual const char* GetArg(int nIndex) const
|
||||
{
|
||||
|
||||
@@ -190,8 +190,9 @@ bool SaveArray(const IdTable& idTable, XmlNodeRef& definition, XmlNodeRef& data,
|
||||
}
|
||||
|
||||
bool needIndex = false;
|
||||
for (size_t i = 1; i <= numElems; i++)
|
||||
for (size_t sizei = 1; sizei <= numElems; sizei++)
|
||||
{
|
||||
const int i = static_cast<int>(sizei);
|
||||
if (!childSource->HaveElemAt(i))
|
||||
{
|
||||
needIndex = true;
|
||||
|
||||
@@ -114,26 +114,26 @@ bool XMLBinary::CXMLBinaryWriter::WriteNode(IDataWriter* pFile, XmlNodeRef node,
|
||||
nTheoreticalPosition += sizeof(header);
|
||||
align(nTheoreticalPosition, nAlignment);
|
||||
|
||||
header.nNodeTablePosition = nTheoreticalPosition;
|
||||
header.nNodeTablePosition = static_cast<uint32>(nTheoreticalPosition);
|
||||
header.nNodeCount = int(m_nodes.size());
|
||||
nTheoreticalPosition += header.nNodeCount * sizeof(Node);
|
||||
align(nTheoreticalPosition, nAlignment);
|
||||
|
||||
header.nChildTablePosition = nTheoreticalPosition;
|
||||
header.nChildTablePosition = static_cast<uint32>(nTheoreticalPosition);
|
||||
header.nChildCount = int(m_childs.size());
|
||||
nTheoreticalPosition += header.nChildCount * sizeof(NodeIndex);
|
||||
align(nTheoreticalPosition, nAlignment);
|
||||
|
||||
header.nAttributeTablePosition = nTheoreticalPosition;
|
||||
header.nAttributeTablePosition = static_cast<uint32>(nTheoreticalPosition);
|
||||
header.nAttributeCount = int(m_attributes.size());
|
||||
nTheoreticalPosition += header.nAttributeCount * sizeof(Attribute);
|
||||
align(nTheoreticalPosition, nAlignment);
|
||||
|
||||
header.nStringDataPosition = nTheoreticalPosition;
|
||||
header.nStringDataPosition = static_cast<uint32>(nTheoreticalPosition);
|
||||
header.nStringDataSize = m_nStringDataSize;
|
||||
nTheoreticalPosition += header.nStringDataSize;
|
||||
|
||||
header.nXMLSize = nTheoreticalPosition;
|
||||
header.nXMLSize = static_cast<uint32>(nTheoreticalPosition);
|
||||
|
||||
// Swap endianness of the data structures
|
||||
if (bNeedSwapEndian)
|
||||
@@ -328,7 +328,7 @@ int XMLBinary::CXMLBinaryWriter::AddString(const XmlString& sString)
|
||||
// We don't have such string yet, so we should add it to the tables.
|
||||
m_strings.push_back(sString);
|
||||
itStringEntry = m_stringMap.insert(StringMap::value_type(sString, m_nStringDataSize)).first;
|
||||
m_nStringDataSize += sString.length() + 1;
|
||||
m_nStringDataSize += static_cast<uint>(sString.length() + 1);
|
||||
}
|
||||
|
||||
// Return offset of the string in the string data buffer.
|
||||
|
||||
@@ -91,7 +91,7 @@ XmlNodeRef CXmlUtils::LoadXmlFromFile(const char* sFilename, bool bReuseStrings,
|
||||
XmlNodeRef CXmlUtils::LoadXmlFromBuffer(const char* buffer, size_t size, bool bReuseStrings, bool bSuppressWarnings)
|
||||
{
|
||||
XmlParser parser(bReuseStrings);
|
||||
XmlNodeRef node = parser.ParseBuffer(buffer, size, true, bSuppressWarnings);
|
||||
XmlNodeRef node = parser.ParseBuffer(buffer, static_cast<int>(size), true, bSuppressWarnings);
|
||||
return node;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ const char* CXmlUtils::HashXml(XmlNodeRef node)
|
||||
static char temp[16];
|
||||
static const char* hex = "0123456789abcdef";
|
||||
XmlString str = node->getXML();
|
||||
GetMD5(str.data(), str.length(), temp);
|
||||
GetMD5(str.data(), static_cast<int>(str.length()), temp);
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
signature[2 * i + 0] = hex[((uint8)temp[i]) >> 4];
|
||||
|
||||
@@ -655,7 +655,7 @@ XmlNodeRef CXmlNode::findChild(const char* tag) const
|
||||
if (m_pChilds)
|
||||
{
|
||||
XmlNodes& childs = *m_pChilds;
|
||||
for (int i = 0, num = childs.size(); i < num; ++i)
|
||||
for (int i = 0, num = static_cast<int>(childs.size()); i < num; ++i)
|
||||
{
|
||||
if (childs[i]->isTag(tag))
|
||||
{
|
||||
@@ -690,7 +690,7 @@ void CXmlNode::deleteChild(const char* tag)
|
||||
if (m_pChilds)
|
||||
{
|
||||
XmlNodes& childs = *m_pChilds;
|
||||
for (int i = 0, num = childs.size(); i < num; ++i)
|
||||
for (int i = 0, num = static_cast<int>(childs.size()); i < num; ++i)
|
||||
{
|
||||
if (childs[i]->isTag(tag))
|
||||
{
|
||||
@@ -913,7 +913,7 @@ XmlNodeRef CXmlNode::clone()
|
||||
|
||||
node->m_pChilds = new XmlNodes;
|
||||
node->m_pChilds->reserve(childs.size());
|
||||
for (int i = 0, num = childs.size(); i < num; ++i)
|
||||
for (int i = 0, num = static_cast<int>(childs.size()); i < num; ++i)
|
||||
{
|
||||
node->addChild(childs[i]->clone());
|
||||
}
|
||||
@@ -956,7 +956,7 @@ static void AddTabsToString(XmlString& xml, int level)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CXmlNode::IsValidXmlString(const char* str) const
|
||||
{
|
||||
int len = strlen(str);
|
||||
int len = static_cast<int>(strlen(str));
|
||||
|
||||
{
|
||||
// Prevents invalid characters not from standard ASCII set to propagate to xml.
|
||||
@@ -1432,7 +1432,7 @@ protected:
|
||||
void XmlParserImp::CleanStack()
|
||||
{
|
||||
m_nNodeStackTop = 0;
|
||||
for (int i = 0, num = m_nodeStack.size(); i < num; i++)
|
||||
for (int i = 0, num = static_cast<int>(m_nodeStack.size()); i < num; i++)
|
||||
{
|
||||
m_nodeStack[i].node = 0;
|
||||
m_nodeStack[i].childs.resize(0);
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace AssetBundler
|
||||
for (const AZStd::string_view& platformString : m_platformHelper->GetPlatforms(PlatformFlags::AllNamedPlatforms))
|
||||
{
|
||||
// Create the CheckBox and store what platform it maps to
|
||||
QSharedPointer<QCheckBox> platformCheckBox(new QCheckBox(QString::fromUtf8(platformString.data(), platformString.size())));
|
||||
QSharedPointer<QCheckBox> platformCheckBox(new QCheckBox(QString::fromUtf8(platformString.data(), static_cast<int>(platformString.size()))));
|
||||
m_platformCheckBoxes.push_back(platformCheckBox);
|
||||
PlatformFlags currentPlatformFlag = m_platformHelper->GetPlatformFlag(platformString);
|
||||
m_platformList.push_back(currentPlatformFlag);
|
||||
|
||||
@@ -88,7 +88,7 @@ Please note that only those seed files will get updated that are active for your
|
||||
{
|
||||
scanFolderInfo = nullptr;
|
||||
bool isRelative = AzFramework::StringFunc::Path::IsRelative(normalizedSource.c_str());
|
||||
|
||||
|
||||
if (isRelative)
|
||||
{
|
||||
// Relative paths can match multiple files/folders, search each scan folder for a valid match
|
||||
@@ -264,7 +264,7 @@ Please note that only those seed files will get updated that are active for your
|
||||
metaDataFile.m_sourceFileIndex = sourceFileIndex.value();
|
||||
metadataFiles.emplace_back(metaDataFile);
|
||||
metaDataFileEntries.insert(metadaFileCorrectCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -601,7 +601,7 @@ Please note that only those seed files will get updated that are active for your
|
||||
AZ::StringFunc::Path::ReplaceFullName(newDestinationPath, fullFileName.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (!AzFramework::StringFunc::Path::IsRelative(newDestinationPath.c_str()))
|
||||
{
|
||||
@@ -1025,14 +1025,14 @@ Please note that only those seed files will get updated that are active for your
|
||||
AZStd::binary_semaphore waitSignal;
|
||||
int errorCount = 0;
|
||||
|
||||
AzToolsFramework::SourceControlResponseCallbackBulk callback = AZStd::bind(&HandleSourceControlResult,
|
||||
AZStd::ref (relocationContainer),
|
||||
AZStd::ref(waitSignal),
|
||||
AZStd::ref(errorCount),
|
||||
static_cast<AzToolsFramework::SourceControlFlags>(SCF_OpenByUser), // If a file is moved from A -> B and then again from B -> A, the result is just an "edit", so we're just going to assume success if the file is checked out, regardless of state
|
||||
true,
|
||||
AZStd::placeholders::_1,
|
||||
AZStd::placeholders::_2);
|
||||
AzToolsFramework::SourceControlResponseCallbackBulk callback = [&](bool success, AZStd::vector<SourceControlFileInfo> info)
|
||||
{
|
||||
HandleSourceControlResult(
|
||||
relocationContainer, waitSignal, errorCount,
|
||||
SCF_OpenByUser, // If a file is moved from A -> B and then again from B -> A, the result is just an "edit", so we're just going
|
||||
// to assume success if the file is checked out, regardless of state
|
||||
true, success, info);
|
||||
};
|
||||
|
||||
|
||||
AzToolsFramework::SourceControlCommandBus::Broadcast(&AzToolsFramework::SourceControlCommandBus::Events::RequestRenameBulkExtended,
|
||||
@@ -1049,7 +1049,7 @@ Please note that only those seed files will get updated that are active for your
|
||||
{
|
||||
if (relocationInfo.m_operationStatus == SourceFileRelocationStatus::Succeeded || relocationInfo.m_sourceFileIndex == AssetProcessor::SourceFileRelocationInvalidIndex)
|
||||
{
|
||||
// we do not want to retry if the move operation already succeeded or if it is a source file
|
||||
// we do not want to retry if the move operation already succeeded or if it is a source file
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1108,7 +1108,7 @@ Please note that only those seed files will get updated that are active for your
|
||||
{
|
||||
if (entry.m_operationStatus == SourceFileRelocationStatus::Succeeded || entry.m_sourceFileIndex == AssetProcessor::SourceFileRelocationInvalidIndex)
|
||||
{
|
||||
// we do not want to retry if the move operation already succeeded or if it is a source file
|
||||
// we do not want to retry if the move operation already succeeded or if it is a source file
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1224,7 +1224,7 @@ Please note that only those seed files will get updated that are active for your
|
||||
m_stateData->QuerySourceByProductID(productDependency.m_productPK, [this, &sourceName, &scanPath](AzToolsFramework::AssetDatabase::SourceDatabaseEntry& entry)
|
||||
{
|
||||
sourceName = entry.m_sourceName;
|
||||
|
||||
|
||||
m_stateData->QueryScanFolderByScanFolderID(entry.m_scanFolderPK, [&scanPath](AzToolsFramework::AssetDatabase::ScanFolderDatabaseEntry& entry)
|
||||
{
|
||||
scanPath = entry.m_scanFolder;
|
||||
|
||||
@@ -322,7 +322,7 @@ namespace AssetProcessor
|
||||
executableDirectory /= ASSETPROCESSOR_TRAIT_LEGACY_RC_RELATIVE_PATH;
|
||||
if (AZ::IO::SystemFile::Exists(executableDirectory.c_str()))
|
||||
{
|
||||
rcAbsolutePathOut = QString::fromUtf8(executableDirectory.c_str(), executableDirectory.Native().size());
|
||||
rcAbsolutePathOut = QString::fromUtf8(executableDirectory.c_str(), static_cast<int>(executableDirectory.Native().size()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ bool SRemoteServer::ReadBuffer(const char* buffer, int data)
|
||||
}
|
||||
|
||||
// Advance to the next null terminated string in the buffer
|
||||
const int currentSize = strnlen(curBuffer, bytesRemaining);
|
||||
const int currentSize = static_cast<int>(strnlen(curBuffer, bytesRemaining));
|
||||
bytesRemaining -= currentSize + 1;
|
||||
curBuffer += currentSize + 1;
|
||||
}
|
||||
@@ -466,7 +466,7 @@ void SRemoteClient::FillAutoCompleteList(AZStd::vector<AZStd::string>& list)
|
||||
AZStd::string item = "map ";
|
||||
const char* levelName = pLevel->GetName();
|
||||
int start = 0;
|
||||
for (int k = 0, kend = strlen(levelName); k < kend; ++k)
|
||||
for (int k = 0, kend = static_cast<int>(strlen(levelName)); k < kend; ++k)
|
||||
{
|
||||
if ((levelName[k] == '\\' || levelName[k] == '/') && k + 1 < kend)
|
||||
{
|
||||
|
||||
@@ -634,21 +634,21 @@ namespace AZ
|
||||
AZStd::shared_ptr<SceneData::GraphData::BlendShapeAnimationData> morphAnimNode =
|
||||
AZStd::make_shared<SceneData::GraphData::BlendShapeAnimationData>();
|
||||
|
||||
const size_t numKeyFrames = GetNumKeyFrames(keys.size(), animation->mDuration, animation->mTicksPerSecond);
|
||||
const size_t numKeyFrames = GetNumKeyFrames(static_cast<AZ::u32>(keys.size()), animation->mDuration, animation->mTicksPerSecond);
|
||||
morphAnimNode->ReserveKeyFrames(numKeyFrames);
|
||||
morphAnimNode->SetTimeStepBetweenFrames(s_defaultTimeStepBetweenFrames);
|
||||
|
||||
aiAnimMesh* aiAnimMesh = mesh->mAnimMeshes[meshIdx];
|
||||
AZStd::string_view nodeName(aiAnimMesh->mName.C_Str());
|
||||
|
||||
const AZ::u32 maxKeys = keys.size();
|
||||
const AZ::u32 maxKeys = static_cast<AZ::u32>(keys.size());
|
||||
AZ::u32 keyIdx = 0;
|
||||
for (AZ::u32 frame = 0; frame < numKeyFrames; ++frame)
|
||||
{
|
||||
const double time = GetTimeForFrame(frame, animation->mTicksPerSecond);
|
||||
|
||||
float weight = 0;
|
||||
if (!SampleKeyFrame(weight, keys, keys.size(), time + keyOffset, keyIdx))
|
||||
if (!SampleKeyFrame(weight, keys, static_cast<AZ::u32>(keys.size()), time + keyOffset, keyIdx))
|
||||
{
|
||||
return Events::ProcessingResult::Failure;
|
||||
}
|
||||
|
||||
+2
-2
@@ -50,8 +50,8 @@ namespace TestImpact
|
||||
AZStd::vector<AZStd::string> coveringTests;
|
||||
sourceCoveringTests.reserve(1U << 16); // Reserve for approx. 65k source files
|
||||
const AZStd::string delim = "\n";
|
||||
auto start = 0U;
|
||||
auto end = sourceCoveringTestsListString.find(delim);
|
||||
size_t start = 0U;
|
||||
size_t end = sourceCoveringTestsListString.find(delim);
|
||||
|
||||
while (end != AZStd::string::npos)
|
||||
{
|
||||
|
||||
@@ -43,8 +43,7 @@ namespace AWSCore
|
||||
|
||||
if (urlSections.size() > ExpectedUrlSections)
|
||||
{
|
||||
int i;
|
||||
i = urlSections[ExpectedUrlSections - 1].find('.');
|
||||
int i = static_cast<int>(urlSections[ExpectedUrlSections - 1].find('.'));
|
||||
if (i != -1)
|
||||
{
|
||||
// Handle APIGateway URLs with custom domains:
|
||||
|
||||
@@ -391,7 +391,7 @@ namespace AWSCore
|
||||
int offset = 0;
|
||||
while (offset < message.size())
|
||||
{
|
||||
int count = (offset + MAX_MESSAGE_LENGTH < message.size()) ? MAX_MESSAGE_LENGTH : message.size() - offset;
|
||||
int count = static_cast<int>((offset + MAX_MESSAGE_LENGTH < message.size()) ? MAX_MESSAGE_LENGTH : message.size() - offset);
|
||||
AZ_Warning(ServiceClientJobType::COMPONENT_DISPLAY_NAME, false, message.substr(offset, count).c_str());
|
||||
offset += MAX_MESSAGE_LENGTH;
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ namespace AWSCore
|
||||
msg += AZStd::string::format(" at character %zu: ", result.Offset());
|
||||
|
||||
const int snippet_size = 40;
|
||||
int start = result.Offset() - snippet_size / 2;
|
||||
int start = static_cast<int>(result.Offset() - snippet_size / 2);
|
||||
int length = snippet_size;
|
||||
int offset = snippet_size / 2;
|
||||
if (start < 0) {
|
||||
|
||||
@@ -51,7 +51,7 @@ protected:
|
||||
|
||||
TEST_F(AWSScriptBehaviorsComponentTest, Reflect)
|
||||
{
|
||||
int oldEBusNum = m_behaviorContext->m_ebuses.size();
|
||||
int oldEBusNum = static_cast<int>(m_behaviorContext->m_ebuses.size());
|
||||
m_componentDescriptor.reset(AWSScriptBehaviorsComponent::CreateDescriptor());
|
||||
m_componentDescriptor->Reflect(m_serializeContext.get());
|
||||
m_componentDescriptor->Reflect(m_behaviorContext.get());
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace AWSMetrics
|
||||
|
||||
int MetricsEvent::GetNumAttributes() const
|
||||
{
|
||||
return m_attributes.size();
|
||||
return static_cast<int>(m_attributes.size());
|
||||
}
|
||||
|
||||
size_t MetricsEvent::GetSizeInBytes() const
|
||||
|
||||
@@ -256,7 +256,7 @@ namespace AWSMetrics
|
||||
}
|
||||
|
||||
m_globalStats.m_numSuccesses++;
|
||||
m_globalStats.m_sendSizeInBytes += metricsEvent.GetSizeInBytes();
|
||||
m_globalStats.m_sendSizeInBytes += static_cast<uint32_t>(metricsEvent.GetSizeInBytes());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace AWSMetrics
|
||||
|
||||
int MetricsQueue::GetNumMetrics() const
|
||||
{
|
||||
return m_metrics.size();
|
||||
return static_cast<int>(m_metrics.size());
|
||||
}
|
||||
|
||||
size_t MetricsQueue::GetSizeInBytes() const
|
||||
@@ -175,7 +175,7 @@ namespace AWSMetrics
|
||||
MetricsEvent& curEvent = m_metrics.front();
|
||||
|
||||
curNum += 1;
|
||||
curSizeInBytes += curEvent.GetSizeInBytes();
|
||||
curSizeInBytes += static_cast<int>(curEvent.GetSizeInBytes());
|
||||
if (curNum <= maxBatchedRecordsCount && curSizeInBytes <= maxPayloadSizeInBytes)
|
||||
{
|
||||
m_sizeSerializedToJson -= curEvent.GetSizeInBytes();
|
||||
|
||||
@@ -452,7 +452,7 @@ namespace AWSMetrics
|
||||
EXPECT_EQ(stats.m_numErrors, MaxNumMetricsEvents / 2);
|
||||
EXPECT_EQ(stats.m_numDropped, 0);
|
||||
|
||||
int metricsEventSize = sizeof(AwsMetricsAttributeKeyEventName) - 1 + strlen(AttrValue);
|
||||
int metricsEventSize = static_cast<int>(sizeof(AwsMetricsAttributeKeyEventName) - 1 + strlen(AttrValue));
|
||||
EXPECT_EQ(stats.m_sendSizeInBytes, metricsEventSize * MaxNumMetricsEvents / 2);
|
||||
|
||||
ASSERT_EQ(m_metricsManager->GetNumBufferedMetrics(), MaxNumMetricsEvents / 2);
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace AWSMetrics
|
||||
queue.AddMetrics(metrics);
|
||||
}
|
||||
|
||||
int maxCapacity = queue[0].GetSizeInBytes() * NumTestMetrics / 2;
|
||||
int maxCapacity = static_cast<int>(queue[0].GetSizeInBytes() * NumTestMetrics / 2);
|
||||
|
||||
ASSERT_EQ(queue.FilterMetricsByPriority(maxCapacity), NumTestMetrics / 2);
|
||||
ASSERT_EQ(queue.GetNumMetrics(), NumTestMetrics / 2);
|
||||
@@ -230,7 +230,7 @@ namespace AWSMetrics
|
||||
{
|
||||
MetricsEvent metrics;
|
||||
metrics.AddAttribute(MetricsAttribute(AttrName, AttrValue));
|
||||
int sizeOfEachMetrics = metrics.GetSizeInBytes();
|
||||
int sizeOfEachMetrics = static_cast<int>(metrics.GetSizeInBytes());
|
||||
|
||||
MetricsQueue queue;
|
||||
queue.AddMetrics(metrics);
|
||||
|
||||
@@ -201,13 +201,13 @@ namespace AssetMemoryAnalyzer
|
||||
{
|
||||
case AllocationCategories::HEAP:
|
||||
ImGui::Text(FormatUtils::FormatCodePoint(*ap->m_codePoint));
|
||||
heapSummary.m_allocationCount = ap->m_allocations.size();
|
||||
heapSummary.m_allocationCount = static_cast<uint32_t>(ap->m_allocations.size());
|
||||
heapSummary.m_allocatedMemory = ap->m_totalAllocatedMemory;
|
||||
break;
|
||||
|
||||
case AllocationCategories::VRAM:
|
||||
ImGui::Text("%s", ap->m_codePoint->m_file);
|
||||
vramSummary.m_allocationCount = ap->m_allocations.size();
|
||||
vramSummary.m_allocationCount = static_cast<uint32_t>(ap->m_allocations.size());
|
||||
vramSummary.m_allocatedMemory = ap->m_totalAllocatedMemory;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace AssetMemoryAnalyzer
|
||||
writer.StartObject();
|
||||
|
||||
writer.Key("id");
|
||||
writer.Int(idCounter++);
|
||||
writer.Int(static_cast<int>(idCounter++));
|
||||
|
||||
writer.Key("label");
|
||||
writer.String(asset.m_id ? asset.m_id : "Root");
|
||||
@@ -98,7 +98,7 @@ namespace AssetMemoryAnalyzer
|
||||
{
|
||||
writer.StartObject();
|
||||
writer.Key("id");
|
||||
writer.Int(idCounter++);
|
||||
writer.Int(static_cast<int>(idCounter++));
|
||||
|
||||
writer.Key("label");
|
||||
writer.String("<local allocations>");
|
||||
@@ -119,7 +119,7 @@ namespace AssetMemoryAnalyzer
|
||||
|
||||
writer.StartObject();
|
||||
writer.Key("id");
|
||||
writer.Int(idCounter++);
|
||||
writer.Int(static_cast<int>(idCounter++));
|
||||
|
||||
writer.Key("label");
|
||||
|
||||
@@ -127,13 +127,13 @@ namespace AssetMemoryAnalyzer
|
||||
{
|
||||
case AllocationCategories::HEAP:
|
||||
writer.String(FormatUtils::FormatCodePoint(*ap.m_codePoint));
|
||||
heapSummary.m_allocationCount = ap.m_allocations.size();
|
||||
heapSummary.m_allocationCount = static_cast<uint32_t>(ap.m_allocations.size());
|
||||
heapSummary.m_allocatedMemory = ap.m_totalAllocatedMemory;
|
||||
break;
|
||||
|
||||
case AllocationCategories::VRAM:
|
||||
writer.String(ap.m_codePoint->m_file);
|
||||
vramSummary.m_allocationCount = ap.m_allocations.size();
|
||||
vramSummary.m_allocationCount = static_cast<uint32_t>(ap.m_allocations.size());
|
||||
vramSummary.m_allocatedMemory = ap.m_totalAllocatedMemory;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -196,13 +196,13 @@ namespace AZ
|
||||
{
|
||||
const size_t sourceByteSize = source.size() * sizeof(AuxGeomIndex);
|
||||
|
||||
RHI::Ptr<RPI::DynamicBuffer> dynamicBuffer = RPI::DynamicDrawInterface::Get()->GetDynamicBuffer(sourceByteSize);
|
||||
RHI::Ptr<RPI::DynamicBuffer> dynamicBuffer = RPI::DynamicDrawInterface::Get()->GetDynamicBuffer(static_cast<uint32_t>(sourceByteSize));
|
||||
if (!dynamicBuffer)
|
||||
{
|
||||
AZ_WarningOnce("AuxGeom", false, "Failed to allocate dynamic buffer of size %d.", sourceByteSize);
|
||||
return false;
|
||||
}
|
||||
dynamicBuffer->Write(source.data(), sourceByteSize);
|
||||
}
|
||||
dynamicBuffer->Write(source.data(), static_cast<uint32_t>(sourceByteSize));
|
||||
group.m_indexBufferView = dynamicBuffer->GetIndexBufferView(RHI::IndexFormat::Uint32);
|
||||
return true;
|
||||
}
|
||||
@@ -211,13 +211,13 @@ namespace AZ
|
||||
{
|
||||
const size_t sourceByteSize = source.size() * sizeof(AuxGeomDynamicVertex);
|
||||
|
||||
RHI::Ptr<RPI::DynamicBuffer> dynamicBuffer = RPI::DynamicDrawInterface::Get()->GetDynamicBuffer(sourceByteSize);
|
||||
RHI::Ptr<RPI::DynamicBuffer> dynamicBuffer = RPI::DynamicDrawInterface::Get()->GetDynamicBuffer(static_cast<uint32_t>(sourceByteSize));
|
||||
if (!dynamicBuffer)
|
||||
{
|
||||
AZ_WarningOnce("AuxGeom", false, "Failed to allocate dynamic buffer of size %d.", sourceByteSize);
|
||||
return false;
|
||||
}
|
||||
dynamicBuffer->Write(source.data(), sourceByteSize);
|
||||
}
|
||||
dynamicBuffer->Write(source.data(), static_cast<uint32_t>(sourceByteSize));
|
||||
group.m_streamBufferViews[0] = dynamicBuffer->GetStreamBufferView(sizeof(AuxGeomDynamicVertex));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace AZ::Render
|
||||
// individual point as its own element instead of each array being its own element. Since all
|
||||
// the arrays are stored in a contiguous vector, we can treat it as one giant array.
|
||||
const LightPosition* firstPosition = m_polygonLightData.GetDataVector<1>().at(0).data();
|
||||
m_lightPolygonPointBufferHandler.UpdateBuffer(firstPosition, m_polygonLightData.GetDataCount() * MaxPolygonPoints);
|
||||
m_lightPolygonPointBufferHandler.UpdateBuffer(firstPosition, static_cast<uint32_t>(m_polygonLightData.GetDataCount() * MaxPolygonPoints));
|
||||
}
|
||||
m_deviceBufferNeedsUpdate = false;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace AZ
|
||||
|
||||
AZ::JobCompletion jobCompletion;
|
||||
const int numThreads = 8;
|
||||
const int numPixelsPerThread = buffer->size() / numChannels / numThreads;
|
||||
const int numPixelsPerThread = static_cast<int>(buffer->size() / numChannels / numThreads);
|
||||
for (int i = 0; i < numThreads; ++i)
|
||||
{
|
||||
int startPixel = i * numPixelsPerThread;
|
||||
|
||||
@@ -162,7 +162,7 @@ namespace AZ
|
||||
m_rootConstantData.SetConstant(colorOffsetIndex, m_morphInstanceMetaData.m_accumulatedColorDeltaOffsetInBytes / 4);
|
||||
}
|
||||
|
||||
m_dispatchItem.m_rootConstantSize = m_rootConstantData.GetConstantData().size();
|
||||
m_dispatchItem.m_rootConstantSize = static_cast<uint8_t>(m_rootConstantData.GetConstantData().size());
|
||||
m_dispatchItem.m_rootConstants = m_rootConstantData.GetConstantData().data();
|
||||
}
|
||||
|
||||
|
||||
@@ -497,7 +497,7 @@ namespace AZ::Render
|
||||
const ShadowmapAtlas& atlas = m_projectedShadowmapsPasses.front()->GetShadowmapAtlas();
|
||||
const Data::Instance<RPI::Buffer> indexTableBuffer = atlas.CreateShadowmapIndexTableBuffer(indexTableBufferName);
|
||||
|
||||
m_filterParamBufferHandler.UpdateBuffer(m_shadowData.GetRawData<FilterParamIndex>(), m_shadowData.GetSize());
|
||||
m_filterParamBufferHandler.UpdateBuffer(m_shadowData.GetRawData<FilterParamIndex>(), static_cast<uint32_t>(m_shadowData.GetSize()));
|
||||
|
||||
// Set index table buffer and ESM parameter buffer to ESM pass.
|
||||
for (EsmShadowmapsPass* esmPass : m_esmShadowmapsPasses)
|
||||
@@ -564,7 +564,7 @@ namespace AZ::Render
|
||||
|
||||
if (m_deviceBufferNeedsUpdate)
|
||||
{
|
||||
m_shadowBufferHandler.UpdateBuffer(m_shadowData.GetRawData<ShadowDataIndex>(), m_shadowData.GetSize());
|
||||
m_shadowBufferHandler.UpdateBuffer(m_shadowData.GetRawData<ShadowDataIndex>(), static_cast<uint32_t>(m_shadowData.GetSize()));
|
||||
m_deviceBufferNeedsUpdate = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ namespace AZ
|
||||
|
||||
// Positions start at the beginning of the allocation
|
||||
instanceMetaData.m_accumulatedPositionDeltaOffsetInBytes = allocation->GetVirtualAddress().m_ptr;
|
||||
uint32_t deltaStreamSizeInBytes = vertexCount * MorphTargetConstants::s_unpackedMorphTargetDeltaSizeInBytes;
|
||||
uint32_t deltaStreamSizeInBytes = static_cast<uint32_t>(vertexCount * MorphTargetConstants::s_unpackedMorphTargetDeltaSizeInBytes);
|
||||
|
||||
// Followed by normals, tangents, and bitangents
|
||||
instanceMetaData.m_accumulatedNormalDeltaOffsetInBytes = instanceMetaData.m_accumulatedPositionDeltaOffsetInBytes + deltaStreamSizeInBytes;
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace UnitTest
|
||||
EXPECT_EQ(data.c, TestData::DefaultValueC);
|
||||
|
||||
// Assign new unique values
|
||||
data.a = TestData::DefaultValueA * i;
|
||||
data.a = TestData::DefaultValueA * static_cast<int>(i);
|
||||
data.b = TestData::DefaultValueB * float(i);
|
||||
data.c = i % 2 == 0;
|
||||
}
|
||||
@@ -190,12 +190,12 @@ namespace UnitTest
|
||||
EXPECT_EQ(data.b, TestData::DefaultValueB);
|
||||
EXPECT_EQ(data.c, TestData::DefaultValueC);
|
||||
|
||||
data.a = TestData::DefaultValueA * i;
|
||||
data.a = TestData::DefaultValueA * static_cast<int>(i);
|
||||
data.b = TestData::DefaultValueB * float(i);
|
||||
data.c = i % 2 == 0;
|
||||
|
||||
// Assign some values to the uninitialized primitive types
|
||||
container.GetElement<1>(indices[i]) = i * 10;
|
||||
container.GetElement<1>(indices[i]) = static_cast<int>(i * 10);
|
||||
container.GetElement<2>(indices[i]) = i * 20.0f;
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ namespace UnitTest
|
||||
{
|
||||
indices[i] = container.Reserve();
|
||||
|
||||
container.GetElement<1>(i) = i * 10;
|
||||
container.GetElement<1>(i) = static_cast<int>(i * 10);
|
||||
container.GetElement<2>(i) = i * 20.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace AZ
|
||||
bool isValidAll = true;
|
||||
for (size_t i = 0; i < imageViews.size(); ++i)
|
||||
{
|
||||
const bool isValid = ValidateImageViewAccess<ShaderInputImageUnboundedArrayIndex, ShaderInputImageUnboundedArrayDescriptor>(inputIndex, imageViews[i], i);
|
||||
const bool isValid = ValidateImageViewAccess<ShaderInputImageUnboundedArrayIndex, ShaderInputImageUnboundedArrayDescriptor>(inputIndex, imageViews[i], static_cast<uint32_t>(i));
|
||||
if (isValid)
|
||||
{
|
||||
m_imageViewsUnboundedArray.push_back(imageViews[i]);
|
||||
@@ -185,7 +185,7 @@ namespace AZ
|
||||
bool isValidAll = true;
|
||||
for (size_t i = 0; i < bufferViews.size(); ++i)
|
||||
{
|
||||
const bool isValid = ValidateBufferViewAccess<ShaderInputBufferUnboundedArrayIndex, ShaderInputBufferUnboundedArrayDescriptor>(inputIndex, bufferViews[i], i);
|
||||
const bool isValid = ValidateBufferViewAccess<ShaderInputBufferUnboundedArrayIndex, ShaderInputBufferUnboundedArrayDescriptor>(inputIndex, bufferViews[i], static_cast<uint32_t>(i));
|
||||
if (isValid)
|
||||
{
|
||||
m_bufferViewsUnboundedArray.push_back(bufferViews[i]);
|
||||
|
||||
@@ -356,7 +356,7 @@ namespace AZ
|
||||
|
||||
if (!bufferViews.empty())
|
||||
{
|
||||
group.m_unboundedDescriptorTables[tableIndex] = m_descriptorContext->CreateDescriptorTable(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, bufferViews.size());
|
||||
group.m_unboundedDescriptorTables[tableIndex] = m_descriptorContext->CreateDescriptorTable(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, static_cast<uint32_t>(bufferViews.size()));
|
||||
AZ_Assert(group.m_unboundedDescriptorTables[tableIndex].IsValid(), "Descriptor context failed to allocate unbounded array descriptor table, most likely out of memory.");
|
||||
|
||||
ShaderResourceGroupCompiledData& compiledData = group.m_compiledData[group.m_compiledDataIndex];
|
||||
@@ -415,7 +415,7 @@ namespace AZ
|
||||
|
||||
if (!imageViews.empty())
|
||||
{
|
||||
group.m_unboundedDescriptorTables[tableIndex] = m_descriptorContext->CreateDescriptorTable(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, imageViews.size());
|
||||
group.m_unboundedDescriptorTables[tableIndex] = m_descriptorContext->CreateDescriptorTable(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, static_cast<uint32_t>(imageViews.size()));
|
||||
AZ_Assert(group.m_unboundedDescriptorTables[tableIndex].IsValid(), "Descriptor context failed to allocate unbounded array descriptor table, most likely out of memory.");
|
||||
|
||||
ShaderResourceGroupCompiledData& compiledData = group.m_compiledData[group.m_compiledDataIndex];
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user