diff --git a/Gems/AWSCore/Code/Source/Framework/HttpRequestJob.cpp b/Gems/AWSCore/Code/Source/Framework/HttpRequestJob.cpp index 7c41695fe1..7c9ec045e9 100644 --- a/Gems/AWSCore/Code/Source/Framework/HttpRequestJob.cpp +++ b/Gems/AWSCore/Code/Source/Framework/HttpRequestJob.cpp @@ -42,7 +42,7 @@ namespace AWSCore // This will run the code fed to the macro, and then assign 0 to a static int (note the ,0 at the end) #define AWS_CORE_ONCE_PASTE(x) (x) -#define AWS_CORE_ONCE(x) static [[maybe_unused]] int AZ_JOIN(init, __LINE__)((AWS_CORE_ONCE_PASTE(x), 0)) +#define AWS_CORE_ONCE(x) [[maybe_unused]] static int AZ_JOIN(init, __LINE__)((AWS_CORE_ONCE_PASTE(x), 0)) #define AWS_CORE_HTTP_METHOD_ENTRY(x) { HttpRequestJob::HttpMethod::HTTP_##x, HttpMethodInfo{ Aws::Http::HttpMethod::HTTP_##x, #x } } diff --git a/Gems/AWSMetrics/Code/Tests/MetricsManagerTest.cpp b/Gems/AWSMetrics/Code/Tests/MetricsManagerTest.cpp index 2d9990ad1e..3f87a1079d 100644 --- a/Gems/AWSMetrics/Code/Tests/MetricsManagerTest.cpp +++ b/Gems/AWSMetrics/Code/Tests/MetricsManagerTest.cpp @@ -290,7 +290,7 @@ namespace AWSMetrics for (int index = 0; index < MaxNumMetricsEvents; ++index) { - producers.emplace_back(AZStd::thread([this, index]() + producers.emplace_back(AZStd::thread([index]() { AZStd::vector metricsAttributes; metricsAttributes.emplace_back(AZStd::move(MetricsAttribute(AwsMetricsAttributeKeyEventName, AttrValue))); diff --git a/Gems/Atom/Component/DebugCamera/Code/Source/CameraComponent.cpp b/Gems/Atom/Component/DebugCamera/Code/Source/CameraComponent.cpp index 217cf0f061..ca62918aa3 100644 --- a/Gems/Atom/Component/DebugCamera/Code/Source/CameraComponent.cpp +++ b/Gems/Atom/Component/DebugCamera/Code/Source/CameraComponent.cpp @@ -257,8 +257,8 @@ namespace AZ void CameraComponent::OnViewportResized(uint32_t width, uint32_t height) { - AZ_UNUSED(width) - AZ_UNUSED(height) + AZ_UNUSED(width); + AZ_UNUSED(height); UpdateAspectRatio(); UpdateViewToClipMatrix(); } diff --git a/Gems/AudioEngineWwise/Code/Source/Engine/AudioSystemImpl_wwise.cpp b/Gems/AudioEngineWwise/Code/Source/Engine/AudioSystemImpl_wwise.cpp index 738806a912..56f4fd879a 100644 --- a/Gems/AudioEngineWwise/Code/Source/Engine/AudioSystemImpl_wwise.cpp +++ b/Gems/AudioEngineWwise/Code/Source/Engine/AudioSystemImpl_wwise.cpp @@ -1779,8 +1779,8 @@ namespace Audio AK::MemoryMgr::CategoryStats categoryStats; AK::MemoryMgr::GetCategoryStats(memInfo.m_poolId, categoryStats); - memInfo.m_memoryUsed = categoryStats.uUsed; - memInfo.m_peakUsed = categoryStats.uPeakUsed; + memInfo.m_memoryUsed = static_cast(categoryStats.uUsed); + memInfo.m_peakUsed = static_cast(categoryStats.uPeakUsed); memInfo.m_numAllocs = categoryStats.uAllocs; memInfo.m_numFrees = categoryStats.uFrees; } @@ -1789,9 +1789,9 @@ namespace Audio AK::MemoryMgr::GetGlobalStats(globalStats); auto& memInfo = m_debugMemoryInfo.back(); - memInfo.m_memoryReserved = globalStats.uReserved; - memInfo.m_memoryUsed = globalStats.uUsed; - memInfo.m_peakUsed = globalStats.uMax; + memInfo.m_memoryReserved = static_cast(globalStats.uReserved); + memInfo.m_memoryUsed = static_cast(globalStats.uUsed); + memInfo.m_peakUsed = static_cast(globalStats.uMax); // return the memory infos... return m_debugMemoryInfo; diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/Attachment.h b/Gems/EMotionFX/Code/EMotionFX/Source/Attachment.h index 67a62ac7f6..d2cd9cdc6f 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/Attachment.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/Attachment.h @@ -63,7 +63,7 @@ namespace EMotionFX * This can be implemented for say skin attachments, which copy over joint transforms from the actor instance they are attached to. * @param outPose The pose that will be modified. */ - virtual void UpdateJointTransforms(Pose& outPose) { AZ_UNUSED(outPose) }; + virtual void UpdateJointTransforms(Pose& outPose) { AZ_UNUSED(outPose); }; /** * Get the actor instance object of the attachment. diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/RagdollInstance.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/RagdollInstance.cpp index b139133c49..426f6da473 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/RagdollInstance.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/RagdollInstance.cpp @@ -433,7 +433,6 @@ namespace EMotionFX } const EMotionFX::TransformData* transformData = m_actorInstance->GetTransformData(); - const size_t transformCount = transformData->GetNumTransforms(); const EMotionFX::Skeleton* skeleton = m_actorInstance->GetActor()->GetSkeleton(); const size_t jointCount = skeleton->GetNumNodes(); @@ -498,7 +497,6 @@ namespace EMotionFX const AZ::Vector3 currentPos = currentNodeState.m_position; const AZ::Vector3 currentParentPos = currentParentJointPose.m_position; - const Physics::RagdollNodeState& targetJointPose = ragdollTargetPose[ragdollJointIndex.GetValue()]; const Physics::RagdollNodeState& targetParentJointPose = ragdollTargetPose[ragdollParentJointIndex.GetValue()]; if (targetParentJointPose.m_simulationType == Physics::SimulationType::Dynamic) diff --git a/Gems/EMotionFX/Code/Source/Editor/Plugins/SimulatedObject/SimulatedJointWidget.cpp b/Gems/EMotionFX/Code/Source/Editor/Plugins/SimulatedObject/SimulatedJointWidget.cpp index 4dd8b94303..1e35a084fa 100644 --- a/Gems/EMotionFX/Code/Source/Editor/Plugins/SimulatedObject/SimulatedJointWidget.cpp +++ b/Gems/EMotionFX/Code/Source/Editor/Plugins/SimulatedObject/SimulatedJointWidget.cpp @@ -441,8 +441,8 @@ namespace EMotionFX void SimulatedJointWidget::UpdateDetailsView(const QItemSelection& selected, const QItemSelection& deselected) { - AZ_UNUSED(selected) - AZ_UNUSED(deselected) + AZ_UNUSED(selected); + AZ_UNUSED(deselected); const SimulatedObjectModel* model = m_plugin->GetSimulatedObjectModel(); const QItemSelectionModel* selectionModel = model->GetSelectionModel(); diff --git a/Gems/EMotionFX/Code/Tests/AnimGraphCopyPasteTests.cpp b/Gems/EMotionFX/Code/Tests/AnimGraphCopyPasteTests.cpp index 4feb8cd86a..dee1bd5ca2 100644 --- a/Gems/EMotionFX/Code/Tests/AnimGraphCopyPasteTests.cpp +++ b/Gems/EMotionFX/Code/Tests/AnimGraphCopyPasteTests.cpp @@ -184,7 +184,6 @@ namespace EMotionFX void VerifyAfterOperation() { const AZStd::vector conditionTypeIds = GetConditionTypeIds(); - const size_t numConditionTypes = conditionTypeIds.size(); const bool cutMode = GetParam(); if (cutMode) { @@ -419,7 +418,6 @@ namespace EMotionFX AZStd::string result; MCore::CommandGroup commandGroup; const bool cutMode = GetParam(); - const AnimGraphConnectionId oldtransitionId = m_transition->GetId(); // Add transition actions to the node. AnimGraphParameterAction* action1 = aznew AnimGraphParameterAction(); diff --git a/Gems/EMotionFX/Code/Tests/AnimGraphEventTests.cpp b/Gems/EMotionFX/Code/Tests/AnimGraphEventTests.cpp index 1b88092917..bd3fa10b24 100644 --- a/Gems/EMotionFX/Code/Tests/AnimGraphEventTests.cpp +++ b/Gems/EMotionFX/Code/Tests/AnimGraphEventTests.cpp @@ -88,7 +88,7 @@ namespace EMotionFX void SimulateTest(float simulationTime, float expectedFps, float fpsVariance) { Simulate(simulationTime, expectedFps, fpsVariance, - /*preCallback*/[this](AnimGraphInstance*) + /*preCallback*/[](AnimGraphInstance*) { }, /*postCallback*/[this](AnimGraphInstance*) @@ -102,8 +102,8 @@ namespace EMotionFX EXPECT_EQ(this->m_eventHandler->m_numTransitionsStarted, numStates); EXPECT_EQ(this->m_eventHandler->m_numTransitionsEnded, numStates); }, - /*preUpdateCallback*/[this](AnimGraphInstance*, float, float, int) {}, - /*postUpdateCallback*/[this](AnimGraphInstance*, float, float, int) {}); + /*preUpdateCallback*/[](AnimGraphInstance*, float, float, int) {}, + /*postUpdateCallback*/[](AnimGraphInstance*, float, float, int) {}); const int numStates = GetParam().m_numStates; if (numStates > 1) diff --git a/Gems/EMotionFX/Code/Tests/AnimGraphRefCountTests.cpp b/Gems/EMotionFX/Code/Tests/AnimGraphRefCountTests.cpp index 8b51f5b814..54f945d95f 100644 --- a/Gems/EMotionFX/Code/Tests/AnimGraphRefCountTests.cpp +++ b/Gems/EMotionFX/Code/Tests/AnimGraphRefCountTests.cpp @@ -32,12 +32,10 @@ namespace EMotionFX this->m_animGraphInstance->SetAutoReleaseRefDatas(false); this->m_animGraphInstance->SetAutoReleasePoses(false); }, - /*postCallback*/[this](AnimGraphInstance*){}, - /*preUpdateCallback*/[this](AnimGraphInstance*, float, float, int){}, + /*postCallback*/[](AnimGraphInstance*){}, + /*preUpdateCallback*/[](AnimGraphInstance*, float, float, int){}, /*postUpdateCallback*/[this](AnimGraphInstance*, float, float, int) { - const uint32 threadIndex = this->m_actorInstance->GetThreadIndex(); - // Check if data and pose ref counts are back to 0 for all nodes. const size_t numNodes = this->m_animGraph->GetNumNodes(); for (size_t i = 0; i < numNodes; ++i) diff --git a/Gems/EMotionFX/Code/Tests/AnimGraphStateMachineInterruptionTests.cpp b/Gems/EMotionFX/Code/Tests/AnimGraphStateMachineInterruptionTests.cpp index 39fc296d9f..b0f070d203 100644 --- a/Gems/EMotionFX/Code/Tests/AnimGraphStateMachineInterruptionTests.cpp +++ b/Gems/EMotionFX/Code/Tests/AnimGraphStateMachineInterruptionTests.cpp @@ -137,9 +137,9 @@ namespace EMotionFX m_eventHandler->m_numStatesEnded -= 1; Simulate(20.0f/*simulationTime*/, 60.0f/*expectedFps*/, 0.0f/*fpsVariance*/, - /*preCallback*/[this]([[maybe_unused]] AnimGraphInstance* animGraphInstance){}, - /*postCallback*/[this]([[maybe_unused]] AnimGraphInstance* animGraphInstance){}, - /*preUpdateCallback*/[this](AnimGraphInstance*, float, float, int) {}, + /*preCallback*/[]([[maybe_unused]] AnimGraphInstance* animGraphInstance){}, + /*postCallback*/[]([[maybe_unused]] AnimGraphInstance* animGraphInstance){}, + /*preUpdateCallback*/[](AnimGraphInstance*, float, float, int) {}, /*postUpdateCallback*/[this](AnimGraphInstance* animGraphInstance, [[maybe_unused]] float time, [[maybe_unused]] float timeDelta, int frame) { const std::vector& activeObjectsAtFrame = GetParam().m_activeObjectsAtFrame; @@ -457,14 +457,11 @@ namespace EMotionFX float prevBlendWeight = 0.0f; Simulate(2.0f /*simulationTime*/, 10.0f /*expectedFps*/, 0.0f /*fpsVariance*/, - /*preCallback*/[this]([[maybe_unused]] AnimGraphInstance* animGraphInstance) {}, - /*postCallback*/[this]([[maybe_unused]] AnimGraphInstance* animGraphInstance) {}, - /*preUpdateCallback*/[this](AnimGraphInstance*, float, float, int) {}, + /*preCallback*/[]([[maybe_unused]] AnimGraphInstance* animGraphInstance) {}, + /*postCallback*/[]([[maybe_unused]] AnimGraphInstance* animGraphInstance) {}, + /*preUpdateCallback*/[](AnimGraphInstance*, float, float, int) {}, /*postUpdateCallback*/[this, &prevGotInterrupted, &prevBlendWeight](AnimGraphInstance* animGraphInstance, [[maybe_unused]] float time, [[maybe_unused]] float timeDelta, [[maybe_unused]] int frame) { - const AnimGraphStateMachine_InterruptionPropertiesTestData param = GetParam(); - - const AnimGraphStateTransition::EInterruptionMode interruptionMode = m_transitionLeft->GetInterruptionMode(); const float maxInterruptionBlendWeight = m_transitionLeft->GetMaxInterruptionBlendWeight(); const bool gotInterrupted = m_transitionLeft->GotInterrupted(animGraphInstance); const bool gotInterruptedThisFrame = gotInterrupted && !prevGotInterrupted; diff --git a/Gems/EMotionFX/Code/Tests/AnimGraphStateMachineSyncTests.cpp b/Gems/EMotionFX/Code/Tests/AnimGraphStateMachineSyncTests.cpp index 37996abbd8..d95140a23b 100644 --- a/Gems/EMotionFX/Code/Tests/AnimGraphStateMachineSyncTests.cpp +++ b/Gems/EMotionFX/Code/Tests/AnimGraphStateMachineSyncTests.cpp @@ -100,13 +100,11 @@ namespace EMotionFX TEST_P(AnimGraphStateMachineSyncFixture, PlayspeedTests) { - const AnimGraphStateMachineSyncParam param = GetParam(); - bool transitioned = false; Simulate(2.0f/*simulationTime*/, 10.0f/*expectedFps*/, 0.0f/*fpsVariance*/, - /*preCallback*/[this]([[maybe_unused]] AnimGraphInstance* animGraphInstance){}, - /*postCallback*/[this]([[maybe_unused]] AnimGraphInstance* animGraphInstance){}, - /*preUpdateCallback*/[this](AnimGraphInstance*, float, float, int){}, + /*preCallback*/[]([[maybe_unused]] AnimGraphInstance* animGraphInstance){}, + /*postCallback*/[]([[maybe_unused]] AnimGraphInstance* animGraphInstance){}, + /*preUpdateCallback*/[](AnimGraphInstance*, float, float, int){}, /*postUpdateCallback*/[this, &transitioned](AnimGraphInstance* animGraphInstance, [[maybe_unused]] float time, [[maybe_unused]] float timeDelta, [[maybe_unused]] int frame) { if (m_rootStateMachine->IsTransitionActive(m_transition, animGraphInstance)) diff --git a/Gems/EMotionFX/Code/Tests/BlendTreeBlendNNodeTests.cpp b/Gems/EMotionFX/Code/Tests/BlendTreeBlendNNodeTests.cpp index 1f5fb9a512..53744aeb6b 100644 --- a/Gems/EMotionFX/Code/Tests/BlendTreeBlendNNodeTests.cpp +++ b/Gems/EMotionFX/Code/Tests/BlendTreeBlendNNodeTests.cpp @@ -332,9 +332,7 @@ namespace EMotionFX EXPECT_NEAR(durationA, durationN, epsilon); // Node B gets synced to the blend N node which got synced to node A. - const float timeRatio = durationA / durationB; const float timeRatio2 = durationB / durationA; - const float factorA = AZ::Lerp(1.0f, timeRatio, blendWeight); const float factorB = AZ::Lerp(timeRatio2, 1.0f, blendWeight); const float primaryMotionPlaySpeed = m_motionNodes[motionIndexA]->GetDefaultPlaySpeed(); const float interpolatedSpeed = AZ::Lerp(playSpeedA, primaryMotionPlaySpeed, blendWeight); diff --git a/Gems/EMotionFX/Code/Tests/BlendTreeRagdollNodeTests.cpp b/Gems/EMotionFX/Code/Tests/BlendTreeRagdollNodeTests.cpp index 85504675db..a01d333e95 100644 --- a/Gems/EMotionFX/Code/Tests/BlendTreeRagdollNodeTests.cpp +++ b/Gems/EMotionFX/Code/Tests/BlendTreeRagdollNodeTests.cpp @@ -115,7 +115,6 @@ namespace EMotionFX { AddRagdollNodeConfig(ragdollNodes, jointName.c_str()); } - const size_t numRagdollNodes = ragdollNodes.size(); // Create the ragdoll instance and check if the ragdoll root node is set correctly. TestRagdoll testRagdoll; diff --git a/Gems/EMotionFX/Code/Tests/BlendTreeTwoLinkIKNodeTests.cpp b/Gems/EMotionFX/Code/Tests/BlendTreeTwoLinkIKNodeTests.cpp index eab445ddfe..5d57c74d10 100644 --- a/Gems/EMotionFX/Code/Tests/BlendTreeTwoLinkIKNodeTests.cpp +++ b/Gems/EMotionFX/Code/Tests/BlendTreeTwoLinkIKNodeTests.cpp @@ -165,8 +165,6 @@ namespace EMotionFX if (weight) { const AZ::Vector3 expectedPosition(goalX, goalY, goalZ); - const AZ::Vector3 dist = (expectedPosition - testJointNewPos).GetAbs(); - const float length = dist.GetLength(); EXPECT_TRUE(PosePositionCompareClose(testJointNewPos, expectedPosition, 0.0001f)) << "Joint position should be similar to expected position."; } diff --git a/Gems/EMotionFX/Code/Tests/Integration/ActorComponentRagdollTests.cpp b/Gems/EMotionFX/Code/Tests/Integration/ActorComponentRagdollTests.cpp index 809dd67573..4c9eb2c32c 100644 --- a/Gems/EMotionFX/Code/Tests/Integration/ActorComponentRagdollTests.cpp +++ b/Gems/EMotionFX/Code/Tests/Integration/ActorComponentRagdollTests.cpp @@ -61,7 +61,6 @@ namespace EMotionFX TEST_F(EntityComponentFixture, ActorComponent_ActivateRagdoll) { AZ::EntityId entityId(740216387); - AZ::Crc32 worldId(174592); AzPhysics::SceneEvents::OnSceneSimulationFinishEvent sceneFinishSimEvent; diff --git a/Gems/EMotionFX/Code/Tests/MotionExtractionBusTests.cpp b/Gems/EMotionFX/Code/Tests/MotionExtractionBusTests.cpp index d8b8a2a430..170f4d2d75 100644 --- a/Gems/EMotionFX/Code/Tests/MotionExtractionBusTests.cpp +++ b/Gems/EMotionFX/Code/Tests/MotionExtractionBusTests.cpp @@ -132,8 +132,6 @@ namespace EMotionFX EXPECT_TRUE(hasCustomMotionExtractionController) << "MotionExtractionBus is not found."; - const float deltaTimeInv = (timeDelta > 0.0f) ? (1.0f / timeDelta) : 0.0f; - AZ::Transform currentTransform = AZ::Transform::CreateIdentity(); AZ::TransformBus::EventResult(currentTransform, m_entityId, &AZ::TransformBus::Events::GetWorldTM); diff --git a/Gems/EMotionFX/Code/Tests/Prefabs/LeftArmSkeleton.h b/Gems/EMotionFX/Code/Tests/Prefabs/LeftArmSkeleton.h index 2af9da3306..b9ddac817b 100644 --- a/Gems/EMotionFX/Code/Tests/Prefabs/LeftArmSkeleton.h +++ b/Gems/EMotionFX/Code/Tests/Prefabs/LeftArmSkeleton.h @@ -80,7 +80,7 @@ namespace EMotionFX .WillRepeatedly(Return(nodeName)); AZ::u32 i = 0; - std::initializer_list {(([&]() { + [[maybe_unused]] std::initializer_list dummy = {(([&]() { EXPECT_CALL(*node, GetChildIndex(i)) .WillRepeatedly(Return(children)); ++i; diff --git a/Gems/EMotionFX/Code/Tests/SimulatedObjectSetupTests.cpp b/Gems/EMotionFX/Code/Tests/SimulatedObjectSetupTests.cpp index f37f571982..2660931e07 100644 --- a/Gems/EMotionFX/Code/Tests/SimulatedObjectSetupTests.cpp +++ b/Gems/EMotionFX/Code/Tests/SimulatedObjectSetupTests.cpp @@ -406,7 +406,6 @@ namespace SimulatedObjectSetupTests const float newGravityFactor = 1.2f; const float newFriction = 0.3f; const bool newPinned = true; - const bool newStretchable = true; joint.SetConeAngleLimit(newConeAngleLimit); joint.SetMass(newMass); diff --git a/Gems/EditorPythonBindings/Code/Source/PythonMarshalComponent.cpp b/Gems/EditorPythonBindings/Code/Source/PythonMarshalComponent.cpp index af21420b62..257df31778 100644 --- a/Gems/EditorPythonBindings/Code/Source/PythonMarshalComponent.cpp +++ b/Gems/EditorPythonBindings/Code/Source/PythonMarshalComponent.cpp @@ -1376,7 +1376,6 @@ namespace EditorPythonBindings class TypeConverterPair final : public PythonMarshalComponent::TypeConverter { - AZ::GenericClassInfo* m_genericClassInfo = nullptr; const AZ::SerializeContext::ClassData* m_classData = nullptr; const AZ::TypeId m_typeId = {}; @@ -1403,9 +1402,8 @@ namespace EditorPythonBindings } public: - TypeConverterPair(AZ::GenericClassInfo* genericClassInfo, const AZ::SerializeContext::ClassData* classData, const AZ::TypeId& typeId) - : m_genericClassInfo(genericClassInfo) - , m_classData(classData) + TypeConverterPair([[maybe_unused]] AZ::GenericClassInfo* genericClassInfo, const AZ::SerializeContext::ClassData* classData, const AZ::TypeId& typeId) + : m_classData(classData) , m_typeId(typeId) { } diff --git a/Gems/LmbrCentral/Code/Source/Ai/NavigationComponent.cpp b/Gems/LmbrCentral/Code/Source/Ai/NavigationComponent.cpp index fbeb26706e..9086f40ede 100644 --- a/Gems/LmbrCentral/Code/Source/Ai/NavigationComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Ai/NavigationComponent.cpp @@ -748,7 +748,7 @@ namespace LmbrCentral PathFollowResult result; - const bool arrived = pathFollower->Update( + [[maybe_unused]] const bool arrived = pathFollower->Update( result, AZVec3ToLYVec3(agentPosition), AZVec3ToLYVec3(agentVelocity), diff --git a/Gems/LmbrCentral/Code/Tests/BundlingSystemComponentTests.cpp b/Gems/LmbrCentral/Code/Tests/BundlingSystemComponentTests.cpp index ada7975b62..08251eb716 100644 --- a/Gems/LmbrCentral/Code/Tests/BundlingSystemComponentTests.cpp +++ b/Gems/LmbrCentral/Code/Tests/BundlingSystemComponentTests.cpp @@ -138,7 +138,6 @@ namespace UnitTest // cache as test/bundle/staticdata.pak and should be loaded below // The Pak has a catalog describing the contents which should automatically update our central asset catalog const char testCSVAsset[] = "staticdata/csv/bundlingsystemtestgameproperties.csv"; - const char testCSVAssetPak[] = "test/bundle/staticdata.pak"; const char testMTLAsset[] = "materials/water_test.mtl"; const char testMTLAssetPak[] = "test/TestMaterials.pak"; @@ -167,7 +166,6 @@ namespace UnitTest const char testCSVAssetPak[] = "test/bundle/staticdata.pak"; // This asset lives only within LmbrCentral/Assets/Test/Bundle/ping.pak - const char testDDSAsset[] = "textures/test/ping.dds"; const char testDDSAssetPak[] = "test/bundle/ping.pak"; size_t bundleCount{ 0 }; diff --git a/Gems/LyShine/Code/Source/Animation/AzEntityNode.cpp b/Gems/LyShine/Code/Source/Animation/AzEntityNode.cpp index 814d1404b4..4d178e2f10 100644 --- a/Gems/LyShine/Code/Source/Animation/AzEntityNode.cpp +++ b/Gems/LyShine/Code/Source/Animation/AzEntityNode.cpp @@ -56,16 +56,7 @@ namespace param.flags = (IUiAnimNode::ESupportedParamFlags)flags; nodeParams.push_back(param); } - - // Quat::IsEquivalent has numerical problems with very similar values - bool CompareRotation(const Quat& q1, const Quat& q2, float epsilon) - { - return (fabs_tpl(q1.v.x - q2.v.x) <= epsilon) - && (fabs_tpl(q1.v.y - q2.v.y) <= epsilon) - && (fabs_tpl(q1.v.z - q2.v.z) <= epsilon) - && (fabs_tpl(q1.w - q2.w) <= epsilon); - } -}; +} ////////////////////////////////////////////////////////////////////////// CUiAnimAzEntityNode::CUiAnimAzEntityNode(const int id) diff --git a/Gems/LyShine/Code/Source/LyShine.cpp b/Gems/LyShine/Code/Source/LyShine.cpp index 694a9665a8..974f3cb022 100644 --- a/Gems/LyShine/Code/Source/LyShine.cpp +++ b/Gems/LyShine/Code/Source/LyShine.cpp @@ -124,10 +124,9 @@ AllocateConstIntCVar(CLyShine, CV_ui_RunUnitTestsOnStartup); #endif //////////////////////////////////////////////////////////////////////////////////////////////////// -CLyShine::CLyShine(ISystem* system) +CLyShine::CLyShine([[maybe_unused]] ISystem* system) : AzFramework::InputChannelEventListener(AzFramework::InputChannelEventListener::GetPriorityUI()) , AzFramework::InputTextEventListener(AzFramework::InputTextEventListener::GetPriorityUI()) - , m_system(system) , m_draw2d(new CDraw2d) , m_uiRenderer(new UiRenderer) , m_uiCanvasManager(new UiCanvasManager) diff --git a/Gems/LyShine/Code/Source/LyShine.h b/Gems/LyShine/Code/Source/LyShine.h index 19a4e664e5..065ad59f80 100644 --- a/Gems/LyShine/Code/Source/LyShine.h +++ b/Gems/LyShine/Code/Source/LyShine.h @@ -155,8 +155,6 @@ private: // static member functions private: // data - ISystem* m_system; // store a pointer to system rather than relying on env.pSystem - std::unique_ptr m_draw2d; // using a pointer rather than an instance to avoid including Draw2d.h std::unique_ptr m_uiRenderer; // using a pointer rather than an instance to avoid including UiRenderer.h AZStd::shared_ptr m_uiRendererForEditor; diff --git a/Gems/LyShine/Code/Source/LyShineSystemComponent.cpp b/Gems/LyShine/Code/Source/LyShineSystemComponent.cpp index f05cbc04d4..d3d2d5655e 100644 --- a/Gems/LyShine/Code/Source/LyShineSystemComponent.cpp +++ b/Gems/LyShine/Code/Source/LyShineSystemComponent.cpp @@ -342,8 +342,6 @@ namespace LyShine // Build a map of entity Ids to their parent Ids, for faster lookup during processing. for (AZ::Entity* exportParentEntity : exportSliceEntities) { - AZ::EntityId exportParentId = exportParentEntity->GetId(); - UiElementComponent* exportParentComponent = exportParentEntity->FindComponent(); if (!exportParentComponent) { diff --git a/Gems/LyShine/Code/Source/Sprite.cpp b/Gems/LyShine/Code/Source/Sprite.cpp index 7f293e57a3..5c7adae481 100644 --- a/Gems/LyShine/Code/Source/Sprite.cpp +++ b/Gems/LyShine/Code/Source/Sprite.cpp @@ -509,20 +509,16 @@ ISprite::Borders CSprite::GetTextureSpaceCellUvBorders(int cellIndex) const if (CellIndexWithinRange(cellIndex)) { const float cellWidth = GetCellUvSize(cellIndex).GetX(); - const float cellMinUCoord = GetCellUvCoords(cellIndex).TopLeft().GetX(); const float cellNormalizedLeftBorder = GetCellUvBorders(cellIndex).m_left * cellWidth; textureSpaceBorders.m_left = cellNormalizedLeftBorder; - const float cellMaxUCoord = GetCellUvCoords(cellIndex).TopRight().GetX(); const float cellNormalizedRightBorder = GetCellUvBorders(cellIndex).m_right * cellWidth; textureSpaceBorders.m_right = cellNormalizedRightBorder; const float cellHeight = GetCellUvSize(cellIndex).GetY(); - const float cellMinVCoord = GetCellUvCoords(cellIndex).TopLeft().GetY(); const float cellNormalizedTopBorder = GetCellUvBorders(cellIndex).m_top * cellHeight; textureSpaceBorders.m_top = cellNormalizedTopBorder; - const float cellMaxVCoord = GetCellUvCoords(cellIndex).BottomLeft().GetY(); const float cellNormalizedBottomBorder = GetCellUvBorders(cellIndex).m_bottom * cellHeight; textureSpaceBorders.m_bottom = cellNormalizedBottomBorder; } diff --git a/Gems/LyShine/Code/Source/Tests/internal/test_UiTransform2dComponent.cpp b/Gems/LyShine/Code/Source/Tests/internal/test_UiTransform2dComponent.cpp index 89b88cd8f6..bea66101fa 100644 --- a/Gems/LyShine/Code/Source/Tests/internal/test_UiTransform2dComponent.cpp +++ b/Gems/LyShine/Code/Source/Tests/internal/test_UiTransform2dComponent.cpp @@ -904,7 +904,6 @@ namespace AZ::EntityId testElemId = CreateElementWithTransform2dComponent(canvas, "UiTransfrom2DTestElement:Offsets"); - AZ::Vector2 parentSize(canvas->GetCanvasSize()); UiTransform2dInterface::Offsets expectedOffsets(-50, -50, 50, 50); UiTransform2dInterface::Offsets actualOffsets; @@ -971,7 +970,6 @@ namespace AZ::EntityId testElemId = CreateElementWithTransform2dComponent(canvas, "UiTransfrom2DTestElement:LocalSize"); - AZ::Vector2 parentSize(canvas->GetCanvasSize()); float expectedWidth = 100; float actualWidth = 1; float expectedHeight = 100; diff --git a/Gems/LyShine/Code/Source/UiImageComponent.cpp b/Gems/LyShine/Code/Source/UiImageComponent.cpp index d279beeee9..e01e87aadd 100644 --- a/Gems/LyShine/Code/Source/UiImageComponent.cpp +++ b/Gems/LyShine/Code/Source/UiImageComponent.cpp @@ -1536,7 +1536,6 @@ void UiImageComponent::RenderSingleQuad(const AZ::Vector2* positions, const AZ:: IDraw2d::Rounding pixelRounding = IsPixelAligned() ? IDraw2d::Rounding::Nearest : IDraw2d::Rounding::None; const uint32 numVertices = 4; SVF_P2F_C4B_T2F_F4B vertices[numVertices]; - const float z = 1.0f; // depth test disabled, if writing Z this will write at far plane for (int i = 0; i < numVertices; ++i) { AZ::Vector2 roundedPoint = Draw2dHelper::RoundXY(positions[i], pixelRounding); @@ -1596,7 +1595,6 @@ void UiImageComponent::RenderLinearFilledQuad(const AZ::Vector2* positions, cons IDraw2d::Rounding pixelRounding = IsPixelAligned() ? IDraw2d::Rounding::Nearest : IDraw2d::Rounding::None; const uint32 numVertices = 4; SVF_P2F_C4B_T2F_F4B vertices[numVertices]; - const float z = 1.0f; // depth test disabled, if writing Z this will write at far plane for (int i = 0; i < numVertices; ++i) { diff --git a/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp b/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp index 086aed9f58..d16242fa05 100644 --- a/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp +++ b/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp @@ -105,7 +105,6 @@ void UiImageSequenceComponent::Render(LyShine::IRenderGraph* renderGraph) if (m_isRenderCacheDirty) { - const int defaultIndex = 0; uint32 packedColor = 0xffffffff; switch (m_imageType) { @@ -542,7 +541,6 @@ void UiImageSequenceComponent::RenderSingleQuad(const AZ::Vector2* positions, co IDraw2d::Rounding pixelRounding = IsPixelAligned() ? IDraw2d::Rounding::Nearest : IDraw2d::Rounding::None; const uint32 numVertices = 4; SVF_P2F_C4B_T2F_F4B vertices[numVertices]; - const float z = 1.0f; // depth test disabled, if writing Z this will write at far plane for (int i = 0; i < numVertices; ++i) { AZ::Vector2 roundedPoint = Draw2dHelper::RoundXY(positions[i], pixelRounding); diff --git a/Gems/LyShine/Code/Source/UiRenderer.cpp b/Gems/LyShine/Code/Source/UiRenderer.cpp index c52c249d20..07a9f77007 100644 --- a/Gems/LyShine/Code/Source/UiRenderer.cpp +++ b/Gems/LyShine/Code/Source/UiRenderer.cpp @@ -313,8 +313,6 @@ AZ::Vector2 UiRenderer::GetViewportSize() auto windowContext = viewportContext->GetWindowContext(); const AZ::RHI::Viewport& viewport = windowContext->GetViewport(); - const float viewX = viewport.m_minX; - const float viewY = viewport.m_minY; const float viewWidth = viewport.m_maxX - viewport.m_minX; const float viewHeight = viewport.m_maxY - viewport.m_minY; return AZ::Vector2(viewWidth, viewHeight); diff --git a/Gems/LyShine/Code/Source/UiScrollBoxComponent.cpp b/Gems/LyShine/Code/Source/UiScrollBoxComponent.cpp index 88317b840f..8b634b32fb 100644 --- a/Gems/LyShine/Code/Source/UiScrollBoxComponent.cpp +++ b/Gems/LyShine/Code/Source/UiScrollBoxComponent.cpp @@ -1500,7 +1500,6 @@ AZ::Vector2 UiScrollBoxComponent::ConstrainOffset(AZ::Vector2 proposedOffset, AZ // add the requested scroll offset to the content rect to get the proposed position // The content has already need moved by the requested offset all but latestOffsetDelta - UiTransformInterface::Rect origContentRect = contentRect; contentRect.MoveBy(latestOffsetDelta); if (contentRect.GetWidth() <= parentRect.GetWidth()) diff --git a/Gems/LyShine/Code/Source/UiTextComponent.cpp b/Gems/LyShine/Code/Source/UiTextComponent.cpp index f9544a9954..2afd1cac73 100644 --- a/Gems/LyShine/Code/Source/UiTextComponent.cpp +++ b/Gems/LyShine/Code/Source/UiTextComponent.cpp @@ -2662,8 +2662,6 @@ void UiTextComponent::GetClickableTextRects(UiClickableTextInterface::ClickableT AZ::Vector2 pos = CalculateAlignedPositionWithYOffset(points); const DrawBatchLines& drawBatchLines = GetDrawBatchLines(); - int requestFontSize = GetRequestFontSize(); - STextDrawContext fontContext(GetTextDrawContextPrototype(requestFontSize, drawBatchLines.fontSizeScale)); float newlinePosYIncrement = 0.0f; for (auto& drawBatchLine : drawBatchLines.batchLines) @@ -3344,7 +3342,6 @@ void UiTextComponent::GetTextRect(UiTransformInterface::RectPoints& rect, const // get the "no scale rotate" element box UiTransformInterface::RectPoints elemRect; EBUS_EVENT_ID(GetEntityId(), UiTransformBus, GetCanvasSpacePointsNoScaleRotate, elemRect); - AZ::Vector2 elemSize = elemRect.GetAxisAlignedSize(); // given the text alignment work out the box of the actual text rect = elemRect; diff --git a/Gems/LyShine/Code/Source/UiTransform2dComponent.cpp b/Gems/LyShine/Code/Source/UiTransform2dComponent.cpp index 48b2c2a8c4..48165fa8d7 100644 --- a/Gems/LyShine/Code/Source/UiTransform2dComponent.cpp +++ b/Gems/LyShine/Code/Source/UiTransform2dComponent.cpp @@ -1454,7 +1454,7 @@ AZ::EntityId UiTransform2dComponent::GetAncestorWithSameDimensionScaleToDevice(S LyShine::EntityArray UiTransform2dComponent::GetDescendantsWithSameDimensionScaleToDevice(ScaleToDeviceMode scaleToDeviceMode) const { // Check if any descendants have their scale to device mode set in the same dimension - auto HasSameDimensionScaleToDevice = [this, scaleToDeviceMode](const AZ::Entity* entity) + auto HasSameDimensionScaleToDevice = [scaleToDeviceMode](const AZ::Entity* entity) { ScaleToDeviceMode descendantScaleToDeviceMode = ScaleToDeviceMode::None; EBUS_EVENT_ID_RESULT(descendantScaleToDeviceMode, entity->GetId(), UiTransformBus, GetScaleToDeviceMode); diff --git a/Gems/LyShine/Code/Source/World/UiCanvasOnMeshComponent.cpp b/Gems/LyShine/Code/Source/World/UiCanvasOnMeshComponent.cpp index 81a68a5a9e..395e0dfc32 100644 --- a/Gems/LyShine/Code/Source/World/UiCanvasOnMeshComponent.cpp +++ b/Gems/LyShine/Code/Source/World/UiCanvasOnMeshComponent.cpp @@ -101,190 +101,6 @@ namespace } #endif - //////////////////////////////////////////////////////////////////////////////////////////////////// - bool GetBarycentricCoordinates(const Vec3& a, const Vec3& b, const Vec3& c, const Vec3& p, float& u, float& v, float& w, float fBorder) - { - // Compute vectors - Vec3 v0 = b - a; - Vec3 v1 = c - a; - Vec3 v2 = p - a; - - // Compute dot products - float dot00 = v0.Dot(v0); - float dot01 = v0.Dot(v1); - float dot02 = v0.Dot(v2); - float dot11 = v1.Dot(v1); - float dot12 = v1.Dot(v2); - - // Compute barycentric coordinates - float invDenom = 1.f / (dot00 * dot11 - dot01 * dot01); - v = (dot11 * dot02 - dot01 * dot12) * invDenom; - w = (dot00 * dot12 - dot01 * dot02) * invDenom; - u = 1.f - v - w; - - // Check if point is in triangle - return (u >= -fBorder) && (v >= -fBorder) && (w >= -fBorder); - } - - //////////////////////////////////////////////////////////////////////////////////////////////////// - bool SnapToPlaneAndGetBarycentricCoordinates(const Vec3& a, const Vec3& b, const Vec3& c, const Vec3& p, float& u, float& v, float& w) - { - // get face normal - Vec3 uVec = b - a; - Vec3 vVec = c - a; - Vec3 faceNormal = uVec.cross(vVec); - faceNormal.NormalizeSafe(); - Vec3 aToPt = p - a; - float dist = aToPt.Dot(faceNormal); - float distSq = dist * dist; - float triLenSq = uVec.len2() + vVec.len2(); - - // Is the point "close enough" to the plane of the triangle? - if (distSq < triLenSq * 0.1f) - { - // snap the point to the plane of the triangle - Vec3 coplanarP = p - dist * faceNormal; - - return GetBarycentricCoordinates(a, b, c, coplanarP, u, v, w, 0.0f); - } - - return false; - } - - //////////////////////////////////////////////////////////////////////////////////////////////////// - Vec2 ConvertBarycentricCoordsToUVCoords(float u, float v, float w, Vec2 uv0, Vec2 uv1, Vec2 uv2) - { - float arrVertWeight[3] = { max(0.f, u), max(0.f, v), max(0.f, w) }; - float fDiv = 1.f / (arrVertWeight[0] + arrVertWeight[1] + arrVertWeight[2]); - arrVertWeight[0] *= fDiv; - arrVertWeight[1] *= fDiv; - arrVertWeight[2] *= fDiv; - - Vec2 uvResult = uv0 * arrVertWeight[0] + uv1 * arrVertWeight[1] + uv2 * arrVertWeight[2]; - return uvResult; - } - - //////////////////////////////////////////////////////////////////////////////////////////////////// - bool GetTexCoordFromRayHitOnIndexedMesh( - int triIndex, - Vec3 hitPoint, - [[maybe_unused]] const IPhysicalEntity* collider, - [[maybe_unused]] int partIndex, - const Matrix34& slotWorldTM, - const IIndexedMesh* indexedMesh, - Vec2& texCoord) - { - IIndexedMesh::SMeshDescription meshDesc; - indexedMesh->GetMeshDescription(meshDesc); - -#if UI_CANVAS_ON_MESH_DEBUG - DrawSphere(hitPoint, debugHitColor, debugDrawSphereSize); -#endif - - // triIndex is -1 if this is not a mesh collision (i.e. collided with a parametric primitive) - if (triIndex >= 0 && triIndex * 3 <= meshDesc.m_nIndexCount) - { - // convert TriIndex into the indices into the index buffer - int i0 = triIndex * 3; - int i1 = i0 + 1; - int i2 = i0 + 2; - - // get the vertex indices from the index buffer - int vIndex0 = meshDesc.m_pIndices[i0]; - int vIndex1 = meshDesc.m_pIndices[i1]; - int vIndex2 = meshDesc.m_pIndices[i2]; - - // get verts in local space - Vec3 v0 = meshDesc.m_pVerts[vIndex0]; - Vec3 v1 = meshDesc.m_pVerts[vIndex1]; - Vec3 v2 = meshDesc.m_pVerts[vIndex2]; - - // get verts in world space - Vec3 wv0 = slotWorldTM.TransformPoint(v0); - Vec3 wv1 = slotWorldTM.TransformPoint(v1); - Vec3 wv2 = slotWorldTM.TransformPoint(v2); - - -#if UI_CANVAS_ON_MESH_DEBUG - DrawCollisionMeshTrianglePoints(triIndex, collider, partIndex, slotWorldTM); -#endif - - float u, v, w; - if (SnapToPlaneAndGetBarycentricCoordinates(wv0, wv1, wv2, hitPoint, u, v, w)) - { -#if UI_CANVAS_ON_MESH_DEBUG - DrawTrianglePoints(wv0, wv1, wv2, debugRenderMeshAttempt1Color, debugDrawSphereSize); -#endif - - // get the texcoord for each vert of the triangle - Vec2 uv0 = meshDesc.m_pTexCoord[vIndex0].GetUV(); - Vec2 uv1 = meshDesc.m_pTexCoord[vIndex1].GetUV(); - Vec2 uv2 = meshDesc.m_pTexCoord[vIndex2].GetUV(); - - texCoord = ConvertBarycentricCoordsToUVCoords(u, v, w, uv0, uv1, uv2); - - return true; - } - } - - // If we got here then EITHER, the iPrim is 0xffffffff meaning that the collision - // was a primitive rather than a mesh collision OR the iPrim is not the right - // triangle index in the render mesh. This sometimes happens, presumably due to - // some modifications that are made automatically to the collision mesh by the - // physics system or something to do with how the IndexedMesh is generated on - // demand in IStatObj:::GetIndexedMesh. - // We do have the collision point though. So we go through all the triangles in - // the render mesh and try to find the right triangle. - // NOTE: This could be optimized by converting the hit point to local space. - // NOTE: Currently we use the first triangle where the point is "close enough" to the plane - // of the triangle and the barycentric calculation says that the point is within the - // triangle. This "close enough" test is rather arbitrary and could get a false positive in - // some edge cases. - // Another approach would be to go through all the triangles doing the barycentric - // test and keep track of which one that passes is closest to the plane of the triangle. - int triCount = meshDesc.m_nIndexCount / 3; - for (int i = 0; i < triCount; ++i) - { - // convert TriIndex into the indices into the index buffer - int i0 = i * 3; - int i1 = i0 + 1; - int i2 = i0 + 2; - - // get the vertex indices from the index buffer - int vIndex0 = meshDesc.m_pIndices[i0]; - int vIndex1 = meshDesc.m_pIndices[i1]; - int vIndex2 = meshDesc.m_pIndices[i2]; - - // get verts in local space - Vec3 v0 = meshDesc.m_pVerts[vIndex0]; - Vec3 v1 = meshDesc.m_pVerts[vIndex1]; - Vec3 v2 = meshDesc.m_pVerts[vIndex2]; - - // get verts in world space - Vec3 wv0 = slotWorldTM.TransformPoint(v0); - Vec3 wv1 = slotWorldTM.TransformPoint(v1); - Vec3 wv2 = slotWorldTM.TransformPoint(v2); - - float u, v, w; - if (SnapToPlaneAndGetBarycentricCoordinates(wv0, wv1, wv2, hitPoint, u, v, w)) - { -#if UI_CANVAS_ON_MESH_DEBUG - DrawTrianglePoints(wv0, wv1, wv2, debugRenderMeshAttempt2Color, debugDrawSphereSize); -#endif - - // get the texcoord for each vert of the triangle - Vec2 uv0 = meshDesc.m_pTexCoord[vIndex0].GetUV(); - Vec2 uv1 = meshDesc.m_pTexCoord[vIndex1].GetUV(); - Vec2 uv2 = meshDesc.m_pTexCoord[vIndex2].GetUV(); - - texCoord = ConvertBarycentricCoordsToUVCoords(u, v, w, uv0, uv1, uv2); - - return true; - } - } - - return false; - } } // Anonymous namespace //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/Gems/Maestro/Code/Source/Cinematics/Movie.cpp b/Gems/Maestro/Code/Source/Cinematics/Movie.cpp index cf51ef3729..e89e5afa15 100644 --- a/Gems/Maestro/Code/Source/Cinematics/Movie.cpp +++ b/Gems/Maestro/Code/Source/Cinematics/Movie.cpp @@ -973,9 +973,6 @@ void CMovieSystem::StillUpdate() ////////////////////////////////////////////////////////////////////////// void CMovieSystem::ShowPlayedSequencesDebug() { - f32 green[4] = {0, 1, 0, 1}; - f32 purple[4] = {1, 0, 1, 1}; - f32 white[4] = {1, 1, 1, 1}; float y = 10.0f; std::vector names; diff --git a/Gems/Maestro/Code/Source/Cinematics/SceneNode.cpp b/Gems/Maestro/Code/Source/Cinematics/SceneNode.cpp index d4b894dc92..0d91bad440 100644 --- a/Gems/Maestro/Code/Source/Cinematics/SceneNode.cpp +++ b/Gems/Maestro/Code/Source/Cinematics/SceneNode.cpp @@ -697,7 +697,6 @@ void CAnimSceneNode::InterpolateCameras(SCameraParams& retInterpolatedCameraPara return; } - static const float EPSILON_TIME = 0.01f; // consider times within EPSILON_TIME of beginning of blend time to be at the beginning of blend time float interpolatedFoV; ISceneCamera* secondCamera = static_cast(new CComponentEntitySceneCamera(secondKey.cameraAzEntityId)); diff --git a/Gems/Maestro/Code/Source/Cinematics/Tests/EntityNodeTest.cpp b/Gems/Maestro/Code/Source/Cinematics/Tests/EntityNodeTest.cpp index 064f1ba6a7..595a5aac3c 100644 --- a/Gems/Maestro/Code/Source/Cinematics/Tests/EntityNodeTest.cpp +++ b/Gems/Maestro/Code/Source/Cinematics/Tests/EntityNodeTest.cpp @@ -113,7 +113,6 @@ namespace EntityNodeTest TEST_F(CryMovie_CharacterTrackAnimator_Test, CryMovieUnitTest_CharacterTrackAnimator_ComputeAnimKeyNormalizedTime_Loop) { const float NORMALIZED_CLIP_START = .0f; - const float NORMALIZED_CLIP_END = 1.0f; const float ERROR_TOLERANCE = 0.0001f; ICharacterKey key; m_dummyTrack.GetKey(EntityNodeTest::KEY_IDX, &key); diff --git a/Gems/Multiplayer/Code/Source/Components/LocalPredictionPlayerInputComponent.cpp b/Gems/Multiplayer/Code/Source/Components/LocalPredictionPlayerInputComponent.cpp index 936f2ea92c..452cb31a7a 100644 --- a/Gems/Multiplayer/Code/Source/Components/LocalPredictionPlayerInputComponent.cpp +++ b/Gems/Multiplayer/Code/Source/Components/LocalPredictionPlayerInputComponent.cpp @@ -40,7 +40,6 @@ namespace Multiplayer AzNetworking::StringifySerializer::ValueMap differences = clientMap; for (auto iter = server.GetValueMap().begin(); iter != server.GetValueMap().end(); ++iter) { - auto serverValueIter = clientMap.find(iter->first); if (iter->second == differences[iter->first]) { differences.erase(iter->first); @@ -492,7 +491,6 @@ namespace Multiplayer { const double deltaTime = static_cast(deltaTimeMs) / 1000.0; const double clientInputRateSec = static_cast(static_cast(cl_InputRateMs)) / 1000.0; - const double maxRewindHistory = static_cast(static_cast(cl_MaxRewindHistoryMs)) / 1000.0; // Update banked time accumulator m_clientBankedTime -= deltaTime; diff --git a/Gems/Multiplayer/Code/Source/Debug/MultiplayerDebugSystemComponent.cpp b/Gems/Multiplayer/Code/Source/Debug/MultiplayerDebugSystemComponent.cpp index 27a4dff485..422b2f0cae 100644 --- a/Gems/Multiplayer/Code/Source/Debug/MultiplayerDebugSystemComponent.cpp +++ b/Gems/Multiplayer/Code/Source/Debug/MultiplayerDebugSystemComponent.cpp @@ -230,7 +230,6 @@ namespace Multiplayer void DrawNetworkingStats() { const float TEXT_BASE_WIDTH = ImGui::CalcTextSize("A").x; - const float TEXT_BASE_HEIGHT = ImGui::GetTextLineHeightWithSpacing(); const ImGuiTableFlags flags = ImGuiTableFlags_BordersV | ImGuiTableFlags_BordersOuterH @@ -383,7 +382,6 @@ namespace Multiplayer void DrawMultiplayerStats() { const float TEXT_BASE_WIDTH = ImGui::CalcTextSize("A").x; - const float TEXT_BASE_HEIGHT = ImGui::GetTextLineHeightWithSpacing(); IMultiplayer* multiplayer = AZ::Interface::Get(); MultiplayerComponentRegistry* componentRegistry = GetMultiplayerComponentRegistry(); diff --git a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp index 497d35db7e..1be68ad6d8 100644 --- a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp +++ b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp @@ -747,7 +747,6 @@ namespace Multiplayer { m_initEvent.Signal(m_networkInterface); - const AZ::Aabb worldBounds = AZ::Aabb::CreateFromMinMax(AZ::Vector3(-16384.0f), AZ::Vector3(16384.0f)); //const AZ::Aabb worldBounds = AZ::Interface.Get()->GetWorldBounds(); AZStd::unique_ptr newDomain = AZStd::make_unique(); m_networkEntityManager.Initialize(InvalidHostId, AZStd::move(newDomain)); @@ -892,9 +891,8 @@ namespace Multiplayer // Unfortunately necessary, as NotifyPreRender can update transforms and thus cause a deadlock inside the vis system AZStd::vector gatheredEntities; - AzFramework::IEntityBoundsUnion* entityBoundsUnion = AZ::Interface::Get(); AZ::Interface::Get()->GetDefaultVisibilityScene()->Enumerate(viewFrustum, - [&gatheredEntities, entityBoundsUnion](const AzFramework::IVisibilityScene::NodeData& nodeData) + [&gatheredEntities](const AzFramework::IVisibilityScene::NodeData& nodeData) { gatheredEntities.reserve(gatheredEntities.size() + nodeData.m_entries.size()); for (AzFramework::VisibilityEntry* visEntry : nodeData.m_entries) diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/PropertySubscriber.h b/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/PropertySubscriber.h index f5615f3d52..286509b798 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/PropertySubscriber.h +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/PropertySubscriber.h @@ -40,7 +40,6 @@ namespace Multiplayer // The last packet to have been received about this entity AzNetworking::PacketId m_lastReceivedPacketId = AzNetworking::InvalidPacketId; - AZ::TimeMs m_lastRecievedTimeMs = AZ::TimeMs{ 0 }; AZ::TimeMs m_markForRemovalTimeMs = AZ::TimeMs{ 0 }; }; } diff --git a/Gems/Multiplayer/Code/Source/ReplicationWindows/ServerToClientReplicationWindow.cpp b/Gems/Multiplayer/Code/Source/ReplicationWindows/ServerToClientReplicationWindow.cpp index ba9740f8db..3677eb8b5c 100644 --- a/Gems/Multiplayer/Code/Source/ReplicationWindows/ServerToClientReplicationWindow.cpp +++ b/Gems/Multiplayer/Code/Source/ReplicationWindows/ServerToClientReplicationWindow.cpp @@ -181,9 +181,9 @@ namespace Multiplayer void ServerToClientReplicationWindow::DebugDraw() const { - static const float BoundaryStripeHeight = 1.0f; - static const float BoundaryStripeSpacing = 0.5f; - static const int32_t BoundaryStripeCount = 10; + //static const float BoundaryStripeHeight = 1.0f; + //static const float BoundaryStripeSpacing = 0.5f; + //static const int32_t BoundaryStripeCount = 10; //if (auto localEnt = m_ControlledEntity.lock()) //{ @@ -289,7 +289,6 @@ namespace Multiplayer } const bool isQueueFull = (m_candidateQueue.size() >= sv_MaxEntitiesToTrackReplication); // See if have the maximum number of entities in our set - const bool isBetterChoice = !m_candidateQueue.empty() && (priority > m_candidateQueue.top().m_priority); // Check if the new thing we are adding is better than the worst item in our set const bool isInReplicationSet = m_replicationSet.find(entityHandle) != m_replicationSet.end(); if (!isInReplicationSet) { diff --git a/Gems/Multiplayer/Code/Source/ReplicationWindows/ServerToClientReplicationWindow.h b/Gems/Multiplayer/Code/Source/ReplicationWindows/ServerToClientReplicationWindow.h index 391693812d..bfaa351095 100644 --- a/Gems/Multiplayer/Code/Source/ReplicationWindows/ServerToClientReplicationWindow.h +++ b/Gems/Multiplayer/Code/Source/ReplicationWindows/ServerToClientReplicationWindow.h @@ -76,7 +76,6 @@ namespace Multiplayer //NetBindComponent* m_controlledNetBindComponent = nullptr; const AzNetworking::IConnection* m_connection = nullptr; - float m_minPriorityReplicated = 0.0f; ///< Lowest replicated entity priority in last update // Cached values to detect a poor network connection uint32_t m_lastCheckedSentPackets = 0; diff --git a/Gems/NvCloth/Code/Tests/System/FabricCookerTest.cpp b/Gems/NvCloth/Code/Tests/System/FabricCookerTest.cpp index f6f9947223..c5a22d02d1 100644 --- a/Gems/NvCloth/Code/Tests/System/FabricCookerTest.cpp +++ b/Gems/NvCloth/Code/Tests/System/FabricCookerTest.cpp @@ -140,9 +140,6 @@ namespace UnitTest TEST(NvClothSystem, FactoryCooker_CopyInternalCookedData_CopiedDataMatchesSource) { - const AZ::u32 data[] = { 0, 2, 45, 64, 125 }; - const size_t numDataElements = sizeof(data) / sizeof(data[0]); - nv::cloth::CookedData nvCookedData; nvCookedData.mNumParticles = 0; diff --git a/Gems/PhysX/Code/Source/Utils.cpp b/Gems/PhysX/Code/Source/Utils.cpp index 0b7ab9436b..8a76d6d986 100644 --- a/Gems/PhysX/Code/Source/Utils.cpp +++ b/Gems/PhysX/Code/Source/Utils.cpp @@ -654,10 +654,6 @@ namespace PhysX const AZ::Quaternion& colliderRelativeRotation, const AZ::Vector3& nonUniformScale) { - AZ::Transform transform = GetColliderWorldTransform(worldTransform, - colliderRelativePosition, - colliderRelativeRotation); - for (AZ::Vector3& point : pointsInOut) { point = worldTransform.TransformPoint(nonUniformScale * diff --git a/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersRagdollBenchmarks.cpp b/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersRagdollBenchmarks.cpp index 575ff7b4b7..8febfcddfc 100644 --- a/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersRagdollBenchmarks.cpp +++ b/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersRagdollBenchmarks.cpp @@ -225,7 +225,6 @@ namespace PhysX::Benchmarks } //enable and position the ragdolls - const int ragdollsPerCol = static_cast(RagdollConstants::TerrainSize / 10.0f) - 1; int idx = 0; for (auto& ragdoll : ragdolls) { diff --git a/Gems/PhysX/Code/Tests/CharacterControllerTests.cpp b/Gems/PhysX/Code/Tests/CharacterControllerTests.cpp index 53a7e20be6..c4cb4cc4ad 100644 --- a/Gems/PhysX/Code/Tests/CharacterControllerTests.cpp +++ b/Gems/PhysX/Code/Tests/CharacterControllerTests.cpp @@ -247,7 +247,6 @@ namespace PhysX for (int i = 0; i < 50; i++) { basis.Update(desiredVelocity); - AZ::Vector3 velocity = basis.m_controller->GetVelocity(); EXPECT_TRUE(basis.m_controller->GetVelocity().IsClose(AZ::Vector3::CreateZero())); } @@ -260,7 +259,6 @@ namespace PhysX for (int i = 0; i < 50; i++) { basis.Update(desiredVelocity); - AZ::Vector3 velocity = basis.m_controller->GetVelocity(); EXPECT_TRUE(basis.m_controller->GetVelocity().IsClose(desiredVelocity)); } } diff --git a/Gems/PhysX/Code/Tests/PhysXMultithreadingTest.cpp b/Gems/PhysX/Code/Tests/PhysXMultithreadingTest.cpp index cb200113bb..a0013402b1 100644 --- a/Gems/PhysX/Code/Tests/PhysXMultithreadingTest.cpp +++ b/Gems/PhysX/Code/Tests/PhysXMultithreadingTest.cpp @@ -140,11 +140,9 @@ namespace PhysX Log_Help(m_threadDesc.m_name, "Thread %d - sleeping for %dms\n", AZStd::this_thread::get_id(), m_waitTimeMilliseconds); AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(m_waitTimeMilliseconds)); Log_Help(m_threadDesc.m_name, "Thread %d - running cast\n", AZStd::this_thread::get_id()); - AZStd::chrono::system_clock::time_point startTime = AZStd::chrono::system_clock::now(); RunRequest(); - AZStd::chrono::microseconds exeTimeUS = AZStd::chrono::system_clock::now() - startTime; Log_Help(m_threadDesc.m_name, "Thread %d - complete - time %dus\n", AZStd::this_thread::get_id(), exeTimeUS.count()); } diff --git a/Gems/PhysX/Code/Tests/PhysXSceneQueryTests.cpp b/Gems/PhysX/Code/Tests/PhysXSceneQueryTests.cpp index caacf5dce2..48ae2e37d7 100644 --- a/Gems/PhysX/Code/Tests/PhysXSceneQueryTests.cpp +++ b/Gems/PhysX/Code/Tests/PhysXSceneQueryTests.cpp @@ -737,11 +737,11 @@ namespace PhysX auto* sceneInterface = AZ::Interface::Get(); //setup bodies - AzPhysics::SimulatedBodyHandle sphereHandle = TestUtils::AddSphereToScene(m_testSceneHandle, + TestUtils::AddSphereToScene(m_testSceneHandle, AZ::Vector3(10.0f, 0.0f, 0.0f), 3.0f); AzPhysics::SimulatedBodyHandle boxHandle = TestUtils::AddBoxToScene(m_testSceneHandle, AZ::Vector3(7.0f, 4.0f, 0.0f), AZ::Vector3(1.0f)); - AzPhysics::SimulatedBodyHandle capsuleHandle = TestUtils::AddCapsuleToScene(m_testSceneHandle, + TestUtils::AddCapsuleToScene(m_testSceneHandle, AZ::Vector3(15.0f, 0.0f, 0.0f), 3.0f, 1.0f); //Create request @@ -769,11 +769,11 @@ namespace PhysX auto* sceneInterface = AZ::Interface::Get(); //setup bodies - AzPhysics::SimulatedBodyHandle sphereHandle = TestUtils::AddSphereToScene(m_testSceneHandle, + TestUtils::AddSphereToScene(m_testSceneHandle, AZ::Vector3(10.0f, 0.0f, 0.0f), 3.0f); AzPhysics::SimulatedBodyHandle boxHandle = TestUtils::AddBoxToScene(m_testSceneHandle, AZ::Vector3(7.0f, 4.0f, 0.0f), AZ::Vector3(1.0f)); - AzPhysics::SimulatedBodyHandle capsuleHandle = TestUtils::AddCapsuleToScene(m_testSceneHandle, + TestUtils::AddCapsuleToScene(m_testSceneHandle, AZ::Vector3(15.0f, 0.0f, 0.0f), 3.0f, 1.0f); //Box Overlap Request @@ -824,9 +824,9 @@ namespace PhysX auto* sceneInterface = AZ::Interface::Get(); //setup bodies - AzPhysics::SimulatedBodyHandle sphereHandle = TestUtils::AddSphereToScene(m_testSceneHandle, + TestUtils::AddSphereToScene(m_testSceneHandle, AZ::Vector3(10.0f, 0.0f, 0.0f), 3.0f); - AzPhysics::SimulatedBodyHandle boxHandle = TestUtils::AddBoxToScene(m_testSceneHandle, + TestUtils::AddBoxToScene(m_testSceneHandle, AZ::Vector3(7.0f, 4.0f, 0.0f), AZ::Vector3(1.0f)); AzPhysics::SimulatedBodyHandle capsuleHandle = TestUtils::AddCapsuleToScene(m_testSceneHandle, AZ::Vector3(15.0f, 0.0f, 0.0f), 3.0f, 1.0f); @@ -863,9 +863,9 @@ namespace PhysX //setup bodies AzPhysics::SimulatedBodyHandle sphereHandle = TestUtils::AddSphereToScene(m_testSceneHandle, AZ::Vector3(10.0f, 0.0f, 0.0f), 3.0f, AzPhysics::CollisionLayer(0)); - AzPhysics::SimulatedBodyHandle boxHandle = TestUtils::AddBoxToScene(m_testSceneHandle, + TestUtils::AddBoxToScene(m_testSceneHandle, AZ::Vector3(12.0f, 0.0f, 0.0f), AZ::Vector3(1.0f), AzPhysics::CollisionLayer(1)); - AzPhysics::SimulatedBodyHandle capsuleHandle = TestUtils::AddCapsuleToScene(m_testSceneHandle, + TestUtils::AddCapsuleToScene(m_testSceneHandle, AZ::Vector3(14.0f, 0.0f, 0.0f), 3.0f, 1.0f, AzPhysics::CollisionLayer(2)); //Create Request diff --git a/Gems/PhysX/Code/Tests/PhysXSceneTests.cpp b/Gems/PhysX/Code/Tests/PhysXSceneTests.cpp index 5b90ef0004..7baaa34ab5 100644 --- a/Gems/PhysX/Code/Tests/PhysXSceneTests.cpp +++ b/Gems/PhysX/Code/Tests/PhysXSceneTests.cpp @@ -558,7 +558,7 @@ namespace PhysX // add a static simulated body - this is not expected to be reported as an active actor AzPhysics::StaticRigidBodyConfiguration staticConfig; staticConfig.m_colliderAndShapeData = shapeColliderData; - AzPhysics::SimulatedBodyHandle staticSphereHandle = sceneInterface->AddSimulatedBody(m_testSceneHandle, &staticConfig); + sceneInterface->AddSimulatedBody(m_testSceneHandle, &staticConfig); // add a rigid body - this is expect to be reported as an active actor AzPhysics::RigidBodyConfiguration rigidConfig; diff --git a/Gems/PhysX/Code/Tests/PhysXSpecificTest.cpp b/Gems/PhysX/Code/Tests/PhysXSpecificTest.cpp index 6e96db4db2..0c0eee3eb0 100644 --- a/Gems/PhysX/Code/Tests/PhysXSpecificTest.cpp +++ b/Gems/PhysX/Code/Tests/PhysXSpecificTest.cpp @@ -1126,7 +1126,7 @@ namespace PhysX return nullptr; }; - auto RemoveRigidBody = [this](AzPhysics::RigidBody*& rigidBody) + auto RemoveRigidBody = [](AzPhysics::RigidBody*& rigidBody) { auto* sceneInterface = AZ::Interface::Get(); if (rigidBody && sceneInterface) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h index e9586ac83a..9906c73cf5 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h @@ -148,7 +148,7 @@ namespace ScriptCanvas { static int indices[] = { inputDatumIndices... }; static_assert(sizeof...(Is) == AZ_ARRAY_SIZE(indices), "size of default values doesn't match input datum indices for them"); - std::initializer_list { (MoreHelp(node, indices[Is], AZStd::forward(args)), 0)... }; + [[maybe_unused]] std::initializer_list dummy = { (MoreHelp(node, indices[Is], AZStd::forward(args)), 0)... }; } template diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.cpp index adcf8c4ff8..ebb7a8233a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.cpp @@ -59,7 +59,7 @@ namespace ScriptCanvas if (sourceType == SourceType::SourceInput) { ContractDescriptor supportsMethodContract; - supportsMethodContract.m_createFunc = [this]() -> SupportsMethodContract* { return aznew SupportsMethodContract("Erase"); }; + supportsMethodContract.m_createFunc = []() -> SupportsMethodContract* { return aznew SupportsMethodContract("Erase"); }; contractDescs.push_back(AZStd::move(supportsMethodContract)); } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.cpp index 15f80896cd..d83711adbe 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.cpp @@ -23,7 +23,7 @@ namespace ScriptCanvas if (sourceType == SourceType::SourceInput) { ContractDescriptor supportsMethodContract; - supportsMethodContract.m_createFunc = [this]() -> SupportsMethodContract* { return aznew SupportsMethodContract("Front"); }; + supportsMethodContract.m_createFunc = []() -> SupportsMethodContract* { return aznew SupportsMethodContract("Front"); }; contractDescs.push_back(AZStd::move(supportsMethodContract)); } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.cpp index 30efece944..7374b3442f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.cpp @@ -21,7 +21,7 @@ namespace ScriptCanvas if (sourceType == SourceType::SourceInput) { ContractDescriptor supportsMethodContract; - supportsMethodContract.m_createFunc = [this]() -> SupportsMethodContract* { return aznew SupportsMethodContract("Insert"); }; + supportsMethodContract.m_createFunc = []() -> SupportsMethodContract* { return aznew SupportsMethodContract("Insert"); }; contractDescs.push_back(AZStd::move(supportsMethodContract)); } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.cpp index 04f6b0756e..5793d06aec 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.cpp @@ -21,7 +21,7 @@ namespace ScriptCanvas if (sourceType == SourceType::SourceInput) { ContractDescriptor supportsMethodContract; - supportsMethodContract.m_createFunc = [this]() -> SupportsMethodContract* { return aznew SupportsMethodContract("PushBack"); }; + supportsMethodContract.m_createFunc = []() -> SupportsMethodContract* { return aznew SupportsMethodContract("PushBack"); }; contractDescs.push_back(AZStd::move(supportsMethodContract)); } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Spawning/SpawnNodeable.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Spawning/SpawnNodeable.cpp index d11e916d42..e28ed9dce8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Spawning/SpawnNodeable.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Spawning/SpawnNodeable.cpp @@ -101,7 +101,7 @@ namespace ScriptCanvas::Nodeables::Spawning return; } - auto preSpawnCB = [this, translation, rotation, scale]([[maybe_unused]] AzFramework::EntitySpawnTicket::Id ticketId, + auto preSpawnCB = [translation, rotation, scale]([[maybe_unused]] AzFramework::EntitySpawnTicket::Id ticketId, AzFramework::SpawnableEntityContainerView view) { AZ::Entity* rootEntity = *view.begin(); diff --git a/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventsAssetRef.h b/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventsAssetRef.h index 506e1611bd..619dd42483 100644 --- a/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventsAssetRef.h +++ b/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventsAssetRef.h @@ -135,7 +135,6 @@ namespace ScriptEvents AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, m_asset.GetId()); if (assetInfo.m_assetId.IsValid()) { - const AZ::Data::AssetType assetTypeId = azrtti_typeid(); auto& assetManager = AZ::Data::AssetManager::Instance(); m_asset = assetManager.GetAsset(m_asset.GetId(), azrtti_typeid(), m_asset.GetAutoLoadBehavior()); diff --git a/Gems/ScriptEvents/Code/Tests/Tests/ScriptEventsTest_Core.cpp b/Gems/ScriptEvents/Code/Tests/Tests/ScriptEventsTest_Core.cpp index 7ae39db846..6da11deb95 100644 --- a/Gems/ScriptEvents/Code/Tests/Tests/ScriptEventsTest_Core.cpp +++ b/Gems/ScriptEvents/Code/Tests/Tests/ScriptEventsTest_Core.cpp @@ -406,26 +406,6 @@ namespace ScriptEventsTests EXPECT_TRUE(behaviorEbus->m_destroyHandler->Invoke(handler)); - auto onReady = [&assetData, &scriptEventName]() { - const char* renamedMethod = "__METHOD__1__"; - - ScriptEvents::ScriptEventsAsset* loadedScriptAsset = assetData.GetAs(); - EXPECT_TRUE(loadedScriptAsset); - - const ScriptEvents::ScriptEvent& loadedDefinition = loadedScriptAsset->m_definition; - - EXPECT_EQ(loadedDefinition.GetVersion(), 0); - EXPECT_STREQ(loadedDefinition.GetName().data(), scriptEventName.c_str()); - - - ScriptEvents::Method method; - bool foundMethod = loadedDefinition.FindMethod(renamedMethod, method); - EXPECT_TRUE(foundMethod); - EXPECT_EQ(method.GetNameProperty().GetVersion(), 1); - - assetData = {}; - }; - AssetEventHandler assetHandler2(assetId, []() {}, []() {}); assetHandler2.BusConnect(assetId); diff --git a/Gems/SurfaceData/Code/Include/SurfaceData/Tests/SurfaceDataTestMocks.h b/Gems/SurfaceData/Code/Include/SurfaceData/Tests/SurfaceDataTestMocks.h index 2f45d22748..11171215f7 100644 --- a/Gems/SurfaceData/Code/Include/SurfaceData/Tests/SurfaceDataTestMocks.h +++ b/Gems/SurfaceData/Code/Include/SurfaceData/Tests/SurfaceDataTestMocks.h @@ -293,7 +293,7 @@ namespace UnitTest SurfaceData::SurfaceDataRegistryHandle GetEntryHandle(AZ::EntityId id, const AZStd::vector& entryList) { // Look up the requested entity Id and see if we have a registered surface entry with that handle. If so, return the handle. - auto result = AZStd::find_if(entryList.begin(), entryList.end(), [this, id](const SurfaceData::SurfaceDataRegistryEntry& entry) { return entry.m_entityId == id; }); + auto result = AZStd::find_if(entryList.begin(), entryList.end(), [id](const SurfaceData::SurfaceDataRegistryEntry& entry) { return entry.m_entityId == id; }); if (result == entryList.end()) { return SurfaceData::InvalidSurfaceDataRegistryHandle; diff --git a/Gems/Twitch/Code/Source/TwitchREST.cpp b/Gems/Twitch/Code/Source/TwitchREST.cpp index 7403e927ca..a8aaa83fa0 100644 --- a/Gems/Twitch/Code/Source/TwitchREST.cpp +++ b/Gems/Twitch/Code/Source/TwitchREST.cpp @@ -69,7 +69,7 @@ namespace Twitch { AZStd::string url( BuildBaseURL("users", friendID) + "/friends/notifications"); - AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_DELETE, GetDefaultHeaders(), [receipt, this](const Aws::Utils::Json::JsonView& /*json*/, Aws::Http::HttpResponseCode httpCode) + AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_DELETE, GetDefaultHeaders(), [receipt](const Aws::Utils::Json::JsonView& /*json*/, Aws::Http::HttpResponseCode httpCode) { ResultCode rc(ResultCode::TwitchRESTError); @@ -87,7 +87,7 @@ namespace Twitch { AZStd::string url(BuildBaseURL("users", friendID) + "/friends/notifications"); - AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_GET, GetDefaultHeaders(), [receipt, this](const Aws::Utils::Json::JsonView& json, Aws::Http::HttpResponseCode httpCode) + AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_GET, GetDefaultHeaders(), [receipt](const Aws::Utils::Json::JsonView& json, Aws::Http::HttpResponseCode httpCode) { ResultCode rc(ResultCode::TwitchRESTError); AZ::s64 count = 0; @@ -203,7 +203,7 @@ namespace Twitch { AZStd::string url(BuildBaseURL("users") + "/friends/relationships/" + friendID); - AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_PUT, GetDefaultHeaders(), [receipt, this]([[maybe_unused]] const Aws::Utils::Json::JsonView& jsonDoc, Aws::Http::HttpResponseCode httpCode) + AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_PUT, GetDefaultHeaders(), [receipt]([[maybe_unused]] const Aws::Utils::Json::JsonView& jsonDoc, Aws::Http::HttpResponseCode httpCode) { ResultCode rc(ResultCode::TwitchRESTError); @@ -265,7 +265,7 @@ namespace Twitch { AZStd::string url(BuildBaseURL("users") + "/friends/requests/" + friendID); - AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_PUT, GetDefaultHeaders(), [receipt, this]([[maybe_unused]] const Aws::Utils::Json::JsonView& jsonDoc, Aws::Http::HttpResponseCode httpCode) + AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_PUT, GetDefaultHeaders(), [receipt]([[maybe_unused]] const Aws::Utils::Json::JsonView& jsonDoc, Aws::Http::HttpResponseCode httpCode) { ResultCode rc(ResultCode::TwitchRESTError); @@ -282,7 +282,7 @@ namespace Twitch { AZStd::string url(BuildBaseURL("users") + "/friends/requests/" + friendID); - AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_DELETE, GetDefaultHeaders(), [receipt, this]([[maybe_unused]] const Aws::Utils::Json::JsonView& jsonDoc, Aws::Http::HttpResponseCode httpCode) + AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_DELETE, GetDefaultHeaders(), [receipt]([[maybe_unused]] const Aws::Utils::Json::JsonView& jsonDoc, Aws::Http::HttpResponseCode httpCode) { ResultCode rc(ResultCode::TwitchRESTError); diff --git a/Gems/Vegetation/Code/Source/Components/BlockerComponent.cpp b/Gems/Vegetation/Code/Source/Components/BlockerComponent.cpp index e26f1aee47..0f45e532d9 100644 --- a/Gems/Vegetation/Code/Source/Components/BlockerComponent.cpp +++ b/Gems/Vegetation/Code/Source/Components/BlockerComponent.cpp @@ -222,7 +222,7 @@ namespace Vegetation for (const auto& id : processedIds) { bool accepted = true; - FilterRequestBus::EnumerateHandlersId(id, [this, &instanceData, &accepted](FilterRequestBus::Events* handler) { + FilterRequestBus::EnumerateHandlersId(id, [&instanceData, &accepted](FilterRequestBus::Events* handler) { accepted = handler->Evaluate(instanceData); return accepted; }); diff --git a/Gems/Vegetation/Code/Source/Components/MeshBlockerComponent.cpp b/Gems/Vegetation/Code/Source/Components/MeshBlockerComponent.cpp index 52461e691c..dc205079fd 100644 --- a/Gems/Vegetation/Code/Source/Components/MeshBlockerComponent.cpp +++ b/Gems/Vegetation/Code/Source/Components/MeshBlockerComponent.cpp @@ -259,7 +259,7 @@ namespace Vegetation for (const auto& id : processedIds) { bool accepted = true; - FilterRequestBus::EnumerateHandlersId(id, [this, &instanceData, &accepted](FilterRequestBus::Events* handler) { + FilterRequestBus::EnumerateHandlersId(id, [&instanceData, &accepted](FilterRequestBus::Events* handler) { accepted = handler->Evaluate(instanceData); return accepted; }); diff --git a/Gems/Vegetation/Code/Source/PrefabInstanceSpawner.cpp b/Gems/Vegetation/Code/Source/PrefabInstanceSpawner.cpp index 2189929fa3..efeb60d598 100644 --- a/Gems/Vegetation/Code/Source/PrefabInstanceSpawner.cpp +++ b/Gems/Vegetation/Code/Source/PrefabInstanceSpawner.cpp @@ -325,7 +325,7 @@ namespace Vegetation // Create a callback for SpawnAllEntities that will set the transform of the root entity to the correct position / rotation / scale // for our spawned instance. - auto preSpawnCB = [this, world]( + auto preSpawnCB = [world]( [[maybe_unused]] AzFramework::EntitySpawnTicket::Id ticketId, AzFramework::SpawnableEntityContainerView view) { AZ::Entity* rootEntity = *view.begin(); diff --git a/Gems/Vegetation/Code/Tests/VegetationTest.h b/Gems/Vegetation/Code/Tests/VegetationTest.h index 6638b54a40..cf7c9b70a1 100644 --- a/Gems/Vegetation/Code/Tests/VegetationTest.h +++ b/Gems/Vegetation/Code/Tests/VegetationTest.h @@ -77,7 +77,6 @@ namespace UnitTest claimContext.m_existedCallback = [this](const Vegetation::ClaimPoint&, const Vegetation::InstanceData&) { - m_existedCallbackCount; return m_existedCallbackOutput; };