diff --git a/Code/Framework/AzCore/AzCore/RTTI/RTTI.h b/Code/Framework/AzCore/AzCore/RTTI/RTTI.h index 1f133c3256..1dddf76556 100644 --- a/Code/Framework/AzCore/AzCore/RTTI/RTTI.h +++ b/Code/Framework/AzCore/AzCore/RTTI/RTTI.h @@ -517,7 +517,7 @@ namespace AZ bool result = GetTypeId() == id; using dummy = bool[]; - dummy{ true, (IsTypeOfInternal(result, id), true)... }; + [[maybe_unused]] dummy d = { true, (IsTypeOfInternal(result, id), true)... }; return result; } diff --git a/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp index 5bcdc3d719..8688f6b878 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp @@ -2330,7 +2330,6 @@ namespace AZ::IO // we only want to record ASSET access // assets are identified as things which start with no alias, or with the @assets@ alias auto assetPath = AZ::IO::FileIOBase::GetInstance()->ConvertToAlias(szFilename); - constexpr AZStd::string_view assetsAlias{ "@assets@" }; if (assetPath && assetPath->Native().starts_with("@assets@")) { IResourceList* pList = GetResourceList(m_eRecordFileOpenList); diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ZipDirCache.cpp b/Code/Framework/AzFramework/AzFramework/Archive/ZipDirCache.cpp index d74f69e27b..81f26d78b8 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/ZipDirCache.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/ZipDirCache.cpp @@ -887,7 +887,6 @@ namespace AZ::IO::ZipDir { FileRecordList arrFiles(GetRoot()); arrFiles.SortByFileOffset(); - FileRecordList::ZipStats Stats = arrFiles.GetStats(); // we back up our file entries, because we'll need to restore them // in case the operation fails diff --git a/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp b/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp index 292cce29ec..0791c8d3dc 100644 --- a/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp +++ b/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp @@ -290,7 +290,7 @@ namespace AzFramework namespace Internal { - static AZStd::string PrintLuaValue(lua_State* lua, int stackIdx, int depth = 0) + AZStd::string PrintLuaValue(lua_State* lua, int stackIdx, int depth = 0) { constexpr int MaxDepth = 4; if (depth > MaxDepth) diff --git a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpListenThread.cpp b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpListenThread.cpp index 9a3c038a73..e65f01509e 100644 --- a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpListenThread.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpListenThread.cpp @@ -118,7 +118,7 @@ namespace AzNetworking const int32_t connectionLength = aznumeric_cast(sizeof(newConnection)); memset(&newConnection, 0, connectionLength); - auto readCallback = [this, newConnection, connectionLength](SocketFd socketFd) + auto readCallback = [this, newConnection](SocketFd socketFd) { auto visitor = [this, newConnection, socketFd](ListenPort& listenPort) { diff --git a/Code/Legacy/CrySystem/AZCoreLogSink.h b/Code/Legacy/CrySystem/AZCoreLogSink.h index d9e815841c..e824c4c172 100644 --- a/Code/Legacy/CrySystem/AZCoreLogSink.h +++ b/Code/Legacy/CrySystem/AZCoreLogSink.h @@ -51,10 +51,10 @@ public: static bool IsCryLogReady() { - static bool hasSetCVar = false; bool ready = gEnv && gEnv->pSystem && gEnv->pLog; #ifdef _RELEASE + static bool hasSetCVar = false; if(!hasSetCVar && ready) { // AZ logging only has a concept of 3 levels (error, warning, info) but cry logging has 4 levels (..., messaging). If info level is set, we'll turn on messaging as well diff --git a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp index f866ee2864..0ac7b0bdce 100644 --- a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp +++ b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp @@ -56,7 +56,6 @@ namespace LegacyLevelSystem //------------------------------------------------------------------------ SpawnableLevelSystem::SpawnableLevelSystem(ISystem* pSystem) - : m_pSystem(pSystem) { CRY_ASSERT(pSystem); diff --git a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.h b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.h index 858a0b24f0..0a7b821262 100644 --- a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.h +++ b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.h @@ -66,8 +66,6 @@ class SpawnableLevelSystem void LogLoadingTime(); - ISystem* m_pSystem{nullptr}; - AZStd::string m_lastLevelName; float m_fLastLevelLoadTime{0.0f}; float m_fLastTime{0.0f}; diff --git a/Code/Legacy/CrySystem/System.cpp b/Code/Legacy/CrySystem/System.cpp index 452ebea302..28940e32ac 100644 --- a/Code/Legacy/CrySystem/System.cpp +++ b/Code/Legacy/CrySystem/System.cpp @@ -1259,9 +1259,6 @@ ILocalizationManager* CSystem::GetLocalizationManager() ////////////////////////////////////////////////////////////////////////// void CSystem::debug_GetCallStackRaw(void** callstack, uint32& callstackLength) { - uint32 callstackCapacity = callstackLength; - uint32 nNumStackFramesToSkip = 1; - memset(callstack, 0, sizeof(void*) * callstackLength); #if !defined(ANDROID) @@ -1269,6 +1266,8 @@ void CSystem::debug_GetCallStackRaw(void** callstack, uint32& callstackLength) #endif #if AZ_LEGACY_CRYSYSTEM_TRAIT_CAPTURESTACK + uint32 nNumStackFramesToSkip = 1; + uint32 callstackCapacity = callstackLength; if (callstackCapacity > 0x40) { callstackCapacity = 0x40; diff --git a/Code/Legacy/CrySystem/SystemInit.cpp b/Code/Legacy/CrySystem/SystemInit.cpp index dcfeb90484..665ba126c2 100644 --- a/Code/Legacy/CrySystem/SystemInit.cpp +++ b/Code/Legacy/CrySystem/SystemInit.cpp @@ -1858,19 +1858,6 @@ void CSystem::CreateSystemVars() "Usage: e_EntitySuppressionLevel [0-infinity]\n" "Default is 0 (off)"); -#if defined(WIN32) || defined(WIN64) - const uint32 nJobSystemDefaultCoreNumber = 8; -#define AZ_RESTRICTED_SECTION_IMPLEMENTED -#elif defined(AZ_RESTRICTED_PLATFORM) -#define AZ_RESTRICTED_SECTION SYSTEMINIT_CPP_SECTION_11 -#include AZ_RESTRICTED_FILE(SystemInit_cpp) -#endif -#if defined(AZ_RESTRICTED_SECTION_IMPLEMENTED) -#undef AZ_RESTRICTED_SECTION_IMPLEMENTED -#else - const uint32 nJobSystemDefaultCoreNumber = 4; -#endif - m_sys_firstlaunch = REGISTER_INT("sys_firstlaunch", 0, 0, "Indicates that the game was run for the first time."); diff --git a/Gems/AWSCore/Code/Include/Public/Framework/JsonObjectHandler.h b/Gems/AWSCore/Code/Include/Public/Framework/JsonObjectHandler.h index 85461ff644..57eabe3593 100644 --- a/Gems/AWSCore/Code/Include/Public/Framework/JsonObjectHandler.h +++ b/Gems/AWSCore/Code/Include/Public/Framework/JsonObjectHandler.h @@ -67,7 +67,6 @@ namespace AWSCore AZStd::string GetContent() { - std::istream::pos_type pos = m_is.tellg(); m_is.seekg(0); std::istreambuf_iterator eos; AZStd::string content{ std::istreambuf_iterator(m_is),eos }; diff --git a/Gems/AWSCore/Code/Source/Framework/HttpRequestJob.cpp b/Gems/AWSCore/Code/Source/Framework/HttpRequestJob.cpp index ee9459b9af..7c41695fe1 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 int AZ_JOIN(init, __LINE__)((AWS_CORE_ONCE_PASTE(x), 0)) +#define AWS_CORE_ONCE(x) static [[maybe_unused]] 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/Atom/Component/DebugCamera/Code/Source/NoClipControllerComponent.cpp b/Gems/Atom/Component/DebugCamera/Code/Source/NoClipControllerComponent.cpp index b2d2a4bb15..d9979c455b 100644 --- a/Gems/Atom/Component/DebugCamera/Code/Source/NoClipControllerComponent.cpp +++ b/Gems/Atom/Component/DebugCamera/Code/Source/NoClipControllerComponent.cpp @@ -388,9 +388,9 @@ namespace AZ m_properties = properties; } - void NoClipControllerComponent::SetTouchSensitivity([[maybe_unused]] float touchSensitivity) + void NoClipControllerComponent::SetTouchSensitivity(float touchSensitivity) { - m_properties.m_touchSensitivity; + m_properties.m_touchSensitivity = touchSensitivity; } void NoClipControllerComponent::SetPosition(AZ::Vector3 position) diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.cpp index 6a418117fc..0d089a26bf 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.cpp @@ -471,7 +471,7 @@ namespace AZ const RPI::RenderPipelineId& renderPipelineId) { ShadowProperty& property = m_shadowProperties.GetData(handle.GetIndex()); - auto update = [this, handle, &property, &baseCameraConfiguration](const RPI::View* view) + auto update = [&property, &baseCameraConfiguration](const RPI::View* view) { CascadeShadowCameraConfiguration& cameraConfig = property.m_cameraConfigurations[view]; if (!cameraConfig.HasSameConfiguration(baseCameraConfiguration)) diff --git a/Gems/Atom/Feature/Common/Code/Source/Decals/AsyncLoadTracker.h b/Gems/Atom/Feature/Common/Code/Source/Decals/AsyncLoadTracker.h index dd035afec6..8e03cc51fe 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Decals/AsyncLoadTracker.h +++ b/Gems/Atom/Feature/Common/Code/Source/Decals/AsyncLoadTracker.h @@ -97,7 +97,6 @@ namespace AZ { const auto iter = AZStd::find(vec.begin(), vec.end(), elementToErase); AZ_Assert(iter != vec.end(), "EraseFromVector failed to find the given object"); - const auto indexToRemove = AZStd::distance(vec.begin(), iter); AZStd::swap(*iter, vec.back()); vec.pop_back(); } diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp index a4d24b7cb1..4d58948b98 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp @@ -731,7 +731,6 @@ namespace AZ } const RHI::ShaderResourceGroupLayout* srgLayout = m_classificationSrg->GetLayout(); - RHI::ShaderInputConstantIndex constantIndex; RHI::ShaderInputImageIndex imageIndex; imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeRayTrace")); diff --git a/Gems/Atom/Feature/Common/Code/Source/ProfilingCaptureSystemComponent.cpp b/Gems/Atom/Feature/Common/Code/Source/ProfilingCaptureSystemComponent.cpp index 7c6dfcf744..db9da271bc 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ProfilingCaptureSystemComponent.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ProfilingCaptureSystemComponent.cpp @@ -453,7 +453,7 @@ namespace AZ RHI::CpuProfiler::Get()->SetProfilerEnabled(true); } - const bool captureStarted = m_cpuFrameTimeStatisticsCapture.StartCapture([this, outputFilePath, wasEnabled]() + const bool captureStarted = m_cpuFrameTimeStatisticsCapture.StartCapture([outputFilePath, wasEnabled]() { JsonSerializerSettings serializationSettings; serializationSettings.m_keepDefaults = true; @@ -603,7 +603,7 @@ namespace AZ RHI::CpuProfiler::Get()->SetProfilerEnabled(true); } - const bool captureStarted = m_cpuProfilingStatisticsCapture.StartCapture([this, outputFilePath, wasEnabled]() + const bool captureStarted = m_cpuProfilingStatisticsCapture.StartCapture([outputFilePath, wasEnabled]() { // Blocking call for a single frame of data, avoid thread overhead AZStd::ring_buffer singleFrameData(1); @@ -669,7 +669,7 @@ namespace AZ bool ProfilingCaptureSystemComponent::CaptureBenchmarkMetadata(const AZStd::string& benchmarkName, const AZStd::string& outputFilePath) { - const bool captureStarted = m_benchmarkMetadataCapture.StartCapture([this, benchmarkName, outputFilePath]() + const bool captureStarted = m_benchmarkMetadataCapture.StartCapture([benchmarkName, outputFilePath]() { JsonSerializerSettings serializationSettings; serializationSettings.m_keepDefaults = true; diff --git a/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp index 31899b9bb6..ea89f64b73 100644 --- a/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp @@ -458,9 +458,7 @@ namespace AZ void RayTracingFeatureProcessor::UpdateRayTracingMaterialSrg() { const RHI::ShaderResourceGroupLayout* srgLayout = m_rayTracingMaterialSrg->GetLayout(); - RHI::ShaderInputImageIndex imageIndex; RHI::ShaderInputBufferIndex bufferIndex; - RHI::ShaderInputConstantIndex constantIndex; bufferIndex = srgLayout->FindShaderInputBufferIndex(AZ::Name("m_materialInfo")); m_rayTracingMaterialSrg->SetBufferView(bufferIndex, m_materialInfoBuffer->GetBufferView()); diff --git a/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.cpp index 0e42c5520e..68dac8f773 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.cpp @@ -418,7 +418,6 @@ namespace AZ::Render } const FilterParameter& filter = m_shadowData.GetElement(shadowProperty.m_shadowId.GetIndex()); const float boundaryWidthAngle = shadow.m_boundaryScale * 2.0f; - constexpr float SmallAngle = 0.01f; const float fieldOfView = GetMax(shadowProperty.m_desc.m_fieldOfViewYRadians, MinimumFieldOfView); const float ratioToEntireWidth = boundaryWidthAngle / fieldOfView; const float widthInPixels = ratioToEntireWidth * filter.m_shadowmapSize; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp index 841607404a..d7299998db 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp @@ -596,7 +596,7 @@ namespace AZ jobData->m_maskedOcclusionCulling = maskedOcclusionCulling; #endif - auto nodeVisitorLambda = [this, jobData, &parentJob, &frustum, &worklist](const AzFramework::IVisibilityScene::NodeData& nodeData) -> void + auto nodeVisitorLambda = [jobData, &parentJob, &worklist](const AzFramework::IVisibilityScene::NodeData& nodeData) -> void { AZ_PROFILE_SCOPE(AzRender, "nodeVisitorLambda()"); AZ_Assert(nodeData.m_entries.size() > 0, "should not get called with 0 entries"); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/MeshDrawPacket.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/MeshDrawPacket.cpp index 7fd7133cee..4ecef9dba5 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/MeshDrawPacket.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/MeshDrawPacket.cpp @@ -88,7 +88,7 @@ namespace AZ } else { - itEntry->second == value; + itEntry->second = value; } } } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassLibrary.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassLibrary.cpp index ca49843efb..8eedf3aa1f 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassLibrary.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassLibrary.cpp @@ -247,8 +247,6 @@ namespace AZ void PassLibrary::OnAssetReloaded(Data::Asset asset) { - Data::AssetId assetId = asset->GetId(); - // Handle pass asset reload Data::Asset passAsset = { asset.GetAs(), AZ::Data::AssetLoadBehavior::PreLoad }; if (passAsset && passAsset->GetPassTemplate()) diff --git a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiCpuProfiler.inl b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiCpuProfiler.inl index a225646761..27d89d0cba 100644 --- a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiCpuProfiler.inl +++ b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiCpuProfiler.inl @@ -367,14 +367,12 @@ namespace AZ const AZ::RHI::CpuTimingStatistics& cpuTimingStatistics = m_cpuTimingStatisticsWhenPause; - const AZStd::sys_time_t ticksPerSecond = AZStd::GetTimeTicksPerSecond(); - - const auto ShowTimeInMs = [ticksPerSecond](AZStd::sys_time_t duration) + const auto ShowTimeInMs = [](AZStd::sys_time_t duration) { ImGui::Text("%.2f ms", CpuProfilerImGuiHelper::TicksToMs(duration)); }; - const auto ShowRow = [ticksPerSecond, &ShowTimeInMs](const char* regionLabel, AZStd::sys_time_t duration) + const auto ShowRow = [&ShowTimeInMs](const char* regionLabel, AZStd::sys_time_t duration) { ImGui::Text(regionLabel); ImGui::NextColumn(); @@ -591,7 +589,6 @@ namespace AZ else if (io.MouseWheel != 0 && io.KeyCtrl) // Zooming { // We want zooming to be relative to the mouse's current position - const float mouseVel = io.MouseWheel; const float mouseX = ImGui::GetMousePos().x; // Find the normalized position of the cursor relative to the window diff --git a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiGpuProfiler.inl b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiGpuProfiler.inl index e6bde136f8..c6f5f8c725 100644 --- a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiGpuProfiler.inl +++ b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiGpuProfiler.inl @@ -1333,7 +1333,7 @@ namespace AZ inline PassEntry* ImGuiGpuProfiler::CreatePassEntries(RHI::Ptr rootPass) { AZStd::unordered_map passEntryDatabase; - const auto addPassEntry = [&passEntryDatabase, this](const RPI::Pass* pass, PassEntry* parent) -> PassEntry* + const auto addPassEntry = [&passEntryDatabase](const RPI::Pass* pass, PassEntry* parent) -> PassEntry* { // If parent a nullptr, it's assumed to be the rootpass. if (parent == nullptr) diff --git a/Gems/Atom/Utils/Code/Include/Atom/Utils/StableDynamicArray.inl b/Gems/Atom/Utils/Code/Include/Atom/Utils/StableDynamicArray.inl index 25f3f528ab..870ed04b33 100644 --- a/Gems/Atom/Utils/Code/Include/Atom/Utils/StableDynamicArray.inl +++ b/Gems/Atom/Utils/Code/Include/Atom/Utils/StableDynamicArray.inl @@ -305,7 +305,7 @@ namespace AZ template size_t StableDynamicArray::Page::Reserve() { - for (m_bitStartIndex; m_bitStartIndex < NumUint64_t; ++m_bitStartIndex) + for (; m_bitStartIndex < NumUint64_t; ++m_bitStartIndex) { if (m_bits[m_bitStartIndex] != FullBits) { @@ -462,7 +462,7 @@ namespace AZ } // skip the empty bitfields in the page - for (m_bitGroupIndex; m_bitGroupIndex < Page::NumUint64_t && m_page->m_bits.at(m_bitGroupIndex) == 0; ++m_bitGroupIndex) + for (; m_bitGroupIndex < Page::NumUint64_t && m_page->m_bits.at(m_bitGroupIndex) == 0; ++m_bitGroupIndex) { } diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/PerViewportDynamicDrawManager.cpp b/Gems/AtomLyIntegration/AtomBridge/Code/Source/PerViewportDynamicDrawManager.cpp index 414dd7cdf0..c0627d38da 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/PerViewportDynamicDrawManager.cpp +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/PerViewportDynamicDrawManager.cpp @@ -86,7 +86,7 @@ namespace AZ::AtomBridge context.second->SetOutputScope(pipeline.get()); } }); - viewportData.m_viewportDestroyedHandler = AZ::Event::Handler([this, viewportId](AzFramework::ViewportId id) + viewportData.m_viewportDestroyedHandler = AZ::Event::Handler([this](AzFramework::ViewportId id) { AZStd::lock_guard lock(m_mutexDrawContexts); m_viewportData.erase(id); diff --git a/Gems/AtomLyIntegration/AtomFont/Code/Include/AtomLyIntegration/AtomFont/AtomFont.h b/Gems/AtomLyIntegration/AtomFont/Code/Include/AtomLyIntegration/AtomFont/AtomFont.h index f5883232eb..6d361c01ae 100644 --- a/Gems/AtomLyIntegration/AtomFont/Code/Include/AtomLyIntegration/AtomFont/AtomFont.h +++ b/Gems/AtomLyIntegration/AtomFont/Code/Include/AtomLyIntegration/AtomFont/AtomFont.h @@ -136,7 +136,6 @@ namespace AZ FontMap m_fonts; FontFamilyMap m_fontFamilies; //!< Map font family names to weak ptrs so we can construct shared_ptrs but not keep a ref ourselves. FontFamilyReverseLookupMap m_fontFamilyReverseLookup; //GetViewportSize(); AzFramework::CameraState cameraState; AzFramework::SetCameraClippingVolumeFromPerspectiveFovMatrixRH(cameraState, currentView->GetViewToClipMatrix()); const AZ::Transform transform = currentView->GetCameraTransform(); diff --git a/Gems/AudioSystem/Code/Source/Engine/ATL.cpp b/Gems/AudioSystem/Code/Source/Engine/ATL.cpp index ff56300b85..f49cc1304a 100644 --- a/Gems/AudioSystem/Code/Source/Engine/ATL.cpp +++ b/Gems/AudioSystem/Code/Source/Engine/ATL.cpp @@ -1155,7 +1155,6 @@ namespace Audio EAudioRequestStatus eResult = eARS_FAILURE; const TAudioObjectID nATLObjectID = pAudioObject->GetID(); - const TAudioControlID nATLTriggerID = pTrigger->GetID(); const TObjectTriggerImplStates& rTriggerImplStates = pAudioObject->GetTriggerImpls(); for (auto const triggerImpl : pTrigger->m_cImplPtrs) @@ -1357,7 +1356,6 @@ namespace Audio { EAudioRequestStatus eResult = eARS_FAILURE; - const TAudioObjectID nATLObjectID = pAudioObject->GetID(); const TAudioControlID nATLTriggerID = pTrigger->GetID(); TObjectEventSet rEvents = pAudioObject->GetActiveEvents(); diff --git a/Gems/AudioSystem/Code/Source/Engine/ATLAudioObject.cpp b/Gems/AudioSystem/Code/Source/Engine/ATLAudioObject.cpp index 980757ffca..c8548efa04 100644 --- a/Gems/AudioSystem/Code/Source/Engine/ATLAudioObject.cpp +++ b/Gems/AudioSystem/Code/Source/Engine/ATLAudioObject.cpp @@ -1042,7 +1042,8 @@ namespace Audio auxGeom.SetRenderFlags(newRenderFlags); const bool drawRays = CVars::s_debugDrawOptions.AreAllFlagsActive(DebugDraw::Options::DrawRays); - const bool drawLabels = CVars::s_debugDrawOptions.AreAllFlagsActive(DebugDraw::Options::RayLabels); + // ToDo: Update to work with Atom? LYN-3677 + //const bool drawLabels = CVars::s_debugDrawOptions.AreAllFlagsActive(DebugDraw::Options::RayLabels); size_t numRays = m_obstOccType == eAOOCT_SINGLE_RAY ? 1 : s_maxRaysPerObject; for (size_t rayIndex = 0; rayIndex < numRays; ++rayIndex) diff --git a/Gems/AudioSystem/Code/Source/Engine/ATLComponents.cpp b/Gems/AudioSystem/Code/Source/Engine/ATLComponents.cpp index 91340ca9bb..996a2a80b6 100644 --- a/Gems/AudioSystem/Code/Source/Engine/ATLComponents.cpp +++ b/Gems/AudioSystem/Code/Source/Engine/ATLComponents.cpp @@ -284,10 +284,9 @@ namespace Audio /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// - CAudioObjectManager::CAudioObjectManager(CAudioEventManager& refAudioEventManager) + CAudioObjectManager::CAudioObjectManager([[maybe_unused]] CAudioEventManager& refAudioEventManager) : m_cObjectPool(Audio::CVars::s_AudioObjectPoolSize, AudioObjectIDFactory::s_minValidAudioObjectID) , m_fTimeSinceLastVelocityUpdateMS(0.0f) - , m_refAudioEventManager(refAudioEventManager) #if !defined(AUDIO_RELEASE) , m_pDebugNameStore(nullptr) #endif // !AUDIO_RELEASE @@ -1777,7 +1776,6 @@ namespace Audio static float const fItemPlayingColor[4] = { 0.3f, 0.6f, 0.3f, 0.9f }; static float const fItemLoadingColor[4] = { 0.9f, 0.2f, 0.2f, 0.9f }; static float const fItemOtherColor[4] = { 0.8f, 0.8f, 0.8f, 0.9f }; - static float const fNoImplColor[4] = { 1.0f, 0.6f, 0.6f, 0.9f }; rAuxGeom.Draw2dLabel(fPosX, fPosY, 1.6f, fHeaderColor, false, "Audio Events [%zu]", m_cActiveAudioEvents.size()); fPosX += 20.0f; diff --git a/Gems/AudioSystem/Code/Source/Engine/ATLComponents.h b/Gems/AudioSystem/Code/Source/Engine/ATLComponents.h index 17a1b65afe..efdee4fd2f 100644 --- a/Gems/AudioSystem/Code/Source/Engine/ATLComponents.h +++ b/Gems/AudioSystem/Code/Source/Engine/ATLComponents.h @@ -160,8 +160,6 @@ namespace Audio CInstanceManager m_cObjectPool; float m_fTimeSinceLastVelocityUpdateMS; - CAudioEventManager& m_refAudioEventManager; - AudioRaycastManager m_raycastManager; }; diff --git a/Gems/AudioSystem/Code/Source/Engine/AudioSystem.cpp b/Gems/AudioSystem/Code/Source/Engine/AudioSystem.cpp index 43ab47266a..09732fa52f 100644 --- a/Gems/AudioSystem/Code/Source/Engine/AudioSystem.cpp +++ b/Gems/AudioSystem/Code/Source/Engine/AudioSystem.cpp @@ -293,7 +293,7 @@ namespace Audio PushRequestBlocking(request); m_audioSystemThread.Deactivate(); - const bool bSuccess = m_oATL.ShutDown(); + m_oATL.ShutDown(); m_bSystemInitialized = false; } diff --git a/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp b/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp index 791c86eba8..b106c4f9d2 100644 --- a/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp +++ b/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp @@ -841,7 +841,7 @@ namespace Audio streamer->SetRequestCompleteCallback( audioFileEntry->m_asyncStreamRequest, - [this](AZ::IO::FileRequestHandle request) + [](AZ::IO::FileRequestHandle request) { AZ_PROFILE_FUNCTION(Audio); AudioFileCacheManagerNotficationBus::QueueBroadcast( diff --git a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/ActorCommands.cpp b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/ActorCommands.cpp index da5366f6cf..85bb726822 100644 --- a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/ActorCommands.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/ActorCommands.cpp @@ -145,7 +145,6 @@ namespace CommandSystem AZStd::vector nodeNames; AzFramework::StringFunc::Tokenize(attachmentNodes.c_str(), nodeNames, ";", false, true); - const size_t numNodeNames = nodeNames.size(); // Remove the given nodes from the attachment node list by unsetting the flag. if (AzFramework::StringFunc::Equal(nodeAction.c_str(), "remove")) @@ -224,7 +223,6 @@ namespace CommandSystem AZStd::vector nodeNames; AzFramework::StringFunc::Tokenize(nodesExcludedFromBounds.c_str(), nodeNames, ";", false, true); - const size_t numNodeNames = nodeNames.size(); // Remove the selected nodes from the bounding volume calculations. if (AzFramework::StringFunc::Equal(nodeAction.c_str(), "remove")) diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/Importer/ChunkProcessors.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/Importer/ChunkProcessors.cpp index 7d800f8928..fad160407b 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/Importer/ChunkProcessors.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/Importer/ChunkProcessors.cpp @@ -1585,9 +1585,6 @@ namespace EMotionFX // get the expression name const char* morphTargetName = SharedHelperData::ReadString(file, importParams.m_sharedData, endianType); - // get the level of detail of the expression part - const uint32 morphTargetLOD = morphTargetChunk.m_lod; - if (GetLogging()) { MCore::LogDetailedInfo(" + Morph Target:"); @@ -1732,9 +1729,6 @@ namespace EMotionFX // get the expression name const char* morphTargetName = SharedHelperData::ReadString(file, importParams.m_sharedData, endianType); - // get the level of detail of the expression part - const uint32 morphTargetLOD = morphTargetChunk.m_lod; - if (GetLogging()) { MCore::LogDetailedInfo(" + Morph Target:"); diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/RagdollInstance.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/RagdollInstance.cpp index c7da3430b1..b139133c49 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/RagdollInstance.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/RagdollInstance.cpp @@ -500,7 +500,6 @@ namespace EMotionFX const Physics::RagdollNodeState& targetJointPose = ragdollTargetPose[ragdollJointIndex.GetValue()]; const Physics::RagdollNodeState& targetParentJointPose = ragdollTargetPose[ragdollParentJointIndex.GetValue()]; - const float strength = targetJointPose.m_strength; if (targetParentJointPose.m_simulationType == Physics::SimulationType::Dynamic) { diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/SpringSolver.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/SpringSolver.cpp index 83cbc41a36..adf0a0cc2b 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/SpringSolver.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/SpringSolver.cpp @@ -310,7 +310,6 @@ namespace EMotionFX SetParentParticle(parentParticleIndex); // Register the joint, which creates a particle internally. - const bool isPinned = (parentParticleIndex != InvalidIndex) ? joint->IsPinned() : true; SpringSolver::Particle* particle = AddJoint(joint); if (!particle) { diff --git a/Gems/GradientSignal/Code/Include/GradientSignal/SmoothStep.h b/Gems/GradientSignal/Code/Include/GradientSignal/SmoothStep.h index f60cf4804c..0489fa4893 100644 --- a/Gems/GradientSignal/Code/Include/GradientSignal/SmoothStep.h +++ b/Gems/GradientSignal/Code/Include/GradientSignal/SmoothStep.h @@ -37,7 +37,6 @@ namespace GradientSignal float output = 0.0f; const float value = AZ::GetClamp(inputValue, 0.0f, 1.0f); - const float valueFalloffRange = AZ::GetClamp(m_falloffRange, 0.0f, 1.0f); const float valueFalloffStrength = AZ::GetClamp(m_falloffStrength, 0.0f, 1.0f); float min = m_falloffMidpoint - m_falloffRange / 2.0f; diff --git a/Gems/ImGui/Code/Source/ImGuiManager.cpp b/Gems/ImGui/Code/Source/ImGuiManager.cpp index 427af6d7dc..6fc1ea8b71 100644 --- a/Gems/ImGui/Code/Source/ImGuiManager.cpp +++ b/Gems/ImGui/Code/Source/ImGuiManager.cpp @@ -81,59 +81,6 @@ namespace const auto& it = AZStd::find(touches.cbegin(), touches.cend(), inputChannelId); return it != touches.cend() ? static_cast(it - touches.cbegin()) : UINT_MAX; } - - /** - Utility function to map an AzFrameworkInput controller button to its integer index. - - @param inputChannelId the ID for an AzFrameworkInput controller button. - @return the index of the indicated button, or -1 if not found. - */ - unsigned int GetAzControllerButtonIndex(const InputChannelId& inputChannelId) - { - const auto& buttons = InputDeviceGamepad::Button::All; - const auto& triggers = InputDeviceGamepad::Trigger::All; - const auto& it = AZStd::find(buttons.cbegin(), buttons.cend(), inputChannelId); - if (it != buttons.cend()) - { - return static_cast(it - buttons.cbegin()); - } - else - { - const auto& it2 = AZStd::find(triggers.cbegin(), triggers.cend(), inputChannelId); - if (it2 != triggers.cend()) - { - return static_cast(it2 - triggers.cbegin()) + AZ_ARRAY_SIZE(InputDeviceGamepad::Button::All); - } - } - - return UINT_MAX; - } - - /** - Utility function to map an AzFrameworkInput thumbstick movement to its integer index. - - @param inputChannelId the ID for an AzFrameworkInput thumbstick movement. - @return the index of the indicated button, or -1 if not found. - */ - unsigned int GetAzControllerThumbstickIndex(const InputChannelId& inputChannelId) - { - const auto& thumbstickMovements = InputDeviceGamepad::ThumbStickDirection::All; - const auto& it = AZStd::find(thumbstickMovements.cbegin(), thumbstickMovements.cend(), inputChannelId); - return it != thumbstickMovements.cend() ? static_cast(it - thumbstickMovements.cbegin()) : UINT_MAX; - } - - /** - Utility function to map an AzFrameworkInput thumbstick movement amountto its integer index. - - @param inputChannelId the ID for an AzFrameworkInput thumbstick movement amount. - @return the index of the indicated button, or -1 if not found. - */ - unsigned int GetAzControllerThumbstickAmountIndex(const InputChannelId& inputChannelId) - { - const auto& thumbstickMovementAmounts = InputDeviceGamepad::ThumbStickAxis1D::All; - const auto& it = AZStd::find(thumbstickMovementAmounts.cbegin(), thumbstickMovementAmounts.cend(), inputChannelId); - return it != thumbstickMovementAmounts.cend() ? static_cast(it - thumbstickMovementAmounts.cbegin()) : UINT_MAX; - } } void ImGuiManager::Initialize() diff --git a/Gems/ImGui/Code/Source/ImGuiManager.h b/Gems/ImGui/Code/Source/ImGuiManager.h index 20695c0825..acb022277c 100644 --- a/Gems/ImGui/Code/Source/ImGuiManager.h +++ b/Gems/ImGui/Code/Source/ImGuiManager.h @@ -81,7 +81,6 @@ namespace ImGui private: ImGuiContext* m_imguiContext = nullptr; - int m_fontTextureId = -1; DisplayState m_clientMenuBarState = DisplayState::Hidden; DisplayState m_editorWindowState = DisplayState::Hidden; diff --git a/Gems/LyShine/Code/Source/Animation/2DSpline.h b/Gems/LyShine/Code/Source/Animation/2DSpline.h index b831bd669a..92494ed78f 100644 --- a/Gems/LyShine/Code/Source/Animation/2DSpline.h +++ b/Gems/LyShine/Code/Source/Animation/2DSpline.h @@ -694,7 +694,6 @@ namespace UiSpline Vec2 interpolate_tangent(float time, float& u) { Vec2 tangent; - const float epsilon = 0.001f; int curr = seek_key(time); int next = curr + 1; assert(0 <= curr && next < num_keys());