From a97bccbf381f956f0c1e865a35ae481276116579 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Thu, 19 Aug 2021 14:01:50 -0700 Subject: [PATCH 01/49] some fixes Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Framework/AzCore/AzCore/Math/Guid.h | 4 ++-- .../AzCore/Math/Internal/SimdMathCommon_simd.inl | 2 -- .../AzCore/AzCore/RTTI/BehaviorContext.h | 2 +- .../AzCore/Serialization/Json/JsonSerializer.cpp | 1 - .../AzCore/AzCore/std/string/string_view.h | 2 ++ .../AzCore/Debug/StackTracer_UnixLike.cpp | 2 +- .../GridMate/Carrier/SecureSocketDriver.cpp | 10 ---------- Code/Legacy/CryCommon/CryLibrary.h | 6 +++--- Code/Legacy/CryCommon/CryVersion.h | 2 +- Code/Legacy/CryCommon/IIndexedMesh.h | 1 - Code/Legacy/CryCommon/VectorMap.h | 2 -- Code/Legacy/CryCommon/WinBase.cpp | 10 +--------- Code/Legacy/CrySystem/LocalizedStringManager.cpp | 6 ++---- Code/Legacy/CrySystem/Log.cpp | 4 +--- Code/Legacy/CrySystem/XML/xml.cpp | 16 ++-------------- .../RHI/Code/Include/Atom/RHI/ConstantsData.h | 1 - .../Common/Clang/Configurations_clang.cmake | 5 ----- 17 files changed, 16 insertions(+), 60 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Math/Guid.h b/Code/Framework/AzCore/AzCore/Math/Guid.h index 53bab4d7ed..15c4c52742 100644 --- a/Code/Framework/AzCore/AzCore/Math/Guid.h +++ b/Code/Framework/AzCore/AzCore/Math/Guid.h @@ -66,9 +66,9 @@ typedef const GUID& REFIID; const GUID name \ = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } -static REFGUID GUID_NULL() +REFGUID GUID_NULL() { - static const GUID guid = { 0x00000000L, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; + static GUID guid = { 0x00000000L, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; return guid; } diff --git a/Code/Framework/AzCore/AzCore/Math/Internal/SimdMathCommon_simd.inl b/Code/Framework/AzCore/AzCore/Math/Internal/SimdMathCommon_simd.inl index fc406f5862..c9909925c4 100644 --- a/Code/Framework/AzCore/AzCore/Math/Internal/SimdMathCommon_simd.inl +++ b/Code/Framework/AzCore/AzCore/Math/Internal/SimdMathCommon_simd.inl @@ -339,7 +339,6 @@ namespace AZ { const typename VecType::FloatType x_eq_0 = VecType::CmpEq(x, VecType::ZeroFloat()); const typename VecType::FloatType x_ge_0 = VecType::CmpGtEq(x, VecType::ZeroFloat()); - const typename VecType::FloatType x_le_0 = VecType::CmpLtEq(x, VecType::ZeroFloat()); const typename VecType::FloatType x_lt_0 = VecType::CmpLt(x, VecType::ZeroFloat()); const typename VecType::FloatType y_eq_0 = VecType::CmpEq(y, VecType::ZeroFloat()); @@ -363,7 +362,6 @@ namespace AZ typename VecType::FloatType swap_sign_mask_offset = VecType::And(x_lt_0, y_lt_0); swap_sign_mask_offset = VecType::And(swap_sign_mask_offset, VecType::CastToFloat(FastLoadConstant(Simd::g_negateMask))); - const typename VecType::FloatType offset0 = VecType::ZeroFloat(); typename VecType::FloatType offset1 = FastLoadConstant(g_Pi); offset1 = VecType::Xor(offset1, swap_sign_mask_offset); diff --git a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h index 0c4eaf8383..86c6efdc9c 100644 --- a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h +++ b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h @@ -3775,7 +3775,7 @@ namespace AZ inline void OnDemandReflectFunctions(OnDemandReflectionOwner* onDemandReflection, AZStd::Internal::pack_traits_arg_sequence) { using PackExpander = bool[]; - PackExpander{ true, (BehaviorOnDemandReflectHelper::raw_fp_type>::QueueReflect(onDemandReflection), true)... }; + [[maybe_unused]] PackExpander pe = { true, (BehaviorOnDemandReflectHelper::raw_fp_type>::QueueReflect(onDemandReflection), true)... }; } // Assumes parameters array is big enough to store all parameters diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializer.cpp b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializer.cpp index 1fa0dd3c44..a7abfca86b 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializer.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializer.cpp @@ -158,7 +158,6 @@ namespace AZ using namespace JsonSerializationResult; StoreTypeId storeTypeId = StoreTypeId::No; - Uuid resolvedTypeId = classData.m_typeId; const SerializeContext::ClassData* resolvedClassData = &classData; AZStd::any defaultPointerObject; diff --git a/Code/Framework/AzCore/AzCore/std/string/string_view.h b/Code/Framework/AzCore/AzCore/std/string/string_view.h index 9a98795554..267ea7b536 100644 --- a/Code/Framework/AzCore/AzCore/std/string/string_view.h +++ b/Code/Framework/AzCore/AzCore/std/string/string_view.h @@ -866,7 +866,9 @@ namespace AZStd constexpr size_t hash_string(RandomAccessIterator first, size_t length) { size_t hash = 14695981039346656037ULL; +#if AZ_COMPILER_MSVC >= 1924 constexpr size_t fnvPrime = 1099511628211ULL; +#endif const RandomAccessIterator last(first + length); for (; first != last; ++first) diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/StackTracer_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/StackTracer_UnixLike.cpp index abfabbbd54..f66a9d3b18 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/StackTracer_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/StackTracer_UnixLike.cpp @@ -57,7 +57,7 @@ StackRecorder::Record(StackFrame* frames, unsigned int maxNumOfFrames, unsigned int skip = static_cast((suppressCount == 0) ? 1 : suppressCount); // Skip at least this function while ((unw_step(&cursor) > 0) && (count < maxNumOfFrames)) { - unw_word_t offset, pc; + unw_word_t pc; unw_get_reg(&cursor, UNW_REG_IP, &pc); if (pc == 0) { diff --git a/Code/Framework/GridMate/GridMate/Carrier/SecureSocketDriver.cpp b/Code/Framework/GridMate/GridMate/Carrier/SecureSocketDriver.cpp index 031e8561ec..630f81d89f 100644 --- a/Code/Framework/GridMate/GridMate/Carrier/SecureSocketDriver.cpp +++ b/Code/Framework/GridMate/GridMate/Carrier/SecureSocketDriver.cpp @@ -151,16 +151,6 @@ namespace GridMate writeBuffer.Write(PackByte(value)); } - AZ_INLINE static AZ::u32 CalculatePeerCRC32(const SecureSocketDriver::AddrPtr& from) - { - // Calculate CRC32 from remote address - AZ::u32 port = from->GetPort(); - AZ::Crc32 crc; - crc.Add(from->GetIP().c_str()); - crc.Add(&port, sizeof(port)); - return crc; - } - // Structures // struct RecordHeader // 13 bytes = DTLS1_RT_HEADER_LENGTH diff --git a/Code/Legacy/CryCommon/CryLibrary.h b/Code/Legacy/CryCommon/CryLibrary.h index a034a2a04b..6c13f0f9c6 100644 --- a/Code/Legacy/CryCommon/CryLibrary.h +++ b/Code/Legacy/CryCommon/CryLibrary.h @@ -97,14 +97,14 @@ static const char* GetModulePath() return getenv(gEnvName); } -static void SetModulePath(const char* pModulePath) +void SetModulePath(const char* pModulePath) { setenv(gEnvName, pModulePath ? pModulePath : "", true); } // bInModulePath is only ever set to false in RC, because rc needs to load dlls from a $PATH that // it has modified to include .. -static HMODULE CryLoadLibrary(const char* libName, bool bLazy = false, bool bInModulePath = true) +HMODULE CryLoadLibrary(const char* libName, bool bLazy = false, bool bInModulePath = true) { const char* libPath = nullptr; char pathBuffer[MAX_PATH] = {0}; @@ -161,7 +161,7 @@ static HMODULE CryLoadLibrary(const char* libName, bool bLazy = false, bool bInM return module; } -static bool CryFreeLibrary(void* lib) +bool CryFreeLibrary(void* lib) { if (lib) { diff --git a/Code/Legacy/CryCommon/CryVersion.h b/Code/Legacy/CryCommon/CryVersion.h index 0f84e02b6b..e6ed15408d 100644 --- a/Code/Legacy/CryCommon/CryVersion.h +++ b/Code/Legacy/CryCommon/CryVersion.h @@ -43,7 +43,7 @@ struct SFileVersion t[len] = 0; char* p; - char* next = nullptr; + [[maybe_unused]] char* next = nullptr; [[maybe_unused]] size_t strmax = sizeof(t); p = azstrtok(t, &strmax, ".", &next); if (!p) diff --git a/Code/Legacy/CryCommon/IIndexedMesh.h b/Code/Legacy/CryCommon/IIndexedMesh.h index 87c3df98bd..dbfbf3c71b 100644 --- a/Code/Legacy/CryCommon/IIndexedMesh.h +++ b/Code/Legacy/CryCommon/IIndexedMesh.h @@ -1520,7 +1520,6 @@ public: const int oldVertexCount = GetVertexCount(); const int oldFaceCount = GetFaceCount(); - const int nOldCoorCount = GetTexCoordCount(); if (GetTexCoordCount() != 0 && GetTexCoordCount() != oldVertexCount) { diff --git a/Code/Legacy/CryCommon/VectorMap.h b/Code/Legacy/CryCommon/VectorMap.h index 75b1562c4d..6fce90b4ec 100644 --- a/Code/Legacy/CryCommon/VectorMap.h +++ b/Code/Legacy/CryCommon/VectorMap.h @@ -411,7 +411,6 @@ typename VectorMap::iterator VectorMap::lower_bound(cons { int count = static_cast(m_entries.size()); iterator first = m_entries.begin(); - iterator last = m_entries.end(); for (; 0 < count; ) { // divide and conquer, find half that contains answer int count2 = count / 2; @@ -434,7 +433,6 @@ typename VectorMap::const_iterator VectorMap::lower_boun { int count = static_cast(m_entries.size()); const_iterator first = m_entries.begin(); - const_iterator last = m_entries.end(); for (; 0 < count; ) { // divide and conquer, find half that contains answer int count2 = count / 2; diff --git a/Code/Legacy/CryCommon/WinBase.cpp b/Code/Legacy/CryCommon/WinBase.cpp index ae646e9e1c..99e01f7194 100644 --- a/Code/Legacy/CryCommon/WinBase.cpp +++ b/Code/Legacy/CryCommon/WinBase.cpp @@ -1305,13 +1305,8 @@ const bool GetFilenameNoCase char* slash; const char* dirname; char* name; - FS_ERRNO_TYPE fsErr = 0; - FS_DIRENT_TYPE dirent; - uint64_t direntSize = 0; - FS_DIR_TYPE fd = FS_DIR_NULL; - if ( - (pAdjustedFilename) == (char*)-1) + if ((pAdjustedFilename) == (char*)-1) { return false; } @@ -1343,9 +1338,6 @@ const bool GetFilenameNoCase #endif // Scan for the file. - bool found = false; - bool skipScan = false; - if (slash) { *slash = '/'; diff --git a/Code/Legacy/CrySystem/LocalizedStringManager.cpp b/Code/Legacy/CrySystem/LocalizedStringManager.cpp index db77eda3e8..e4b149d84e 100644 --- a/Code/Legacy/CrySystem/LocalizedStringManager.cpp +++ b/Code/Legacy/CrySystem/LocalizedStringManager.cpp @@ -1926,11 +1926,9 @@ AZStd::string CLocalizedStringsManager::SLocalizedStringEntry::GetTranslatedText #endif //LOG_DECOMP_TIMES #if !defined(NDEBUG) - size_t len = -#endif - strnlen((const char*)decompressionBuffer, COMPRESSION_FIXED_BUFFER_LENGTH); + size_t len = strnlen((const char*)decompressionBuffer, COMPRESSION_FIXED_BUFFER_LENGTH); assert(len < COMPRESSION_FIXED_BUFFER_LENGTH && "Buffer not null-terminated"); - +#endif #if defined(LOG_DECOMP_TIMES) nAllocTicks = CryGetTicks(); diff --git a/Code/Legacy/CrySystem/Log.cpp b/Code/Legacy/CrySystem/Log.cpp index be2816c890..4965323695 100644 --- a/Code/Legacy/CrySystem/Log.cpp +++ b/Code/Legacy/CrySystem/Log.cpp @@ -444,8 +444,6 @@ void CLog::LogV(const ELogType type, [[maybe_unused]]int flags, const char* szFo return; } - LogStringType tempString; - char szBuffer[MAX_WARNING_LENGTH + 32]; char* szString = szBuffer; char* szAfterColour = szString; @@ -1297,7 +1295,7 @@ void CLog::CheckAndPruneBackupLogs() const AZStd::list fileInfoList; // Now that we've copied the new log over, lets check the size of the backup folder and trim it as necessary to keep it within appropriate limits - AZ::IO::Result res = fileSystem->FindFiles(LOG_BACKUP_PATH, "*", + fileSystem->FindFiles(LOG_BACKUP_PATH, "*", [&totalBackupDirectorySize, &fileSystem, &fileInfoList](const char* fileName) { AZ::u64 size; diff --git a/Code/Legacy/CrySystem/XML/xml.cpp b/Code/Legacy/CrySystem/XML/xml.cpp index adbfcc5f3e..d3fbaa9ec6 100644 --- a/Code/Legacy/CrySystem/XML/xml.cpp +++ b/Code/Legacy/CrySystem/XML/xml.cpp @@ -1760,21 +1760,9 @@ XmlNodeRef XmlParserImp::ParseFile(const char* filename, XmlString& errorString, { // not binary XML - refuse to load if in scripts dir and not in bin xml to help reduce hacking // wish we could compile the text xml parser out, but too much work to get everything moved over - static const char SCRIPTS_DIR[] = "Scripts/"; - AZStd::fixed_string<32> strScripts("S"); - strScripts += "c"; - strScripts += "r"; - strScripts += "i"; - strScripts += "p"; - strScripts += "t"; - strScripts += "s"; - strScripts += "/"; + AZStd::fixed_string<32> strScripts = {"Scripts/"}; // exclude files and PAKs from Mods folder - AZStd::fixed_string<8> modsStr("M"); - modsStr += "o"; - modsStr += "d"; - modsStr += "s"; - modsStr += "/"; + AZStd::fixed_string<8> modsStr = {"Mods/"}; if (_strnicmp(filename, strScripts.c_str(), strScripts.length()) == 0 && _strnicmp(adjustedFilename.c_str(), modsStr.c_str(), modsStr.length()) != 0 && _strnicmp(pakPath.c_str(), modsStr.c_str(), modsStr.length()) != 0) diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/ConstantsData.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/ConstantsData.h index ff1158e455..82b0b7146b 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/ConstantsData.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/ConstantsData.h @@ -248,7 +248,6 @@ namespace AZ AZStd::array_view constantBytes = GetConstantRaw(inputIndex); const size_t elementSize = sizeof(T); const size_t elementOffset = arrayIndex * elementSize; - const size_t elementCount = DivideByMultiple(constantBytes.size(), elementSize); if (ValidateConstantAccess(inputIndex, ValidateConstantAccessExpect::ArrayElement, elementOffset, elementSize)) { return *reinterpret_cast(&constantBytes[elementOffset]); diff --git a/cmake/Platform/Common/Clang/Configurations_clang.cmake b/cmake/Platform/Common/Clang/Configurations_clang.cmake index 94584e342f..17a89fc1cd 100644 --- a/cmake/Platform/Common/Clang/Configurations_clang.cmake +++ b/cmake/Platform/Common/Clang/Configurations_clang.cmake @@ -33,11 +33,6 @@ ly_append_configurations_options( -Wno-tautological-compare -Wno-undefined-var-template -Wno-unknown-pragmas - -Wno-unused-function - -Wno-unused-private-field - -Wno-unused-value - -Wno-unused-variable - -Wno-unused-lambda-capture # Workaround for compiler seeing file case differently from what OS show in console. -Wno-nonportable-include-path From 63cd3db9569f94f0a61ab72e5f7de2ef85bce66b Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Thu, 19 Aug 2021 18:26:09 -0700 Subject: [PATCH 02/49] Removes LOADING_TIME_PROFILE_SECTION macros that are unused Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Editor/CryEditDoc.cpp | 2 +- Code/Editor/GameEngine.cpp | 3 +-- Code/Legacy/CryCommon/ISystem.h | 5 ----- .../CrySystem/LevelSystem/LevelSystem.cpp | 12 ----------- .../LevelSystem/SpawnableLevelSystem.cpp | 5 ----- .../CrySystem/LocalizedStringManager.cpp | 1 - Code/Legacy/CrySystem/Log.cpp | 4 ---- Code/Legacy/CrySystem/System.cpp | 3 --- Code/Legacy/CrySystem/SystemInit.cpp | 21 ++----------------- Code/Legacy/CrySystem/XML/xml.cpp | 4 ---- 10 files changed, 4 insertions(+), 56 deletions(-) diff --git a/Code/Editor/CryEditDoc.cpp b/Code/Editor/CryEditDoc.cpp index e5988918f5..cb920da2de 100644 --- a/Code/Editor/CryEditDoc.cpp +++ b/Code/Editor/CryEditDoc.cpp @@ -342,7 +342,7 @@ void CCryEditDoc::Load(TDocMultiArchive& arrXmlAr, const QString& szFilename) // Register this level and its content hash as version GetIEditor()->GetSettingsManager()->AddToolVersion(fileName, levelHash); GetIEditor()->GetSettingsManager()->RegisterEvent(loadEvent); - LOADING_TIME_PROFILE_SECTION(gEnv->pSystem); + CAutoDocNotReady autoDocNotReady; HEAP_CHECK diff --git a/Code/Editor/GameEngine.cpp b/Code/Editor/GameEngine.cpp index 137d14c844..4b463efe0a 100644 --- a/Code/Editor/GameEngine.cpp +++ b/Code/Editor/GameEngine.cpp @@ -497,8 +497,7 @@ bool CGameEngine::LoadLevel( [[maybe_unused]] bool bDeleteAIGraph, bool bReleaseResources) { - LOADING_TIME_PROFILE_SECTION(GetIEditor()->GetSystem()); - m_bLevelLoaded = false; + m_bLevelLoaded = false; CLogFile::FormatLine("Loading map '%s' into engine...", m_levelPath.toUtf8().data()); // Switch the current directory back to the Primary CD folder first. // The engine might have trouble to find some files when the current diff --git a/Code/Legacy/CryCommon/ISystem.h b/Code/Legacy/CryCommon/ISystem.h index 74153eb39b..3e0abf56c6 100644 --- a/Code/Legacy/CryCommon/ISystem.h +++ b/Code/Legacy/CryCommon/ISystem.h @@ -1149,11 +1149,6 @@ struct DiskOperationInfo #endif -#define LOADING_TIME_PROFILE_SECTION -#define LOADING_TIME_PROFILE_SECTION_ARGS(...) -#define LOADING_TIME_PROFILE_SECTION_NAMED(sectionName) -#define LOADING_TIME_PROFILE_SECTION_NAMED_ARGS(sectionName, ...) - ////////////////////////////////////////////////////////////////////////// // CrySystem DLL Exports. ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp index bb2f36e69c..47029e8b51 100644 --- a/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp +++ b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp @@ -45,8 +45,6 @@ void CLevelInfo::GetMemoryUsage(ICrySizer* pSizer) const ////////////////////////////////////////////////////////////////////////// bool CLevelInfo::OpenLevelPak() { - LOADING_TIME_PROFILE_SECTION; - bool usePrefabSystemForLevels = false; AzFramework::ApplicationRequests::Bus::BroadcastResult( usePrefabSystemForLevels, &AzFramework::ApplicationRequests::IsPrefabSystemForLevelsEnabled); @@ -69,8 +67,6 @@ bool CLevelInfo::OpenLevelPak() ////////////////////////////////////////////////////////////////////////// void CLevelInfo::CloseLevelPak() { - LOADING_TIME_PROFILE_SECTION; - bool usePrefabSystemForLevels = false; AzFramework::ApplicationRequests::Bus::BroadcastResult( usePrefabSystemForLevels, &AzFramework::ApplicationRequests::IsPrefabSystemForLevelsEnabled); @@ -190,7 +186,6 @@ CLevelSystem::CLevelSystem(ISystem* pSystem, const char* levelsFolder) , m_pCurrentLevel(0) , m_pLoadingLevelInfo(0) { - LOADING_TIME_PROFILE_SECTION; CRY_ASSERT(pSystem); //if (!gEnv->IsEditor()) @@ -297,8 +292,6 @@ void CLevelSystem::ScanFolder(const char* subfolder, bool modFolder) AZStd::unordered_set pakList; - const bool allowFileSystem = true; - const uint32_t skipPakFiles = 1; AZ::IO::ArchiveFileIterator handle = pPak->FindFirst(search.c_str(), AZ::IO::IArchive::eFileSearchType_AllowOnDiskOnly); if (handle) @@ -566,8 +559,6 @@ ILevel* CLevelSystem::LoadLevelInternal(const char* _levelName) // Not remove a scope!!! { - LOADING_TIME_PROFILE_SECTION; - //m_levelLoadStartTime = gEnv->pTimer->GetAsyncTime(); CLevelInfo* pLevelInfo = GetLevelInfoInternal(levelName); @@ -582,7 +573,6 @@ ILevel* CLevelSystem::LoadLevelInternal(const char* _levelName) m_bLevelLoaded = false; - const bool bLoadingSameLevel = azstricmp(m_lastLevelName.c_str(), levelName) == 0; m_lastLevelName = levelName; delete m_pCurrentLevel; @@ -746,8 +736,6 @@ void CLevelSystem::OnLoadingStart(const char* levelName) GetISystem()->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_LOAD_START, 0, 0); - LOADING_TIME_PROFILE_SECTION(gEnv->pSystem); - for (AZStd::vector::const_iterator it = m_listeners.begin(); it != m_listeners.end(); ++it) { (*it)->OnLoadingStart(levelName); diff --git a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp index b37b257f5b..f866ee2864 100644 --- a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp +++ b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp @@ -58,7 +58,6 @@ namespace LegacyLevelSystem SpawnableLevelSystem::SpawnableLevelSystem(ISystem* pSystem) : m_pSystem(pSystem) { - LOADING_TIME_PROFILE_SECTION; CRY_ASSERT(pSystem); m_fLastLevelLoadTime = 0; @@ -248,8 +247,6 @@ namespace LegacyLevelSystem // This scope is specifically used for marking a loading time profile section { - LOADING_TIME_PROFILE_SECTION; - m_bLevelLoaded = false; m_lastLevelName = levelName; gEnv->pConsole->SetScrollMax(600); @@ -388,8 +385,6 @@ namespace LegacyLevelSystem GetISystem()->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_LOAD_START, 0, 0); - LOADING_TIME_PROFILE_SECTION(gEnv->pSystem); - for (auto& listener : m_listeners) { listener->OnLoadingStart(levelName); diff --git a/Code/Legacy/CrySystem/LocalizedStringManager.cpp b/Code/Legacy/CrySystem/LocalizedStringManager.cpp index e4b149d84e..68e3667781 100644 --- a/Code/Legacy/CrySystem/LocalizedStringManager.cpp +++ b/Code/Legacy/CrySystem/LocalizedStringManager.cpp @@ -872,7 +872,6 @@ inline YesNoType ToYesNoType(const char* szString) // Loads a string-table from a Excel XML Spreadsheet file. bool CLocalizedStringsManager::DoLoadExcelXmlSpreadsheet(const char* sFileName, uint8 nTagID, bool bReload) { - LOADING_TIME_PROFILE_SECTION_ARGS(sFileName) if (!m_pLanguage) { return false; diff --git a/Code/Legacy/CrySystem/Log.cpp b/Code/Legacy/CrySystem/Log.cpp index 4965323695..27612bf786 100644 --- a/Code/Legacy/CrySystem/Log.cpp +++ b/Code/Legacy/CrySystem/Log.cpp @@ -397,7 +397,6 @@ void CLog::LogV(const ELogType type, [[maybe_unused]]int flags, const char* szFo } FUNCTION_PROFILER(GetISystem(), PROFILE_SYSTEM); - LOADING_TIME_PROFILE_SECTION(GetISystem()); bool bfile = false, bconsole = false; const char* szCommand = szFormat; @@ -573,8 +572,6 @@ void CLog::LogPlus(const char* szFormat, ...) return; } - LOADING_TIME_PROFILE_SECTION(GetISystem()); - if (!szFormat) { return; @@ -1187,7 +1184,6 @@ void CLog::LogToFile(const char* szFormat, ...) ////////////////////////////////////////////////////////////////////// void CLog::CreateBackupFile() const { - LOADING_TIME_PROFILE_SECTION; if (!m_backupLogs) { return; diff --git a/Code/Legacy/CrySystem/System.cpp b/Code/Legacy/CrySystem/System.cpp index d848160b3e..452ebea302 100644 --- a/Code/Legacy/CrySystem/System.cpp +++ b/Code/Legacy/CrySystem/System.cpp @@ -1044,15 +1044,12 @@ IXmlUtils* CSystem::GetXmlUtils() ////////////////////////////////////////////////////////////////////////// XmlNodeRef CSystem::LoadXmlFromFile(const char* sFilename, bool bReuseStrings) { - LOADING_TIME_PROFILE_SECTION_ARGS(sFilename); - return m_pXMLUtils->LoadXmlFromFile(sFilename, bReuseStrings); } ////////////////////////////////////////////////////////////////////////// XmlNodeRef CSystem::LoadXmlFromBuffer(const char* buffer, size_t size, bool bReuseStrings, bool bSuppressWarnings) { - LOADING_TIME_PROFILE_SECTION return m_pXMLUtils->LoadXmlFromBuffer(buffer, size, bReuseStrings, bSuppressWarnings); } diff --git a/Code/Legacy/CrySystem/SystemInit.cpp b/Code/Legacy/CrySystem/SystemInit.cpp index 08292a6353..dcfeb90484 100644 --- a/Code/Legacy/CrySystem/SystemInit.cpp +++ b/Code/Legacy/CrySystem/SystemInit.cpp @@ -432,8 +432,6 @@ AZStd::unique_ptr CSystem::LoadDynamiclibrary(const cha ////////////////////////////////////////////////////////////////////////// AZStd::unique_ptr CSystem::LoadDLL(const char* dllName) { - LOADING_TIME_PROFILE_SECTION(GetISystem()); - AZ_TracePrintf(AZ_TRACE_SYSTEM_WINDOW, "Loading DLL: %s", dllName); AZStd::unique_ptr handle = LoadDynamiclibrary(dllName); @@ -612,8 +610,6 @@ AZStd::wstring GetErrorStringUnsupportedGPU(const char* gpuName, unsigned int gp ///////////////////////////////////////////////////////////////////////////////// bool CSystem::InitConsole() { - LOADING_TIME_PROFILE_SECTION(GetISystem()); - if (m_env.pConsole) { m_env.pConsole->Init(this); @@ -662,7 +658,6 @@ ICVar* CSystem::attachVariable (const char* szVarName, int* pContainer, const ch ///////////////////////////////////////////////////////////////////////////////// bool CSystem::InitFileSystem() { - LOADING_TIME_PROFILE_SECTION; using namespace AzFramework::AssetSystem; if (m_pUserCallback) @@ -748,11 +743,8 @@ void CSystem::ShutdownFileSystem() ///////////////////////////////////////////////////////////////////////////////// bool CSystem::InitFileSystem_LoadEngineFolders(const SSystemInitParams&) { - LOADING_TIME_PROFILE_SECTION; - { - LoadConfiguration(m_systemConfigName.c_str()); - AZ_Printf(AZ_TRACE_SYSTEM_WINDOW, "Loading system configuration from %s...", m_systemConfigName.c_str()); - } + LoadConfiguration(m_systemConfigName.c_str()); + AZ_Printf(AZ_TRACE_SYSTEM_WINDOW, "Loading system configuration from %s...", m_systemConfigName.c_str()); #if defined(AZ_PLATFORM_ANDROID) AZ::Android::Utils::SetLoadFilesToMemory(m_sys_load_files_to_memory->GetString()); @@ -783,8 +775,6 @@ bool CSystem::InitFileSystem_LoadEngineFolders(const SSystemInitParams&) ////////////////////////////////////////////////////////////////////////// bool CSystem::InitAudioSystem(const SSystemInitParams& initParams) { - LOADING_TIME_PROFILE_SECTION(GetISystem()); - if (!Audio::Gem::AudioSystemGemRequestBus::HasHandlers()) { // AudioSystem Gem has not been enabled for this project. @@ -826,8 +816,6 @@ bool CSystem::InitAudioSystem(const SSystemInitParams& initParams) ////////////////////////////////////////////////////////////////////////// bool CSystem::InitVTuneProfiler() { - LOADING_TIME_PROFILE_SECTION(GetISystem()); - #ifdef PROFILE_WITH_VTUNE WIN_HMODULE hModule = LoadDLL("VTuneApi.dll"); @@ -855,7 +843,6 @@ bool CSystem::InitVTuneProfiler() ////////////////////////////////////////////////////////////////////////// void CSystem::InitLocalization() { - LOADING_TIME_PROFILE_SECTION(GetISystem()); // Set the localization folder ICVar* pCVar = m_env.pConsole != 0 ? m_env.pConsole->GetCVar("sys_localization_folder") : 0; if (pCVar) @@ -917,8 +904,6 @@ void CSystem::OpenBasicPaks() } bBasicPaksLoaded = true; - LOADING_TIME_PROFILE_SECTION; - // open pak files constexpr AZStd::string_view paksFolder = "@assets@/*.pak"; // (@assets@ assumed) m_env.pCryPak->OpenPacks(paksFolder); @@ -1153,8 +1138,6 @@ bool CSystem::Init(const SSystemInitParams& startupParams) gEnv = &m_env; } - LOADING_TIME_PROFILE_SECTION; - SetSystemGlobalState(ESYSTEM_GLOBAL_STATE_INIT); gEnv->mMainThreadId = GetCurrentThreadId(); //Set this ASAP on startup diff --git a/Code/Legacy/CrySystem/XML/xml.cpp b/Code/Legacy/CrySystem/XML/xml.cpp index d3fbaa9ec6..ccc878b8f1 100644 --- a/Code/Legacy/CrySystem/XML/xml.cpp +++ b/Code/Legacy/CrySystem/XML/xml.cpp @@ -1675,8 +1675,6 @@ XmlNodeRef XmlParserImp::ParseBuffer(const char* buffer, size_t bufLen, XmlStrin ////////////////////////////////////////////////////////////////////////// XmlNodeRef XmlParserImp::ParseFile(const char* filename, XmlString& errorString, bool bCleanPools) { - LOADING_TIME_PROFILE_SECTION(GetISystem()); - if (!filename) { return 0; @@ -1739,8 +1737,6 @@ XmlNodeRef XmlParserImp::ParseFile(const char* filename, XmlString& errorString, if (g_bEnableBinaryXmlLoading) { - LOADING_TIME_PROFILE_SECTION_NAMED("XMLBinaryReader::Parse"); - XMLBinary::XMLBinaryReader reader; XMLBinary::XMLBinaryReader::EResult result; root = reader.LoadFromBuffer(XMLBinary::XMLBinaryReader::eBufferMemoryHandling_TakeOwnership, pFileContents, fileSize, result); From cf6c7c4d8d3b7f23847939a5506ee50e5345629a Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Thu, 19 Aug 2021 18:26:43 -0700 Subject: [PATCH 03/49] some unused fixes Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../AzCore/Component/ComponentApplication.cpp | 2 +- .../AzCore/Component/EntitySerializer.cpp | 9 +++---- .../AzCore/AzCore/Component/EntityUtils.cpp | 2 +- .../AzCore/Serialization/AZStdContainers.inl | 2 +- .../AzCore/AzCore/Serialization/DataPatch.cpp | 1 - .../Serialization/std/VariantReflection.inl | 4 +-- .../AzFramework/FileTag/FileTag.cpp | 2 +- .../EntityVisibilityBoundsUnionSystem.cpp | 3 --- .../Process/ProcessWatcher_Linux.cpp | 2 -- .../TcpTransport/TcpListenThread.cpp | 6 ++--- .../AzNetworking/UdpTransport/DtlsSocket.cpp | 2 +- .../AzNetworking/UdpTransport/UdpSocket.cpp | 1 - .../AzNetworking/Utilities/Endian.h | 4 +-- Code/Framework/AzTest/AzTest/Utils.cpp | 1 - Code/LauncherUnified/Launcher.cpp | 4 +-- .../AWSCognitoUserManagementController.cpp | 2 +- .../Source/PostProcessing/BloomBlurPass.cpp | 2 -- .../RHI/Code/Include/Atom/RHI.Reflect/Bits.h | 26 ++----------------- .../Code/Include/Atom/RHI/IndexBufferView.h | 4 +-- .../Include/Atom/RHI/IndirectBufferView.h | 4 +-- .../Code/Include/Atom/RHI/StreamBufferView.h | 4 +-- .../RHI/Code/Source/RHI/DrawPacketBuilder.cpp | 2 +- .../Code/Source/RHI/PipelineStateCache.cpp | 2 +- .../Code/Source/RHI/AsyncUploadQueue.cpp | 10 +------ .../Code/Source/RHI/BufferPoolResolver.cpp | 1 - .../Code/Source/RHI/CommandListAllocator.cpp | 2 +- .../Vulkan/Code/Source/RHI/CommandQueue.cpp | 2 +- .../RHI/Vulkan/Code/Source/RHI/Device.cpp | 1 - .../Code/Source/RHI/NullDescriptorManager.cpp | 1 - .../Code/Source/RHI/StreamingImagePool.cpp | 1 - .../Source/Animation/UiAnimationSystem.cpp | 1 - 31 files changed, 28 insertions(+), 82 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp index 5114ea19ec..17da3fd1e9 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp @@ -1294,7 +1294,7 @@ namespace AZ void Visit(AZStd::string_view path, AZStd::string_view, AZ::SettingsRegistryInterface::Type, AZStd::string_view value) override { // Remove last path segment and check if the key corresponds to the Modules array - AZStd::optional moduleIndex = AZ::StringFunc::TokenizeLast(path, "/"); + AZ::StringFunc::TokenizeLast(path, "/"); if (path.ends_with("/Modules")) { // Remove the "Modules" path segment to be at the GemName key diff --git a/Code/Framework/AzCore/AzCore/Component/EntitySerializer.cpp b/Code/Framework/AzCore/AzCore/Component/EntitySerializer.cpp index 16452be76d..df6aacd50b 100644 --- a/Code/Framework/AzCore/AzCore/Component/EntitySerializer.cpp +++ b/Code/Framework/AzCore/AzCore/Component/EntitySerializer.cpp @@ -89,12 +89,9 @@ namespace AZ result.Combine(componentLoadResult); } - { - JSR::ResultCode runtimeActiveLoadResult = - ContinueLoadingFromJsonObjectField(&entityInstance->m_isRuntimeActiveByDefault, - azrtti_typeidm_isRuntimeActiveByDefault)>(), - inputValue, "IsRuntimeActive", context); - } + ContinueLoadingFromJsonObjectField(&entityInstance->m_isRuntimeActiveByDefault, + azrtti_typeidm_isRuntimeActiveByDefault)>(), + inputValue, "IsRuntimeActive", context); return context.Report( result, diff --git a/Code/Framework/AzCore/AzCore/Component/EntityUtils.cpp b/Code/Framework/AzCore/AzCore/Component/EntityUtils.cpp index 8241400aac..fcc8cd6424 100644 --- a/Code/Framework/AzCore/AzCore/Component/EntityUtils.cpp +++ b/Code/Framework/AzCore/AzCore/Component/EntityUtils.cpp @@ -165,7 +165,7 @@ namespace AZ AZStd::fixed_vector knownBaseClasses = { typeToExamine }; // avoid allocating heap here if possible. 64 types are 64*sizeof(Uuid) which is only 1k. bool foundBaseClass = false; - auto enumerateBaseVisitor = [&foundBaseClass, &baseClassVisitor, &knownBaseClasses](const AZ::SerializeContext::ClassData* classData, const TypeId& examineTypeId) + auto enumerateBaseVisitor = [&baseClassVisitor, &knownBaseClasses](const AZ::SerializeContext::ClassData* classData, const TypeId& examineTypeId) { if (!classData) { diff --git a/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl b/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl index 9eb65dec76..bae79a6fe7 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl +++ b/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl @@ -1320,7 +1320,7 @@ namespace AZ (void)classElement; void* reserveElement{}; using DummyArray = bool[]; - DummyArray{ true, (ReserveElementTuple(tupleRef, classElement, reserveElement))... }; + [[maybe_unused]] DummyArray dummy = { true, (ReserveElementTuple(tupleRef, classElement, reserveElement))... }; return reserveElement; } diff --git a/Code/Framework/AzCore/AzCore/Serialization/DataPatch.cpp b/Code/Framework/AzCore/AzCore/Serialization/DataPatch.cpp index edc0e8398b..01a98667fa 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/DataPatch.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/DataPatch.cpp @@ -135,7 +135,6 @@ namespace AZ AZStd::list m_dynamicClassElements; ///< Storage for class elements that represent dynamic serializable fields. }; - static bool ConvertLegacyBoolToEnum(AZ::SerializeContext& context, AZStd::any& patchAny, const DataNode& sourceNode); static void ReportDataPatchMismatch(SerializeContext* context, const SerializeContext::ClassElement* classElement, const TypeId& patchDataTypeId); //========================================================================= diff --git a/Code/Framework/AzCore/AzCore/Serialization/std/VariantReflection.inl b/Code/Framework/AzCore/AzCore/Serialization/std/VariantReflection.inl index 391133dd9f..70972bb846 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/std/VariantReflection.inl +++ b/Code/Framework/AzCore/AzCore/Serialization/std/VariantReflection.inl @@ -483,9 +483,9 @@ namespace AZ } private: static void ObjectStreamWriter(SerializeContext::EnumerateInstanceCallContext& callContext, const void* variantPtr, - const SerializeContext::ClassData& variantClassData, const SerializeContext::ClassElement* variantClassElement) + [[maybe_unused]] const SerializeContext::ClassData& variantClassData, const SerializeContext::ClassElement* variantClassElement) { - auto alternativeVisitor = [&callContext, &variantClassData, variantClassElement](auto&& elementAlt) + auto alternativeVisitor = [&callContext, variantClassElement](auto&& elementAlt) { using AltType = AZStd::remove_cvref_t; const SerializeContext& context = *callContext.m_context; diff --git a/Code/Framework/AzFramework/AzFramework/FileTag/FileTag.cpp b/Code/Framework/AzFramework/AzFramework/FileTag/FileTag.cpp index 87866581d3..c402e6c5bc 100644 --- a/Code/Framework/AzFramework/AzFramework/FileTag/FileTag.cpp +++ b/Code/Framework/AzFramework/AzFramework/FileTag/FileTag.cpp @@ -366,7 +366,7 @@ namespace AzFramework AZStd::set tags; AZStd::string resolvedFilePath = ResolveFilePath(filePath); - auto found = AZStd::find_if(m_fileTagsMap.begin(), m_fileTagsMap.end(), [filePath, resolvedFilePath, this](auto& entry) -> bool + auto found = AZStd::find_if(m_fileTagsMap.begin(), m_fileTagsMap.end(), [filePath, resolvedFilePath](auto& entry) -> bool { return resolvedFilePath == ResolveFilePath(entry.first); }); diff --git a/Code/Framework/AzFramework/AzFramework/Visibility/EntityVisibilityBoundsUnionSystem.cpp b/Code/Framework/AzFramework/AzFramework/Visibility/EntityVisibilityBoundsUnionSystem.cpp index bfa9dfcf9e..f1be8c506d 100644 --- a/Code/Framework/AzFramework/AzFramework/Visibility/EntityVisibilityBoundsUnionSystem.cpp +++ b/Code/Framework/AzFramework/AzFramework/Visibility/EntityVisibilityBoundsUnionSystem.cpp @@ -54,9 +54,6 @@ namespace AzFramework if (auto instance_it = m_entityVisibilityBoundsUnionInstanceMapping.find(entity); instance_it == m_entityVisibilityBoundsUnionInstanceMapping.end()) { - AZ::TransformInterface* transformInterface = entity->GetTransform(); - const AZ::Vector3 entityPosition = transformInterface->GetWorldTranslation(); - EntityVisibilityBoundsUnionInstance instance; instance.m_localEntityBoundsUnion = CalculateEntityLocalBoundsUnion(entity); instance.m_visibilityEntry.m_typeFlags = VisibilityEntry::TYPE_Entity; diff --git a/Code/Framework/AzFramework/Platform/Linux/AzFramework/Process/ProcessWatcher_Linux.cpp b/Code/Framework/AzFramework/Platform/Linux/AzFramework/Process/ProcessWatcher_Linux.cpp index 8deed820d3..eb60b8e6ae 100644 --- a/Code/Framework/AzFramework/Platform/Linux/AzFramework/Process/ProcessWatcher_Linux.cpp +++ b/Code/Framework/AzFramework/Platform/Linux/AzFramework/Process/ProcessWatcher_Linux.cpp @@ -202,8 +202,6 @@ namespace AzFramework bool ProcessLauncher::LaunchProcess(const ProcessLaunchInfo& processLaunchInfo, ProcessData& processData) { - bool result = false; - // note that the convention here is that it uses windows-shell style escaping of combined args with spaces in it // (so surrounding with quotes like param="hello world") // this is so that the callers (which could be numerous) do not have to worry about this and sprinkle ifdefs diff --git a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpListenThread.cpp b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpListenThread.cpp index 758cff3337..9a3c038a73 100644 --- a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpListenThread.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpListenThread.cpp @@ -64,7 +64,7 @@ namespace AzNetworking { --m_listenPortCount; - auto visitor = [this, &tcpNetworkInterface](ListenPort& listenPort) + auto visitor = [&tcpNetworkInterface](ListenPort& listenPort) { if (listenPort.m_tcpNetworkInterface == &tcpNetworkInterface) { @@ -120,7 +120,7 @@ namespace AzNetworking auto readCallback = [this, newConnection, connectionLength](SocketFd socketFd) { - auto visitor = [this, newConnection, connectionLength, socketFd](ListenPort& listenPort) + auto visitor = [this, newConnection, socketFd](ListenPort& listenPort) { if (listenPort.m_listenSocket.GetSocketFd() == socketFd) { @@ -132,7 +132,7 @@ namespace AzNetworking auto writeCallback = [](SocketFd) {}; m_tcpSocketManager.ProcessEvents(updateRateMs, readCallback, writeCallback); - auto cleanupUnused = [this](AZ::ThreadSafeDeque::DequeType& deque) + auto cleanupUnused = [](AZ::ThreadSafeDeque::DequeType& deque) { AZStd::remove_if(deque.begin(), deque.end(), [](ListenPort& listenPort) { return listenPort.m_tcpNetworkInterface == nullptr; }); }; diff --git a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/DtlsSocket.cpp b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/DtlsSocket.cpp index 1944995bac..ee784b6ffb 100644 --- a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/DtlsSocket.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/DtlsSocket.cpp @@ -86,7 +86,7 @@ namespace AzNetworking #if AZ_TRAIT_USE_OPENSSL uint8_t encrpytedSendBuffer[MaxUdpTransmissionUnit]; // Write out the packet we were requested to send - const int32_t sentBytesRaw = SSL_write(dtlsEndpoint.m_sslSocket, data, size); + SSL_write(dtlsEndpoint.m_sslSocket, data, size); const int32_t sentBytesEnc = BIO_read(dtlsEndpoint.m_writeBio, encrpytedSendBuffer, sizeof(encrpytedSendBuffer)); // Track encryption metrics diff --git a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpSocket.cpp b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpSocket.cpp index 997fc323a9..44f6562c84 100644 --- a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpSocket.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpSocket.cpp @@ -160,7 +160,6 @@ namespace AzNetworking const AZ::TimeMs jitterMs = aznumeric_cast(m_random.GetRandom()) % (connectionQuality.m_varianceMs > AZ::TimeMs{ 0 } ? connectionQuality.m_varianceMs : AZ::TimeMs{ 1 }); - const AZ::TimeMs currTimeMs = AZ::GetElapsedTimeMs(); const AZ::TimeMs deferTimeMs = (connectionQuality.m_latencyMs) + jitterMs; DeferredData deferred = DeferredData(address, data, size, encrypt, dtlsEndpoint); diff --git a/Code/Framework/AzNetworking/AzNetworking/Utilities/Endian.h b/Code/Framework/AzNetworking/AzNetworking/Utilities/Endian.h index 08ca785f72..67165c380d 100644 --- a/Code/Framework/AzNetworking/AzNetworking/Utilities/Endian.h +++ b/Code/Framework/AzNetworking/AzNetworking/Utilities/Endian.h @@ -14,14 +14,14 @@ #include #if AZ_TRAIT_NEEDS_HTONLL -static const uint64_t htonll(uint64_t value) +const uint64_t htonll(uint64_t value) { const uint32_t hiValue = htonl(static_cast(value >> 32)); const uint32_t loValue = htonl(static_cast(value & 0x00000000FFFFFFFF)); return static_cast(hiValue) << 32 | static_cast(loValue); } -static const uint64_t ntohll(uint64_t value) +const uint64_t ntohll(uint64_t value) { return htonll(value); } diff --git a/Code/Framework/AzTest/AzTest/Utils.cpp b/Code/Framework/AzTest/AzTest/Utils.cpp index 0fe701ca5a..e8885e6996 100644 --- a/Code/Framework/AzTest/AzTest/Utils.cpp +++ b/Code/Framework/AzTest/AzTest/Utils.cpp @@ -121,7 +121,6 @@ namespace AZ char** SplitCommandLine(int& size, char* const cmdLine) { std::vector tokens; - char* next_token = nullptr; char* tok = azstrtok(cmdLine, 0, " ", &next_token); while (tok != NULL) { diff --git a/Code/LauncherUnified/Launcher.cpp b/Code/LauncherUnified/Launcher.cpp index 30db54dab2..07da69cbe9 100644 --- a/Code/LauncherUnified/Launcher.cpp +++ b/Code/LauncherUnified/Launcher.cpp @@ -451,8 +451,6 @@ namespace O3DELauncher // The command line overrides are stored in the following fixed strings // until the ComponentApplication constructor can parse the command line parameters FixedValueString projectNameOptionOverride; - FixedValueString projectPathOptionOverride; - FixedValueString enginePathOptionOverride; // Insert the project_name option to the front const AZStd::string_view launcherProjectName = GetProjectName(); @@ -467,6 +465,8 @@ namespace O3DELauncher // Non-host platforms cannot use the project path that is #defined within the launcher. // In this case the the result of AZ::Utils::GetDefaultAppRoot is used instead #if !AZ_TRAIT_OS_IS_HOST_OS_PLATFORM + FixedValueString projectPathOptionOverride; + FixedValueString enginePathOptionOverride; AZStd::string_view projectPath; // Make sure the defaultAppRootPath variable is in scope long enough until the projectPath string_view is used below AZStd::optional defaultAppRootPath = AZ::Utils::GetDefaultAppRootPath(); diff --git a/Gems/AWSClientAuth/Code/Source/UserManagement/AWSCognitoUserManagementController.cpp b/Gems/AWSClientAuth/Code/Source/UserManagement/AWSCognitoUserManagementController.cpp index 19827f7013..42ee0065ad 100644 --- a/Gems/AWSClientAuth/Code/Source/UserManagement/AWSCognitoUserManagementController.cpp +++ b/Gems/AWSClientAuth/Code/Source/UserManagement/AWSCognitoUserManagementController.cpp @@ -229,7 +229,7 @@ namespace AWSClientAuth AZ::JobContext* jobContext = nullptr; AWSCore::AWSCoreRequestBus::BroadcastResult(jobContext, &AWSCore::AWSCoreRequests::GetDefaultJobContext); - AZ::Job* enableMFAJob = AZ::CreateJobFunction([this, cognitoIdentityProviderClient, accessToken]() + AZ::Job* enableMFAJob = AZ::CreateJobFunction([cognitoIdentityProviderClient, accessToken]() { Aws::CognitoIdentityProvider::Model::SetUserMFAPreferenceRequest confirmForgotPasswordRequest; Aws::CognitoIdentityProvider::Model::SMSMfaSettingsType settings; diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcessing/BloomBlurPass.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcessing/BloomBlurPass.cpp index 3fcff54eaa..b91990f6c9 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcessing/BloomBlurPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcessing/BloomBlurPass.cpp @@ -271,8 +271,6 @@ namespace AZ void BloomBlurPass::BuildKernelData() { - RHI::Size sourceImageSize; - m_weightData.clear(); m_offsetData.clear(); m_kernelRadiusData.clear(); diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/Bits.h b/Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/Bits.h index 6659383c2f..973076fe71 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/Bits.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/Bits.h @@ -280,27 +280,5 @@ namespace AZ } } - -// Emits an error when padding is introduced into a struct. -#if defined (AZ_COMPILER_MSVC) - -#define AZ_ASSERT_NO_ALIGNMENT_PADDING_BEGIN \ - __pragma(warning(push)) \ - __pragma(warning(error : 4820)) - -#define AZ_ASSERT_NO_ALIGNMENT_PADDING_END \ - __pragma(warning(pop)) - -#elif defined (AZ_COMPILER_CLANG) || defined (AZ_COMPILER_GCC) - -#define AZ_ASSERT_NO_ALIGNMENT_PADDING_BEGIN \ - _Pragma("GCC diagnostic push") \ - _Pragma("GCC diagnostic error \"-Wpadded\"") - -#define AZ_ASSERT_NO_ALIGNMENT_PADDING_END \ - _Pragma("GCC diagnostic pop") - -#else -#define AZ_ASSERT_NO_ALIGNMENT_PADDING_BEGIN -#define AZ_ASSERT_NO_ALIGNMENT_PADDING_END -#endif +#define AZ_ASSERT_NO_ALIGNMENT_PADDING_BEGIN AZ_PUSH_DISABLE_WARNING(4820, "-Wpadded") +#define AZ_ASSERT_NO_ALIGNMENT_PADDING_END AZ_POP_DISABLE_WARNING diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/IndexBufferView.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/IndexBufferView.h index 7219709109..d512b1a12d 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/IndexBufferView.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/IndexBufferView.h @@ -26,7 +26,7 @@ namespace AZ AZ_ASSERT_NO_ALIGNMENT_PADDING_BEGIN - class IndexBufferView + class alignas(8) IndexBufferView { public: IndexBufferView() = default; @@ -58,8 +58,6 @@ namespace AZ uint32_t m_byteOffset = 0; uint32_t m_byteCount = 0; IndexFormat m_format = IndexFormat::Uint32; - // Padding the size so it's 8 bytes aligned - uint32_t m_pad = 0; }; AZ_ASSERT_NO_ALIGNMENT_PADDING_END diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/IndirectBufferView.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/IndirectBufferView.h index 7014fd030c..5622b66adf 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/IndirectBufferView.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/IndirectBufferView.h @@ -21,7 +21,7 @@ namespace AZ //! Provides a view into a buffer, to be used as an indirect buffer. The content of the view is a contiguous //! list of commands sequences. It is provided to the RHI back-end at draw time. - class IndirectBufferView + class alignas(8) IndirectBufferView { public: IndirectBufferView() = default; @@ -59,8 +59,6 @@ namespace AZ uint32_t m_byteOffset = 0; uint32_t m_byteCount = 0; uint32_t m_byteStride = 0; - // Padding the size so it's 8 bytes aligned - uint32_t m_pad = 0; }; AZ_ASSERT_NO_ALIGNMENT_PADDING_END diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/StreamBufferView.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/StreamBufferView.h index 9c9a16e8df..068c44db73 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/StreamBufferView.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/StreamBufferView.h @@ -31,7 +31,7 @@ namespace AZ * or interleaved in a single StreamBufferView (one view having multiple StreamChannelDescriptors). * - The view will correspond to a single StreamBufferDescriptor. */ - class StreamBufferView + class alignas(8) StreamBufferView { public: StreamBufferView() = default; @@ -64,8 +64,6 @@ namespace AZ uint32_t m_byteOffset = 0; uint32_t m_byteCount = 0; uint32_t m_byteStride = 0; - // Padding the size so it's 8 bytes aligned - uint32_t m_pad = 0; }; AZ_ASSERT_NO_ALIGNMENT_PADDING_END diff --git a/Gems/Atom/RHI/Code/Source/RHI/DrawPacketBuilder.cpp b/Gems/Atom/RHI/Code/Source/RHI/DrawPacketBuilder.cpp index 7bfaed0a31..ebda9732df 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/DrawPacketBuilder.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/DrawPacketBuilder.cpp @@ -119,7 +119,7 @@ namespace AZ LinearAllocator linearAllocator; linearAllocator.Init(linearAllocatorDesc); - const VirtualAddress drawPacketOffset = linearAllocator.Allocate( + [[maybe_unused]] const VirtualAddress drawPacketOffset = linearAllocator.Allocate( sizeof(DrawPacket), AZStd::alignment_of::value); diff --git a/Gems/Atom/RHI/Code/Source/RHI/PipelineStateCache.cpp b/Gems/Atom/RHI/Code/Source/RHI/PipelineStateCache.cpp index 69eee86108..7f026453d7 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/PipelineStateCache.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/PipelineStateCache.cpp @@ -177,7 +177,7 @@ namespace AZ */ AZStd::vector threadLibraries; - m_threadLibrarySet.ForEach([this, handle, &threadLibraries](const ThreadLibrarySet& threadLibrarySet) + m_threadLibrarySet.ForEach([handle, &threadLibraries](const ThreadLibrarySet& threadLibrarySet) { const ThreadLibraryEntry& threadLibraryEntry = threadLibrarySet[handle.GetIndex()]; diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/AsyncUploadQueue.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/AsyncUploadQueue.cpp index 8f44abccef..529e0bc10e 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/AsyncUploadQueue.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/AsyncUploadQueue.cpp @@ -63,7 +63,6 @@ namespace AZ const uint8_t* sourceData = reinterpret_cast(request.m_sourceData); const size_t byteCount = request.m_byteCount; - const size_t byteOffset = request.m_byteOffset; auto* buffer = static_cast(request.m_buffer); RHI::BufferPool* bufferPool = static_cast(buffer->GetPool()); @@ -189,8 +188,6 @@ namespace AZ // Set pipeline barriers before copy. EmmitPrologueMemoryBarrier(request, residentMip); - const uint16_t arraySize = image->GetDescriptor().m_arraySize; - const uint16_t imageMipLevels = image->GetDescriptor().m_mipLevels; const static uint32_t bufferOffsetAlign = 4; // refer VkBufferImageCopy in the spec. // Variables for split subresource slice. @@ -213,11 +210,7 @@ namespace AZ // ImageHeight must be bigger than or equal to the Image's row count. Images with a RowCount that is less than the ImageHeight indicates a block compression. // Images with a RowCount which is higher than the ImageHeight indicates a planar image, which is not supported for streaming images. - if (subresourceLayout.m_size.m_height < subresourceLayout.m_rowCount) - { - AZ_Error("StreamingImage", false, "AsyncUploadQueue::QueueUpload expects ImageHeight '%d' to be bigger than or equal to the image's RowCount '%d'.", subresourceLayout.m_size.m_height, subresourceLayout.m_rowCount); - RHI::AsyncWorkHandle::Null; - } + AZ_Error("StreamingImage", subresourceLayout.m_size.m_height < subresourceLayout.m_rowCount, "AsyncUploadQueue::QueueUpload expects ImageHeight '%d' to be bigger than or equal to the image's RowCount '%d'.", subresourceLayout.m_size.m_height, subresourceLayout.m_rowCount); // The final staging size for each CopyTextureRegion command uint32_t stagingSize = stagingSlicePitch; @@ -596,7 +589,6 @@ namespace AZ uint32_t residentMip) { const auto& image = static_cast(*request.m_image); - const RHI::ImageBindFlags bindFlags = image.GetDescriptor().m_bindFlags; const VkImageLayout layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; const uint32_t beforeMip = residentMip; const uint32_t afterMip = beforeMip - static_cast(request.m_mipSlices.size()); diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/BufferPoolResolver.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/BufferPoolResolver.cpp index ba67f11c32..a94e610b49 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/BufferPoolResolver.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/BufferPoolResolver.cpp @@ -94,7 +94,6 @@ namespace AZ void BufferPoolResolver::Resolve(CommandList& commandList) { auto& device = static_cast(commandList.GetDevice()); - VkBufferCopy bufCopy{}; for (const BufferUploadPacket& packet : m_uploadPackets) { Buffer* stagingBuffer = packet.m_stagingBuffer.get(); diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandListAllocator.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandListAllocator.cpp index 09179c7110..bac7a69c9a 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandListAllocator.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandListAllocator.cpp @@ -100,7 +100,7 @@ namespace AZ commandPoolAllocatorDescriptor.m_collectLatency = descriptor.m_frameCountMax; commadPoolAllocator.Init(commandPoolAllocatorDescriptor); - m_commandListSubAllocators[queueFamilyIndex].SetInitFunction([this, &commadPoolAllocator] + m_commandListSubAllocators[queueFamilyIndex].SetInitFunction([&commadPoolAllocator] (Internal::CommandListSubAllocator& subAllocator) { subAllocator.Init(commadPoolAllocator); diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandQueue.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandQueue.cpp index 6929b63ac4..fdb583d10f 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandQueue.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandQueue.cpp @@ -109,7 +109,7 @@ namespace AZ { // The queue doesn't have an explicit way to signal a fence, so // we submit an empty work batch with only a fence to signal. - QueueCommand([this, &fence](void* queue) + QueueCommand([&fence](void* queue) { Queue* vulkanQueue = static_cast(queue); vulkanQueue->SubmitCommandBuffers( diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Device.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Device.cpp index 15a532f832..4f800f114b 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Device.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Device.cpp @@ -190,7 +190,6 @@ namespace AZ if (majorVersion >= 1 && minorVersion >= 2) { vulkan12Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES; - VkPhysicalDeviceVulkan12Features physicalDeviceVulkan12Features = physicalDevice.GetPhysicalDeviceVulkan12Features(); vulkan12Features.drawIndirectCount = physicalDevice.GetPhysicalDeviceVulkan12Features().drawIndirectCount; vulkan12Features.shaderFloat16 = physicalDevice.GetPhysicalDeviceVulkan12Features().shaderFloat16; vulkan12Features.shaderInt8 = physicalDevice.GetPhysicalDeviceVulkan12Features().shaderInt8; diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/NullDescriptorManager.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/NullDescriptorManager.cpp index 316144f323..6d16cdc284 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/NullDescriptorManager.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/NullDescriptorManager.cpp @@ -73,7 +73,6 @@ namespace AZ Device& device = static_cast(GetDevice()); const uint32_t imageDimension = 8; - const uint32_t pixelSize = 4; // fill out the different options for the types of image null descriptors m_imageNullDescriptor.m_images.resize(static_cast(ImageTypes::Count)); diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/StreamingImagePool.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/StreamingImagePool.cpp index 586470da0a..d00e597ae6 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/StreamingImagePool.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/StreamingImagePool.cpp @@ -153,7 +153,6 @@ namespace AZ } const VkMemoryRequirements memoryRequirements = GetMemoryRequirements(image.GetDescriptor(), targetMipLevel); - const uint16_t residentMipLevelBefore = static_cast(image.GetResidentMipLevel()); RHI::HeapMemoryUsage& memoryUsage = m_memoryUsage.GetHeapMemoryUsage(RHI::HeapMemoryLevel::Device); const size_t imageSizeBefore = image.GetResidentSizeInBytes(); diff --git a/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp b/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp index 35fde93e83..c2a2e16db7 100644 --- a/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp +++ b/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp @@ -106,7 +106,6 @@ void UiAnimationSystem::DoNodeStaticInitialisation() bool UiAnimationSystem::Load(const char* pszFile, const char* pszMission) { INDENT_LOG_DURING_SCOPE (true, "UI Animation system is loading the file '%s' (mission='%s')", pszFile, pszMission); - LOADING_TIME_PROFILE_SECTION(GetISystem()); XmlNodeRef rootNode = m_pSystem->LoadXmlFromFile(pszFile); if (!rootNode) From a35464ca08cd7152ddd541512e87a749541af5a2 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 10:09:44 -0700 Subject: [PATCH 04/49] more fixes Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Framework/AzCore/AzCore/RTTI/RTTI.h | 2 +- .../AzFramework/Archive/Archive.cpp | 1 - .../AzFramework/Archive/ZipDirCache.cpp | 1 - .../AzFramework/Script/ScriptComponent.cpp | 2 +- .../TcpTransport/TcpListenThread.cpp | 2 +- Code/Legacy/CrySystem/AZCoreLogSink.h | 2 +- .../LevelSystem/SpawnableLevelSystem.cpp | 1 - .../LevelSystem/SpawnableLevelSystem.h | 2 - Code/Legacy/CrySystem/System.cpp | 5 +- Code/Legacy/CrySystem/SystemInit.cpp | 13 ----- .../Public/Framework/JsonObjectHandler.h | 1 - .../Code/Source/Framework/HttpRequestJob.cpp | 2 +- .../Code/Source/NoClipControllerComponent.cpp | 4 +- .../DirectionalLightFeatureProcessor.cpp | 2 +- .../Code/Source/Decals/AsyncLoadTracker.h | 1 - .../DiffuseProbeGrid.cpp | 1 - .../ProfilingCaptureSystemComponent.cpp | 6 +-- .../RayTracing/RayTracingFeatureProcessor.cpp | 2 - .../ProjectedShadowFeatureProcessor.cpp | 1 - .../RPI/Code/Source/RPI.Public/Culling.cpp | 2 +- .../Code/Source/RPI.Public/MeshDrawPacket.cpp | 2 +- .../Source/RPI.Public/Pass/PassLibrary.cpp | 2 - .../Include/Atom/Utils/ImGuiCpuProfiler.inl | 7 +-- .../Include/Atom/Utils/ImGuiGpuProfiler.inl | 2 +- .../Include/Atom/Utils/StableDynamicArray.inl | 4 +- .../Source/PerViewportDynamicDrawManager.cpp | 2 +- .../AtomLyIntegration/AtomFont/AtomFont.h | 1 - .../AtomFont/Code/Source/AtomFont.cpp | 7 +-- ...AtomViewportDisplayInfoSystemComponent.cpp | 1 - Gems/AudioSystem/Code/Source/Engine/ATL.cpp | 2 - .../Code/Source/Engine/ATLAudioObject.cpp | 3 +- .../Code/Source/Engine/ATLComponents.cpp | 4 +- .../Code/Source/Engine/ATLComponents.h | 2 - .../Code/Source/Engine/AudioSystem.cpp | 2 +- .../Code/Source/Engine/FileCacheManager.cpp | 2 +- .../CommandSystem/Source/ActorCommands.cpp | 2 - .../Source/Importer/ChunkProcessors.cpp | 6 --- .../Code/EMotionFX/Source/RagdollInstance.cpp | 1 - .../Code/EMotionFX/Source/SpringSolver.cpp | 1 - .../Code/Include/GradientSignal/SmoothStep.h | 1 - Gems/ImGui/Code/Source/ImGuiManager.cpp | 53 ------------------- Gems/ImGui/Code/Source/ImGuiManager.h | 1 - Gems/LyShine/Code/Source/Animation/2DSpline.h | 1 - 43 files changed, 28 insertions(+), 134 deletions(-) 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()); From 9245a31196fe120943a1af20033b09db4948746b Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 14:48:42 -0700 Subject: [PATCH 05/49] more fixes for Code Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Editor/EditorViewportWidget.cpp | 18 ++++++------ Code/Framework/AzCore/AzCore/Math/Guid.h | 2 +- .../AzCore/AzCore/Memory/AllocatorScope.h | 2 +- Code/Framework/AzCore/AzCore/RTTI/RTTI.h | 4 +-- Code/Framework/AzCore/AzCore/base.h | 2 +- Code/Framework/AzCore/Tests/AZStd/Variant.cpp | 2 -- .../Tests/Asset/AssetDataStreamTests.cpp | 2 +- .../Asset/AssetManagerStreamingTests.cpp | 2 +- .../Tests/Debug/LocalFileEventLoggerTests.cpp | 4 ++- Code/Framework/AzCore/Tests/EBus.cpp | 4 +-- Code/Framework/AzCore/Tests/EnumTests.cpp | 2 +- .../AzCore/Tests/GenericStreamTests.cpp | 2 +- Code/Framework/AzCore/Tests/Jobs.cpp | 2 +- Code/Framework/AzCore/Tests/Math/CrcTests.cpp | 2 +- .../Framework/AzCore/Tests/Name/NameTests.cpp | 4 --- Code/Framework/AzCore/Tests/Rtti.cpp | 5 ++-- .../Json/BasicContainerSerializerTests.cpp | 5 ---- .../Serialization/Json/IntSerializerTests.cpp | 1 + .../Json/JsonSerializationTests.cpp | 1 - .../Json/MathMatrixSerializerTests.cpp | 2 +- .../StreamStackEntryConformityTests.h | 2 +- .../AzFramework/Tests/ArchiveTests.cpp | 3 +- .../SpawnableEntitiesManagerTests.cpp | 14 +++++++--- .../Components/DockBarButton.cpp | 1 - .../Components/FilteredSearchWidget.cpp | 2 +- .../Components/Widgets/Eyedropper.h | 2 +- .../Components/Widgets/GradientSlider.cpp | 3 +- .../Components/Widgets/Slider.cpp | 4 +-- .../Components/WindowDecorationWrapper.cpp | 1 - .../AzQtComponents/Utilities/ScreenGrabber.h | 2 +- .../Utilities/ScreenGrabber_win.cpp | 2 +- Code/Framework/AzTest/AzTest/Utils.cpp | 1 + .../Application/ToolsApplication.cpp | 5 ---- .../AssetDatabase/AssetDatabaseConnection.cpp | 28 +++++++++++++++++++ .../AssetDatabase/AssetDatabaseConnection.h | 20 ------------- .../Component/EditorComponentAPIComponent.cpp | 2 +- .../Entity/EditorEntityHelpers.cpp | 2 +- .../SliceEditorEntityOwnershipService.cpp | 1 - .../Manipulators/EditorVertexSelection.cpp | 2 +- .../Instance/InstanceToTemplatePropagator.cpp | 2 -- .../Prefab/PrefabPublicHandler.cpp | 3 -- .../AzToolsFramework/Slice/SliceUtilities.cpp | 6 ++-- .../Thumbnails/LoadingThumbnail.cpp | 1 - .../Thumbnails/LoadingThumbnail.h | 1 - .../UI/Layer/LayerUiHandler.cpp | 3 -- .../UI/Outliner/EntityOutlinerListModel.cpp | 6 +--- .../UI/Prefab/PrefabIntegrationManager.cpp | 14 +++++----- .../PropertyEditor/EntityPropertyEditor.cpp | 4 +-- .../UI/PropertyEditor/PropertyAssetCtrl.cpp | 2 +- .../ReflectedPropertyEditor.cpp | 2 +- .../UI/Slice/SlicePushWidget.cpp | 2 +- .../UI/UICore/QTreeViewStateSaver.hxx | 1 - Code/Legacy/CryCommon/CryLibrary.h | 4 +-- .../LevelSystem/SpawnableLevelSystem.cpp | 2 +- 54 files changed, 97 insertions(+), 121 deletions(-) diff --git a/Code/Editor/EditorViewportWidget.cpp b/Code/Editor/EditorViewportWidget.cpp index c305b1be6c..71461f14f2 100644 --- a/Code/Editor/EditorViewportWidget.cpp +++ b/Code/Editor/EditorViewportWidget.cpp @@ -1975,12 +1975,12 @@ Vec3 EditorViewportWidget::ViewToWorld( { AZ_PROFILE_FUNCTION(Editor); - AZ_UNUSED(collideWithTerrain) - AZ_UNUSED(onlyTerrain) - AZ_UNUSED(bTestRenderMesh) - AZ_UNUSED(bSkipVegetation) - AZ_UNUSED(bSkipVegetation) - AZ_UNUSED(collideWithObject) + AZ_UNUSED(collideWithTerrain); + AZ_UNUSED(onlyTerrain); + AZ_UNUSED(bTestRenderMesh); + AZ_UNUSED(bSkipVegetation); + AZ_UNUSED(bSkipVegetation); + AZ_UNUSED(collideWithObject); auto ray = m_renderViewport->ViewportScreenToWorldRay(AzToolsFramework::ViewportInteraction::ScreenPointFromQPoint(vp)); if (!ray.has_value()) @@ -2004,9 +2004,9 @@ Vec3 EditorViewportWidget::ViewToWorld( ////////////////////////////////////////////////////////////////////////// Vec3 EditorViewportWidget::ViewToWorldNormal(const QPoint& vp, bool onlyTerrain, bool bTestRenderMesh) { - AZ_UNUSED(vp) - AZ_UNUSED(onlyTerrain) - AZ_UNUSED(bTestRenderMesh) + AZ_UNUSED(vp); + AZ_UNUSED(onlyTerrain); + AZ_UNUSED(bTestRenderMesh); AZ_PROFILE_FUNCTION(Editor); diff --git a/Code/Framework/AzCore/AzCore/Math/Guid.h b/Code/Framework/AzCore/AzCore/Math/Guid.h index 15c4c52742..e2a56f86d8 100644 --- a/Code/Framework/AzCore/AzCore/Math/Guid.h +++ b/Code/Framework/AzCore/AzCore/Math/Guid.h @@ -66,7 +66,7 @@ typedef const GUID& REFIID; const GUID name \ = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } -REFGUID GUID_NULL() +inline static REFGUID GUID_NULL() { static GUID guid = { 0x00000000L, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; return guid; diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorScope.h b/Code/Framework/AzCore/AzCore/Memory/AllocatorScope.h index 3d97a3042d..7637db3967 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorScope.h +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorScope.h @@ -22,7 +22,7 @@ namespace AZ { // Note the parameter pack expansion, this creates the equivalent of a fold expression // For each type, call InitAllocator(), then put 0 in the initializer list - std::initializer_list init{(InitAllocator(), 0)...}; + [[maybe_unused]] std::initializer_list init{(InitAllocator(), 0)...}; } void DeactivateAllocators() diff --git a/Code/Framework/AzCore/AzCore/RTTI/RTTI.h b/Code/Framework/AzCore/AzCore/RTTI/RTTI.h index 1dddf76556..fa081a9497 100644 --- a/Code/Framework/AzCore/AzCore/RTTI/RTTI.h +++ b/Code/Framework/AzCore/AzCore/RTTI/RTTI.h @@ -493,7 +493,7 @@ namespace AZ const void* result = GetTypeId() == asType ? instance : nullptr; using dummy = bool[]; - dummy{ true, (CastInternal(result, instance, asType), true)... }; + [[maybe_unused]] dummy d { true, (CastInternal(result, instance, asType), true)... }; return result; } @@ -534,7 +534,7 @@ namespace AZ callback(GetActualUuid(instance), instance); using dummy = bool[]; - dummy{ true, (RttiHelper{}.EnumHierarchy(callback, instance), true)... }; + [[maybe_unused]] dummy d = { true, (RttiHelper{}.EnumHierarchy(callback, instance), true)... }; } TypeTraits GetTypeTraits() const override { diff --git a/Code/Framework/AzCore/AzCore/base.h b/Code/Framework/AzCore/AzCore/base.h index 20f5c17b27..f6ae39dcda 100644 --- a/Code/Framework/AzCore/AzCore/base.h +++ b/Code/Framework/AzCore/AzCore/base.h @@ -293,7 +293,7 @@ namespace AZ #define AZ_DEFAULT_COPY_MOVE(_Class) AZ_DEFAULT_COPY(_Class) AZ_DEFAULT_MOVE(_Class) // Macro that can be used to avoid unreferenced variable warnings -#define AZ_UNUSED(x) (void)x; +#define AZ_UNUSED(x) (void)x #define AZ_DEFINE_ENUM_BITWISE_OPERATORS(EnumType) \ inline constexpr EnumType operator | (EnumType a, EnumType b) \ diff --git a/Code/Framework/AzCore/Tests/AZStd/Variant.cpp b/Code/Framework/AzCore/Tests/AZStd/Variant.cpp index 824a99fa88..700574323c 100644 --- a/Code/Framework/AzCore/Tests/AZStd/Variant.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/Variant.cpp @@ -318,8 +318,6 @@ namespace UnitTest using TestVariant2 = AZStd::variant; static_assert(sizeof(TestVariant1) == sizeof(TestVariant2), "with different permutations variants of same types should be the same size"); using UnorderedVariant3 = AZStd::variant, TestAlignedStorage>; - constexpr size_t testVariant1Size = sizeof(TestVariant1); - constexpr size_t unorderedVariant3Size = sizeof(UnorderedVariant3); static_assert(sizeof(TestVariant1) == sizeof(UnorderedVariant3), "with different permutations variants of same types should be the same size"); } diff --git a/Code/Framework/AzCore/Tests/Asset/AssetDataStreamTests.cpp b/Code/Framework/AzCore/Tests/Asset/AssetDataStreamTests.cpp index efcc62682a..27903495f1 100644 --- a/Code/Framework/AzCore/Tests/Asset/AssetDataStreamTests.cpp +++ b/Code/Framework/AzCore/Tests/Asset/AssetDataStreamTests.cpp @@ -297,7 +297,7 @@ TEST_F(AssetDataStreamTest, IsFullyLoaded_FileDoesNotReadAllData_DataIsNotFullyL using ::testing::_; ON_CALL(m_mockStreamer, GetReadRequestResult(_, _, _, _)) - .WillByDefault([this, incompleteAssetSize]( + .WillByDefault([this]( [[maybe_unused]] FileRequestHandle request, void*& buffer, AZ::u64& numBytesRead, diff --git a/Code/Framework/AzCore/Tests/Asset/AssetManagerStreamingTests.cpp b/Code/Framework/AzCore/Tests/Asset/AssetManagerStreamingTests.cpp index 0fd792b444..46ff4ff3e7 100644 --- a/Code/Framework/AzCore/Tests/Asset/AssetManagerStreamingTests.cpp +++ b/Code/Framework/AzCore/Tests/Asset/AssetManagerStreamingTests.cpp @@ -72,7 +72,7 @@ namespace UnitTest }); ON_CALL(m_mockStreamer, GetRequestStatus(_)) - .WillByDefault([this]([[maybe_unused]] FileRequestHandle request) + .WillByDefault([]([[maybe_unused]] FileRequestHandle request) { // Return whatever request status has been set in this class return IO::IStreamerTypes::RequestStatus::Completed; diff --git a/Code/Framework/AzCore/Tests/Debug/LocalFileEventLoggerTests.cpp b/Code/Framework/AzCore/Tests/Debug/LocalFileEventLoggerTests.cpp index 11f32de42f..242ac0e65d 100644 --- a/Code/Framework/AzCore/Tests/Debug/LocalFileEventLoggerTests.cpp +++ b/Code/Framework/AzCore/Tests/Debug/LocalFileEventLoggerTests.cpp @@ -226,8 +226,10 @@ namespace AZ::Debug AZStd::thread threads[totalThreads]; for (size_t threadIndex = 0; threadIndex < totalThreads; ++threadIndex) { - threads[threadIndex] = AZStd::thread([&startLogging, &totalRecordsWritten, &message, recordsPerThreadCount]() + threads[threadIndex] = AZStd::thread([&startLogging, &message, &totalRecordsWritten]() { + AZ_UNUSED(message); + while (!startLogging) { AZStd::this_thread::yield(); diff --git a/Code/Framework/AzCore/Tests/EBus.cpp b/Code/Framework/AzCore/Tests/EBus.cpp index c30c9ed62d..10216a0485 100644 --- a/Code/Framework/AzCore/Tests/EBus.cpp +++ b/Code/Framework/AzCore/Tests/EBus.cpp @@ -2837,7 +2837,7 @@ namespace UnitTest handlerList.emplace_back(i, maxSleep); } - auto work = [maxSleep, threadCount]() + auto work = []() { char sentinel[64] = { 0 }; char* end = sentinel + AZ_ARRAY_SIZE(sentinel); @@ -2923,7 +2923,7 @@ namespace UnitTest MyEventGroupImpl handler; - auto work = [maxSleep, &handler]() + auto work = [&handler]() { for (int i = 1; i < cycleCount; ++i) { diff --git a/Code/Framework/AzCore/Tests/EnumTests.cpp b/Code/Framework/AzCore/Tests/EnumTests.cpp index 7f123a23b4..4c19d3f574 100644 --- a/Code/Framework/AzCore/Tests/EnumTests.cpp +++ b/Code/Framework/AzCore/Tests/EnumTests.cpp @@ -81,7 +81,7 @@ namespace UnitTest auto EnumerateTestEnum = []() constexpr -> bool { int count = 0; - for (TestEnumEnumeratorValueAndString enumMember : TestEnumMembers) + for ([[maybe_unused]] TestEnumEnumeratorValueAndString enumMember : TestEnumMembers) { ++count; } diff --git a/Code/Framework/AzCore/Tests/GenericStreamTests.cpp b/Code/Framework/AzCore/Tests/GenericStreamTests.cpp index 5f6190ac76..4f21c1e593 100644 --- a/Code/Framework/AzCore/Tests/GenericStreamTests.cpp +++ b/Code/Framework/AzCore/Tests/GenericStreamTests.cpp @@ -62,7 +62,7 @@ public: // Reroute the mock stream to our output MemoryStream for writing. ON_CALL(m_mockGenericStream, Write(_, _)) - .WillByDefault([this, &outputStream](AZ::IO::SizeType bytes, const void* buffer) + .WillByDefault([&outputStream](AZ::IO::SizeType bytes, const void* buffer) { return outputStream.Write(bytes, buffer); }); diff --git a/Code/Framework/AzCore/Tests/Jobs.cpp b/Code/Framework/AzCore/Tests/Jobs.cpp index 0eb46a0051..b88e1f5b32 100644 --- a/Code/Framework/AzCore/Tests/Jobs.cpp +++ b/Code/Framework/AzCore/Tests/Jobs.cpp @@ -1361,7 +1361,7 @@ namespace UnitTest AZ::JobCompletion completion; // Push a parent job that pushes the work as child jobs (requires the current job, so this is a real world test of "functor with current job as param") - AZ::Job* parentJob = AZ::CreateJobFunction([this, &jobData, JobCount](AZ::Job& thisJob) + AZ::Job* parentJob = AZ::CreateJobFunction([this, &jobData](AZ::Job& thisJob) { EXPECT_EQ(m_jobManager->GetCurrentJob(), &thisJob); diff --git a/Code/Framework/AzCore/Tests/Math/CrcTests.cpp b/Code/Framework/AzCore/Tests/Math/CrcTests.cpp index 04d2e3d8cb..0255c1ad6d 100644 --- a/Code/Framework/AzCore/Tests/Math/CrcTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/CrcTests.cpp @@ -56,7 +56,7 @@ namespace Benchmark // This function only exist to calculate AZ::Crc32 values at compile time for (auto _ : state) { - constexpr auto resultArray = Crc32Internal::GenerateTestCrc32Values(); + [[maybe_unused]] constexpr auto resultArray = Crc32Internal::GenerateTestCrc32Values(); } } diff --git a/Code/Framework/AzCore/Tests/Name/NameTests.cpp b/Code/Framework/AzCore/Tests/Name/NameTests.cpp index 3b6310b1de..6cbf6f1b88 100644 --- a/Code/Framework/AzCore/Tests/Name/NameTests.cpp +++ b/Code/Framework/AzCore/Tests/Name/NameTests.cpp @@ -582,7 +582,6 @@ namespace UnitTest TEST_F(NameTest, ConcurrencyDataTest_EachThreadCreatesOneName_NoCollision) { - const uint32_t maxUniqueHashes = std::numeric_limits::max(); AZ::NameDictionary::Destroy(); AZ::NameDictionary::Create(); @@ -592,7 +591,6 @@ namespace UnitTest TEST_F(NameTest, ConcurrencyDataTest_EachThreadCreatesOneName_HighCollisions) { - const uint32_t maxUniqueHashes = 25; AZ::NameDictionary::Destroy(); AZ::NameDictionary::Create(); @@ -602,7 +600,6 @@ namespace UnitTest TEST_F(NameTest, ConcurrencyDataTest_EachThreadRepeatedlyCreatesAndReleasesOneName_NoCollision) { - const uint32_t maxUniqueHashes = std::numeric_limits::max(); AZ::NameDictionary::Destroy(); AZ::NameDictionary::Create(); @@ -613,7 +610,6 @@ namespace UnitTest TEST_F(NameTest, ConcurrencyDataTest_EachThreadRepeatedlyCreatesAndReleasesOneName_HighCollisions) { - const uint32_t maxUniqueHashes = 25; AZ::NameDictionary::Destroy(); AZ::NameDictionary::Create(); diff --git a/Code/Framework/AzCore/Tests/Rtti.cpp b/Code/Framework/AzCore/Tests/Rtti.cpp index 862482d10a..935df848c2 100644 --- a/Code/Framework/AzCore/Tests/Rtti.cpp +++ b/Code/Framework/AzCore/Tests/Rtti.cpp @@ -171,7 +171,6 @@ namespace UnitTest AZ_TEST_ASSERT(AzGenericTypeInfo::Uuid() == templateUuid); // Check all combinations return a valid id. - Uuid nullId = Uuid::CreateNull(); AZ_TEST_ASSERT(AzGenericTypeInfo::Uuid() == AZ::Uuid("{911B2EA8-CCB1-4F0C-A535-540AD00173AE}")); AZ_TEST_ASSERT(AzGenericTypeInfo::Uuid() == AZ::Uuid("{6BAE9836-EC49-466A-85F2-F4B1B70839FB}")); AZ_TEST_ASSERT(AzGenericTypeInfo::Uuid() == AZ::Uuid("{C9F9C644-CCC3-4F77-A792-F5B5DBCA746E}")); @@ -460,8 +459,8 @@ namespace UnitTest TEST_F(Rtti, IsAbstract) { // compile time proof that the two non-abstract classes are not abstract at compile time: - ExampleFullImplementationClass one; - ExampleCombined two; + [[maybe_unused]] ExampleFullImplementationClass one; + [[maybe_unused]] ExampleCombined two; ASSERT_NE(GetRttiHelper(), nullptr); ASSERT_NE(GetRttiHelper(), nullptr); diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/BasicContainerSerializerTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/BasicContainerSerializerTests.cpp index 6839afac6d..3bc574c2ce 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/BasicContainerSerializerTests.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/BasicContainerSerializerTests.cpp @@ -144,11 +144,6 @@ namespace JsonSerializationTests { return false; } - - auto compare = [](const int* lhs, const int* rhs) -> bool - { - return *lhs == *rhs; - }; return AZStd::equal(lhs.begin(), lhs.end(), rhs.begin(), SimplePointerTestDescriptionCompare{}); } }; diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/IntSerializerTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/IntSerializerTests.cpp index c971535f0b..9aca0b8e47 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/IntSerializerTests.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/IntSerializerTests.cpp @@ -544,6 +544,7 @@ namespace JsonSerializationTests ResultCode result = this->m_serializer->Store(convertedValue, &value, nullptr, azrtti_typeid::DataType>(), *this->m_jsonSerializationContext); + EXPECT_EQ(Outcomes::Success, result.GetOutcome()); if constexpr (AZStd::is_signed::DataType>::value) { diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/JsonSerializationTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/JsonSerializationTests.cpp index 76624a0d44..20d956cd8a 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/JsonSerializationTests.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/JsonSerializationTests.cpp @@ -560,7 +560,6 @@ namespace JsonSerializationTests { using namespace AZ::JsonSerializationResult; - TemplatedClass instance; ResultCode result = AZ::JsonSerialization::Store(*m_jsonDocument, m_jsonDocument->GetAllocator(), nullptr, nullptr, azrtti_typeid(), *m_serializationSettings); diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/MathMatrixSerializerTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/MathMatrixSerializerTests.cpp index 1126aeb662..be51b3bf74 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/MathMatrixSerializerTests.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/MathMatrixSerializerTests.cpp @@ -469,6 +469,7 @@ namespace JsonSerializationTests *this->m_jsonDocument, *this->m_jsonDeserializationContext); + ASSERT_EQ(Outcomes::Success, result.GetOutcome()); EXPECT_TRUE(defaultValue == output); } @@ -503,7 +504,6 @@ namespace JsonSerializationTests using namespace AZ::JsonSerializationResult; using Descriptor = typename JsonMathMatrixSerializerTests::Descriptor; - const auto defaultValue = Descriptor::MatrixType::CreateIdentity(); rapidjson::Value& objectValue = this->m_jsonDocument->SetObject(); auto input = Descriptor::MatrixType::CreateIdentity(); DataHelper::AddData(objectValue, input, this->m_jsonDocument->GetAllocator()); diff --git a/Code/Framework/AzCore/Tests/Streamer/StreamStackEntryConformityTests.h b/Code/Framework/AzCore/Tests/Streamer/StreamStackEntryConformityTests.h index e6084fe115..7162b6efa0 100644 --- a/Code/Framework/AzCore/Tests/Streamer/StreamStackEntryConformityTests.h +++ b/Code/Framework/AzCore/Tests/Streamer/StreamStackEntryConformityTests.h @@ -250,7 +250,7 @@ namespace AZ::IO constexpr s32 minValue = std::numeric_limits::min(); EXPECT_CALL(*mock, UpdateStatus(_)) - .WillOnce([minValue](StreamStackEntry::Status& status) + .WillOnce([](StreamStackEntry::Status& status) { status.m_numAvailableSlots = minValue; }); diff --git a/Code/Framework/AzFramework/Tests/ArchiveTests.cpp b/Code/Framework/AzFramework/Tests/ArchiveTests.cpp index 11495ec5d7..2caaf6ee71 100644 --- a/Code/Framework/AzFramework/Tests/ArchiveTests.cpp +++ b/Code/Framework/AzFramework/Tests/ArchiveTests.cpp @@ -84,7 +84,7 @@ namespace UnitTest for (AZ::u32 threadIdx = 0; threadIdx < numThreads; ++threadIdx) { - auto threadFunctor = [&testFunction, testIteration, threadIdx, &successCount]() + auto threadFunctor = [&testFunction, &successCount]() { // Add some variability to thread timing by yielding each thread AZStd::this_thread::yield(); @@ -769,7 +769,6 @@ namespace UnitTest AZStd::intrusive_ptr pArchive = archive->OpenArchive(testArchivePath, nullptr, AZ::IO::INestedArchive::FLAGS_CREATE_NEW); EXPECT_NE(nullptr, pArchive); - char fillBuffer[32] = "Test"; EXPECT_EQ(0, pArchive->UpdateFile("foundit.dat", const_cast("test"), 4, AZ::IO::INestedArchive::METHOD_COMPRESS, AZ::IO::INestedArchive::LEVEL_BEST)); pArchive.reset(); diff --git a/Code/Framework/AzFramework/Tests/Spawnable/SpawnableEntitiesManagerTests.cpp b/Code/Framework/AzFramework/Tests/Spawnable/SpawnableEntitiesManagerTests.cpp index f68af08f4a..407ab1d21f 100644 --- a/Code/Framework/AzFramework/Tests/Spawnable/SpawnableEntitiesManagerTests.cpp +++ b/Code/Framework/AzFramework/Tests/Spawnable/SpawnableEntitiesManagerTests.cpp @@ -313,7 +313,7 @@ namespace UnitTest FillSpawnable(NumEntities); CreateEntityReferences(refScheme); - auto callback = [this, refScheme, NumEntities] + auto callback = [this, refScheme] (AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) { ValidateEntityReferences(refScheme, NumEntities, entities); @@ -346,7 +346,7 @@ namespace UnitTest FillSpawnable(NumEntities); CreateEntityReferences(refScheme); - auto callback = [this, refScheme, NumEntities] + auto callback = [this, refScheme] (AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) { ValidateEntityReferences(refScheme, NumEntities, entities); @@ -572,6 +572,8 @@ namespace UnitTest auto callback = [this, refScheme, NumEntities](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) { + AZ_UNUSED(refScheme); + AZ_UNUSED(NumEntities); ValidateEntityReferences(refScheme, NumEntities, entities); }; @@ -592,6 +594,8 @@ namespace UnitTest auto callback = [this, refScheme, NumEntities](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) { + AZ_UNUSED(refScheme); + AZ_UNUSED(NumEntities); ValidateEntityReferences(refScheme, NumEntities, entities); }; @@ -617,7 +621,7 @@ namespace UnitTest CreateEntityReferences(refScheme); auto callback = - [this, refScheme, NumEntities](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + [](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) { size_t numElements = entities.size(); @@ -671,7 +675,7 @@ namespace UnitTest CreateEntityReferences(refScheme); auto callback = - [this, refScheme, NumEntities](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + [](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) { size_t numElements = entities.size(); @@ -719,6 +723,8 @@ namespace UnitTest auto callback = [this, refScheme, NumEntities](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) { + AZ_UNUSED(refScheme); + AZ_UNUSED(NumEntities); ValidateEntityReferences(refScheme, NumEntities, entities); }; diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/DockBarButton.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/DockBarButton.cpp index 113516c350..e48121c118 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/DockBarButton.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/DockBarButton.cpp @@ -141,7 +141,6 @@ namespace AzQtComponents } QRect buttonRect = style->subControlRect(QStyle::CC_ToolButton, option, QStyle::SC_ToolButton, widget); - QRect menuRect = style->subControlRect(QStyle::CC_ToolButton, option, QStyle::SC_ToolButtonMenu, widget); painter->save(); diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FilteredSearchWidget.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FilteredSearchWidget.cpp index b924eb9776..7fb9942032 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FilteredSearchWidget.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FilteredSearchWidget.cpp @@ -852,7 +852,7 @@ namespace AzQtComponents { FilterCriteriaButton* button = createCriteriaButton(filter, index); connect(button, &FilterCriteriaButton::RequestClose, this, [this, index]() { SetFilterStateByIndex(index, false); }); - connect(button, &FilterCriteriaButton::ExtraButtonClicked, this, [this, index](FilterCriteriaButton::ExtraButtonType type) + connect(button, &FilterCriteriaButton::ExtraButtonClicked, this, [](FilterCriteriaButton::ExtraButtonType type) { switch (type) { diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Eyedropper.h b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Eyedropper.h index 68627f534a..741a22e47e 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Eyedropper.h +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Eyedropper.h @@ -72,7 +72,7 @@ namespace AzQtComponents void release(bool selected); - QToolButton* m_button; + [[maybe_unused]] QToolButton* m_button; int m_contextSize; int m_sampleSize; diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/GradientSlider.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/GradientSlider.cpp index a1ebd6c16c..1ffff57ade 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/GradientSlider.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/GradientSlider.cpp @@ -30,7 +30,7 @@ GradientSlider::GradientSlider(Qt::Orientation orientation, QWidget* parent) setMouseTracking(true); - m_colorFunction = [this](qreal value) { + m_colorFunction = [](qreal value) { return QColor::fromRgbF(value, value, value); }; @@ -115,7 +115,6 @@ void GradientSlider::mouseMoveEvent(QMouseEvent* event) int intValue = Slider::valueFromPosition(this, event->pos(), width(), height(), rect().bottom()); qreal value = (aznumeric_cast(intValue - minimum()) / aznumeric_cast(maximum() - minimum())); - QColor rgb = m_colorFunction(value); const QString toolTipText = m_toolTipFunction(value); diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Slider.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Slider.cpp index f5de3c0c30..14ac2010bc 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Slider.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Slider.cpp @@ -490,11 +490,11 @@ QRect Slider::sliderGrooveRect(const Style* style, const QStyleOptionSlider* opt return {}; } -bool Slider::polish(Style* style, QWidget* widget, const Slider::Config& config) +bool Slider::polish([[maybe_unused]] Style* style, QWidget* widget, const Slider::Config& config) { Q_UNUSED(config); - auto polishSlider = [style](auto slider) + auto polishSlider = [](auto slider) { // Qt's stylesheet parsing doesn't set custom properties on things specified via // pseudo-states, such as horizontal/vertical, so we implement our own diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/WindowDecorationWrapper.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/WindowDecorationWrapper.cpp index 5561ec0c0f..804ea841dd 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/WindowDecorationWrapper.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/WindowDecorationWrapper.cpp @@ -65,7 +65,6 @@ namespace AzQtComponents return false; } - const quint16 currentMajorVersion = 2; quint16 majorVersion = 0; quint16 minorVersion = 0; diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Utilities/ScreenGrabber.h b/Code/Framework/AzQtComponents/AzQtComponents/Utilities/ScreenGrabber.h index b5bbdb6ade..a32aeda3fc 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Utilities/ScreenGrabber.h +++ b/Code/Framework/AzQtComponents/AzQtComponents/Utilities/ScreenGrabber.h @@ -31,7 +31,7 @@ namespace AzQtComponents private: QSize m_size; - Eyedropper* m_owner; + [[maybe_unused]] Eyedropper* m_owner; QScopedPointer m_internal; }; diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Utilities/ScreenGrabber_win.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Utilities/ScreenGrabber_win.cpp index 56d0663f88..ba23bea557 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Utilities/ScreenGrabber_win.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Utilities/ScreenGrabber_win.cpp @@ -217,7 +217,7 @@ namespace AzQtComponents } ScreenGrabber::ScreenGrabber(const QSize size, Eyedropper* parent /* = nullptr */) - : QObject(static_cast(parent)) + : QObject(parent) , m_size(size) , m_owner(parent) { diff --git a/Code/Framework/AzTest/AzTest/Utils.cpp b/Code/Framework/AzTest/AzTest/Utils.cpp index e8885e6996..7c2c964504 100644 --- a/Code/Framework/AzTest/AzTest/Utils.cpp +++ b/Code/Framework/AzTest/AzTest/Utils.cpp @@ -121,6 +121,7 @@ namespace AZ char** SplitCommandLine(int& size, char* const cmdLine) { std::vector tokens; + [[maybe_unused]] char* next_token = nullptr; char* tok = azstrtok(cmdLine, 0, " ", &next_token); while (tok != NULL) { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp index 3e895465e5..ba9a659ba4 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp @@ -87,11 +87,6 @@ namespace AzToolsFramework { namespace Internal { - static const char* s_engineConfigFileName = "engine.json"; - static const char* s_engineConfigEngineVersionKey = "O3DEVersion"; - - static const char* s_startupLogWindow = "Startup"; - template void DeleteEntities(const IdContainerType& entityIds) { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetDatabase/AssetDatabaseConnection.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetDatabase/AssetDatabaseConnection.cpp index 7daf573c99..2e8e4ef639 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetDatabase/AssetDatabaseConnection.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetDatabase/AssetDatabaseConnection.cpp @@ -939,6 +939,34 @@ namespace AzToolsFramework jobinfo.m_warningCount = jobDatabaseEntry.m_warningCount; jobinfo.m_errorCount = jobDatabaseEntry.m_errorCount; } + + bool GetDatabaseInfoResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::databaseInfoHandler handler); + bool GetScanFolderResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::scanFolderHandler handler); + bool GetSourceResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::sourceHandler handler); + bool GetSourceAndScanfolderResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::combinedSourceScanFolderHandler handler); + bool GetSourceDependencyResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::sourceFileDependencyHandler handler); + bool GetJobResultSimple(const char* name, SQLite::Statement* statement, AssetDatabaseConnection::jobHandler handler); + bool GetJobResult( + const char* callName, + SQLite::Statement* statement, + AssetDatabaseConnection::jobHandler handler, + AZ::Uuid builderGuid = AZ::Uuid::CreateNull(), + const char* jobKey = nullptr, + AssetSystem::JobStatus status = AssetSystem::JobStatus::Any); + bool GetProductResultSimple(const char* name, SQLite::Statement* statement, AssetDatabaseConnection::productHandler handler); + bool GetProductResult( + const char* callName, + SQLite::Statement* statement, + AssetDatabaseConnection::productHandler handler, + AZ::Uuid builderGuid = AZ::Uuid::CreateNull(), + const char* jobKey = nullptr, + AssetSystem::JobStatus status = AssetSystem::JobStatus::Any); + bool GetLegacySubIDsResult(const char* callname, SQLite::Statement* statement, AssetDatabaseConnection::legacySubIDsHandler handler); + bool GetProductDependencyResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::productDependencyHandler handler); + bool GetProductDependencyAndPathResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::productDependencyAndPathHandler handler); + bool GetMissingProductDependencyResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::missingProductDependencyHandler handler); + bool GetCombinedDependencyResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::combinedProductDependencyHandler handler); + bool GetFileResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::fileHandler handler); } ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetDatabase/AssetDatabaseConnection.h b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetDatabase/AssetDatabaseConnection.h index 8672ad4a15..a59dbfbda4 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetDatabase/AssetDatabaseConnection.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetDatabase/AssetDatabaseConnection.h @@ -655,26 +655,6 @@ namespace AzToolsFramework // before every query, since validating it essentially must makes sure it exists. AZStd::unordered_set m_validatedTables; }; - - namespace - { - //boiler plate - bool GetDatabaseInfoResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::databaseInfoHandler handler); - bool GetScanFolderResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::scanFolderHandler handler); - bool GetSourceResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::sourceHandler handler); - bool GetSourceAndScanfolderResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::combinedSourceScanFolderHandler handler); - bool GetSourceDependencyResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::sourceFileDependencyHandler handler); - bool GetJobResultSimple(const char* name, SQLite::Statement* statement, AssetDatabaseConnection::jobHandler handler); - bool GetJobResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::jobHandler handler, AZ::Uuid builderGuid = AZ::Uuid::CreateNull(), const char* jobKey = nullptr, AssetSystem::JobStatus status = AssetSystem::JobStatus::Any); - bool GetProductResultSimple(const char* name, SQLite::Statement* statement, AssetDatabaseConnection::productHandler handler); - bool GetProductResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::productHandler handler, AZ::Uuid builderGuid = AZ::Uuid::CreateNull(), const char* jobKey = nullptr, AssetSystem::JobStatus status = AssetSystem::JobStatus::Any); - bool GetLegacySubIDsResult(const char* callname, SQLite::Statement* statement, AssetDatabaseConnection::legacySubIDsHandler handler); - bool GetProductDependencyResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::productDependencyHandler handler); - bool GetProductDependencyAndPathResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::productDependencyAndPathHandler handler); - bool GetMissingProductDependencyResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::missingProductDependencyHandler handler); - bool GetCombinedDependencyResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::combinedProductDependencyHandler handler); - bool GetFileResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::fileHandler handler); - } } // namespace AssetDatabase }// namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Component/EditorComponentAPIComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Component/EditorComponentAPIComponent.cpp index 68ea0119d9..30a7c603bd 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Component/EditorComponentAPIComponent.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Component/EditorComponentAPIComponent.cpp @@ -262,7 +262,7 @@ namespace AzToolsFramework m_serializeContext->EnumerateDerived( [&typeNameList, entityType](const AZ::SerializeContext::ClassData* componentClass, const AZ::Uuid& knownType) -> bool { - AZ_UNUSED(knownType) + AZ_UNUSED(knownType); if (!componentClass->m_editData) { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.cpp index 0b0358d613..6ed133c830 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.cpp @@ -1324,7 +1324,7 @@ namespace AzToolsFramework AZ::SliceComponent::EntityAncestorList::const_iterator ancestorIter = ancestors.begin(); // Skip the first, that would be a regular slice root and not a subslice root, which was already checked. ++ancestorIter; - for (ancestorIter; ancestorIter != ancestors.end(); ++ancestorIter) + for (; ancestorIter != ancestors.end(); ++ancestorIter) { const AZ::SliceComponent::Ancestor& ancestor = *ancestorIter; if (!ancestor.m_entity || !SliceUtilities::IsRootEntity(*ancestor.m_entity)) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/SliceEditorEntityOwnershipService.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/SliceEditorEntityOwnershipService.cpp index 7ac3b7be8f..9e7e48cbaa 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/SliceEditorEntityOwnershipService.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/SliceEditorEntityOwnershipService.cpp @@ -98,7 +98,6 @@ namespace AzToolsFramework void SliceEditorEntityOwnershipService::OnSlicePreInstantiate(const AZ::Data::AssetId& sliceAssetId, const AZ::SliceComponent::SliceInstanceAddress& sliceAddress) { AZ_PROFILE_FUNCTION(AzToolsFramework); - const AzFramework::SliceInstantiationTicket ticket = *AzFramework::SliceInstantiationResultBus::GetCurrentBusId(); // Start an undo that will wrap the entire slice instantiation event (unable to do this at a higher level since this is queued up by AzFramework and there's no undo concept at that level) ToolsApplicationRequests::Bus::Broadcast(&ToolsApplicationRequests::Bus::Events::BeginUndoBatch, "Slice Instantiation"); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.cpp index f49df5d029..9bb452eb71 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.cpp @@ -895,7 +895,7 @@ namespace AzToolsFramework // calculate average position of selected vertices for translation manipulator MidpointCalculator midpointCalculator; m_translationManipulator->Process( - [this, &midpointCalculator, fixedVertices](typename IndexedTranslationManipulator::VertexLookup& vertex) + [&midpointCalculator, fixedVertices](typename IndexedTranslationManipulator::VertexLookup& vertex) { Vertex v; bool found = false; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceToTemplatePropagator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceToTemplatePropagator.cpp index 36b39f3a72..6b281bcbae 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceToTemplatePropagator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceToTemplatePropagator.cpp @@ -262,8 +262,6 @@ namespace AzToolsFramework void InstanceToTemplatePropagator::AddPatchesToLink(const PrefabDom& patches, Link& link) { PrefabDom& linkDom = link.GetLinkDom(); - PrefabDomValueReference linkPatchesReference = - PrefabDomUtils::FindPrefabDomValue(linkDom, PrefabDomUtils::PatchesName); /* If the original allocator the patches were created with gets destroyed, then the patches would become garbage in the diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp index cdb1e9a2ad..24cd0f0252 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp @@ -1298,9 +1298,6 @@ namespace AzToolsFramework command->RunRedo(); } - const auto instanceTemplateId = instancePtr->GetTemplateId(); - auto parentContainerEntityId = parentInstance.GetContainerEntityId(); - instancePtr->DetachNestedInstances( [&](AZStd::unique_ptr detachedNestedInstance) { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceUtilities.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceUtilities.cpp index 02fc2c2c40..6668b5bc3d 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceUtilities.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceUtilities.cpp @@ -461,7 +461,7 @@ namespace AzToolsFramework msgBox.setStandardButtons(QMessageBox::Cancel); msgBox.setDefaultButton(QMessageBox::Yes); msgBox.setDetailedText(message.c_str()); - const int response = msgBox.exec(); + msgBox.exec(); if (msgBox.clickedButton() == moveButton) { @@ -2043,7 +2043,7 @@ namespace AzToolsFramework QAction* confirmSelected = new QAction(detachMenu); confirmationMessageBox->addAction(confirmSelected); - QObject::connect(reassignToAction, &QAction::triggered, [reassignToAction, confirmationMessageBox, selectedEntity, ancestors, currentAncestorIndex]() mutable + QObject::connect(reassignToAction, &QAction::triggered, [confirmationMessageBox, ancestors, currentAncestorIndex]() mutable { if (confirmationMessageBox->exec() == QDialog::Accepted) { @@ -4200,8 +4200,6 @@ namespace AzToolsFramework if (canPush) { - AZ::Data::AssetId targetSliceAssetId = sliceAncestryToPushTo.at(0).m_sliceAddress.GetReference()->GetSliceAsset().GetId(); - //remember we're trying to push to this root, so we don't try to push to any others size_t ancestrySize = sliceAncestryToPushTo.size(); rootAncestorPushList.push_back(sliceAncestryToPushTo[ancestrySize-1].m_sliceAddress.GetReference()->GetSliceAsset().GetId()); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/LoadingThumbnail.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/LoadingThumbnail.cpp index 91f70f619a..6b8f331de7 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/LoadingThumbnail.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/LoadingThumbnail.cpp @@ -23,7 +23,6 @@ namespace AzToolsFramework LoadingThumbnail::LoadingThumbnail() : Thumbnail(MAKE_TKEY(ThumbnailKey)) - , m_angle(0) { auto absoluteIconPath = AZ::IO::FixedMaxPath(AZ::Utils::GetEnginePath()) / LoadingIconPath; m_loadingMovie.setFileName(absoluteIconPath.c_str()); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/LoadingThumbnail.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/LoadingThumbnail.h index 811e2e09b7..cbf7ec5489 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/LoadingThumbnail.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/LoadingThumbnail.h @@ -37,7 +37,6 @@ namespace AzToolsFramework void OnTick(float deltaTime, AZ::ScriptTimePoint /*time*/) override; private: - float m_angle; QMovie m_loadingMovie; }; } // namespace Thumbnailer diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Layer/LayerUiHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Layer/LayerUiHandler.cpp index d3dd556ae2..b0eee96abc 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Layer/LayerUiHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Layer/LayerUiHandler.cpp @@ -111,9 +111,6 @@ namespace AzToolsFramework painter, option.rect.left() - 1, option.rect.top(), option.rect.bottom(), m_layerBorderBottomColor, layerColor); } - QModelIndex nameColumn = index.sibling(index.row(), EntityOutlinerListModel::Column::ColumnName); - QModelIndex sibling = index.sibling(index.row() + 1, index.column()); - QPoint lineBottomLeft(option.rect.bottomLeft()); QPoint lineTopLeft(option.rect.topLeft()); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp index 380d6876da..b9180f8ef6 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp @@ -1106,8 +1106,6 @@ namespace AzToolsFramework QMimeData* EntityOutlinerListModel::mimeData(const QModelIndexList& indexes) const { AZ_PROFILE_FUNCTION(AzToolsFramework); - AZ::TypeId uuid1 = AZ::AzTypeInfo::Uuid(); - AZ::TypeId uuid2 = AZ::AzTypeInfo::Uuid(); EditorEntityIdContainer entityIdList; for (const QModelIndex& index : indexes) @@ -1334,13 +1332,11 @@ namespace AzToolsFramework QueueEntityUpdate(entityId); } - void EntityOutlinerListModel::OnEntityInfoUpdatedRemoveChildBegin(AZ::EntityId parentId, AZ::EntityId childId) + void EntityOutlinerListModel::OnEntityInfoUpdatedRemoveChildBegin([[maybe_unused]] AZ::EntityId parentId, [[maybe_unused]] AZ::EntityId childId) { //add/remove operations trigger selection change signals which assert and break undo/redo operations in progress in inspector etc. //so disallow selection updates until change is complete emit EnableSelectionUpdates(false); - auto parentIndex = GetIndexFromEntity(parentId); - auto childIndex = GetIndexFromEntity(childId); beginResetModel(); } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp index c17b96411e..d7fdb604fe 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp @@ -157,7 +157,7 @@ namespace AzToolsFramework QAction* createAction = menu->addAction(QObject::tr("Create Prefab...")); createAction->setToolTip(QObject::tr("Creates a prefab out of the currently selected entities.")); - QObject::connect(createAction, &QAction::triggered, createAction, [this, selectedEntities] { + QObject::connect(createAction, &QAction::triggered, createAction, [selectedEntities] { ContextMenu_CreatePrefab(selectedEntities); }); } @@ -171,7 +171,7 @@ namespace AzToolsFramework instantiateAction->setToolTip(QObject::tr("Instantiates a prefab file in the scene.")); QObject::connect( - instantiateAction, &QAction::triggered, instantiateAction, [this] { ContextMenu_InstantiatePrefab(); }); + instantiateAction, &QAction::triggered, instantiateAction, [] { ContextMenu_InstantiatePrefab(); }); } menu->addSeparator(); @@ -196,7 +196,7 @@ namespace AzToolsFramework QAction* editAction = menu->addAction(QObject::tr("Edit Prefab")); editAction->setToolTip(QObject::tr("Edit the prefab in focus mode.")); - QObject::connect(editAction, &QAction::triggered, editAction, [this, selectedEntity] { + QObject::connect(editAction, &QAction::triggered, editAction, [selectedEntity] { ContextMenu_EditPrefab(selectedEntity); }); @@ -213,7 +213,7 @@ namespace AzToolsFramework QAction* saveAction = menu->addAction(QObject::tr("Save Prefab to file")); saveAction->setToolTip(QObject::tr("Save the changes to the prefab to disk.")); - QObject::connect(saveAction, &QAction::triggered, saveAction, [this, selectedEntity] { + QObject::connect(saveAction, &QAction::triggered, saveAction, [selectedEntity] { ContextMenu_SavePrefab(selectedEntity); }); @@ -229,7 +229,7 @@ namespace AzToolsFramework } QAction* deleteAction = menu->addAction(QObject::tr("Delete")); - QObject::connect(deleteAction, &QAction::triggered, deleteAction, [this] { ContextMenu_DeleteSelected(); }); + QObject::connect(deleteAction, &QAction::triggered, deleteAction, [] { ContextMenu_DeleteSelected(); }); if (selectedEntities.size() == 0 || (selectedEntities.size() == 1 && s_prefabPublicInterface->IsLevelInstanceContainerEntity(selectedEntities[0]))) { @@ -247,7 +247,7 @@ namespace AzToolsFramework QAction* detachPrefabAction = menu->addAction(QObject::tr("Detach Prefab...")); QObject::connect( detachPrefabAction, &QAction::triggered, detachPrefabAction, - [this, selectedEntity] + [selectedEntity] { ContextMenu_DetachPrefab(selectedEntity); }); @@ -994,7 +994,7 @@ namespace AzToolsFramework msgBox.setStandardButtons(QMessageBox::Cancel); msgBox.setDefaultButton(QMessageBox::Yes); msgBox.setDetailedText(message.c_str()); - const int response = msgBox.exec(); + msgBox.exec(); if (msgBox.clickedButton() == moveButton) { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp index 223a573c55..001cd12349 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp @@ -2491,7 +2491,7 @@ namespace AzToolsFramework QAction* revertAction = revertMenu->addAction(QObject::tr("Entity")); revertAction->setToolTip(QObject::tr("This will revert all component properties on this entity to the last saved.")); - QObject::connect(revertAction, &QAction::triggered, [this, relevantEntities] + QObject::connect(revertAction, &QAction::triggered, [relevantEntities] { SliceEditorEntityOwnershipServiceRequestBus::Broadcast( &SliceEditorEntityOwnershipServiceRequests::ResetEntitiesToSliceDefaults, relevantEntities); @@ -4394,7 +4394,6 @@ namespace AzToolsFramework { ResetDrag(event); - Qt::MouseButtons realButtons = QApplication::mouseButtons(); if (QApplication::overrideCursor() && !(event->buttons() & Qt::LeftButton)) { QApplication::restoreOverrideCursor(); @@ -4606,7 +4605,6 @@ namespace AzToolsFramework bool EntityPropertyEditor::GetComponentsAtDropEventPosition(QDropEvent* event, AZ::Entity::ComponentArrayType& targetComponents) { const QPoint globalPos(mapToGlobal(event->pos())); - const QRect globalRect(GetInflatedRectFromPoint(globalPos, kComponentEditorDropTargetPrecision)); //get component editor(s) where drop will occur ComponentEditor* targetComponentEditor = GetReorderDropTarget( diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp index 4d95479e33..ee43eb7e2c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp @@ -548,7 +548,7 @@ namespace AzToolsFramework // Connect pressed to opening the error dialog // Must capture this for call to QObject::connect - connect(m_errorButton, &QPushButton::pressed, this, [this, errorLog]() { + connect(m_errorButton, &QPushButton::pressed, this, [errorLog]() { // Create the dialog for the log panel, and set the layout QDialog* logDialog = new QDialog(); logDialog->setMinimumSize(1024, 400); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ReflectedPropertyEditor.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ReflectedPropertyEditor.cpp index 87df1eff1b..c87f0e03ba 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ReflectedPropertyEditor.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ReflectedPropertyEditor.cpp @@ -2141,7 +2141,7 @@ namespace AzToolsFramework AZStd::shared_ptr keyToAdd(nullptr); bool createdElement = pContainerNode->CreateContainerElement(CreateContainerElementSelectClassCallback, - [this, pContainerNode, promptForValue, &keyToAdd](void* dataPtr, const AZ::SerializeContext::ClassElement* classElement, bool noDefaultData, AZ::SerializeContext*) -> bool + [pContainerNode, promptForValue, &keyToAdd](void* dataPtr, const AZ::SerializeContext::ClassElement* classElement, bool noDefaultData, AZ::SerializeContext*) -> bool { bool handled = false; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Slice/SlicePushWidget.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Slice/SlicePushWidget.cpp index 04754ac8a4..c276fc5c5a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Slice/SlicePushWidget.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Slice/SlicePushWidget.cpp @@ -2529,7 +2529,7 @@ namespace AzToolsFramework AZ_Warning("SlicePush", levelSlice, "SlicePushWidget::CalculateReferenceCount could not find root slice, displayed counts will be inaccurate!"); size_t instanceCount = 0; AZ::Data::AssetBus::EnumerateHandlersId(assetId, - [&instanceCount, assetId, levelSlice] (AZ::Data::AssetEvents* handler) -> bool + [&instanceCount, assetId] (AZ::Data::AssetEvents* handler) -> bool { AZ::SliceComponent* component = azrtti_cast(handler); if (component) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/UICore/QTreeViewStateSaver.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/UICore/QTreeViewStateSaver.hxx index 408791558a..f0f6711cda 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/UICore/QTreeViewStateSaver.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/UICore/QTreeViewStateSaver.hxx @@ -132,7 +132,6 @@ namespace AzToolsFramework QPointer m_dataModel; QPointer m_selectionModel; AZStd::intrusive_ptr m_data; - bool m_defaultToExpandIndexes = false; Q_DISABLE_COPY(QTreeViewStateSaver) }; diff --git a/Code/Legacy/CryCommon/CryLibrary.h b/Code/Legacy/CryCommon/CryLibrary.h index 6c13f0f9c6..31cc91cbe7 100644 --- a/Code/Legacy/CryCommon/CryLibrary.h +++ b/Code/Legacy/CryCommon/CryLibrary.h @@ -97,14 +97,14 @@ static const char* GetModulePath() return getenv(gEnvName); } -void SetModulePath(const char* pModulePath) +inline static void SetModulePath(const char* pModulePath) { setenv(gEnvName, pModulePath ? pModulePath : "", true); } // bInModulePath is only ever set to false in RC, because rc needs to load dlls from a $PATH that // it has modified to include .. -HMODULE CryLoadLibrary(const char* libName, bool bLazy = false, bool bInModulePath = true) +inline static HMODULE CryLoadLibrary(const char* libName, bool bLazy = false, bool bInModulePath = true) { const char* libPath = nullptr; char pathBuffer[MAX_PATH] = {0}; diff --git a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp index 0ac7b0bdce..72d74ea1c1 100644 --- a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp +++ b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp @@ -55,7 +55,7 @@ namespace LegacyLevelSystem AZ_CONSOLEFREEFUNC(UnloadLevel, AZ::ConsoleFunctorFlags::Null, "Unloads the current level"); //------------------------------------------------------------------------ - SpawnableLevelSystem::SpawnableLevelSystem(ISystem* pSystem) + SpawnableLevelSystem::SpawnableLevelSystem([[maybe_unused]] ISystem* pSystem) { CRY_ASSERT(pSystem); From ea2f74dc0f9d119b9a74197d5789735427a84c04 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 14:51:12 -0700 Subject: [PATCH 06/49] more fixes for Gems Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Code/Source/Framework/HttpRequestJob.cpp | 2 +- .../Code/Tests/MetricsManagerTest.cpp | 2 +- .../Code/Source/CameraComponent.cpp | 4 +- .../Source/Engine/AudioSystemImpl_wwise.cpp | 10 +- .../Code/EMotionFX/Source/Attachment.h | 2 +- .../Code/EMotionFX/Source/RagdollInstance.cpp | 2 - .../SimulatedObject/SimulatedJointWidget.cpp | 4 +- .../Code/Tests/AnimGraphCopyPasteTests.cpp | 2 - .../Code/Tests/AnimGraphEventTests.cpp | 6 +- .../Code/Tests/AnimGraphRefCountTests.cpp | 6 +- ...AnimGraphStateMachineInterruptionTests.cpp | 15 +- .../Tests/AnimGraphStateMachineSyncTests.cpp | 8 +- .../Code/Tests/BlendTreeBlendNNodeTests.cpp | 2 - .../Code/Tests/BlendTreeRagdollNodeTests.cpp | 1 - .../Tests/BlendTreeTwoLinkIKNodeTests.cpp | 2 - .../ActorComponentRagdollTests.cpp | 1 - .../Code/Tests/MotionExtractionBusTests.cpp | 2 - .../Code/Tests/Prefabs/LeftArmSkeleton.h | 2 +- .../Code/Tests/SimulatedObjectSetupTests.cpp | 1 - .../Code/Source/PythonMarshalComponent.cpp | 6 +- .../Code/Source/Ai/NavigationComponent.cpp | 2 +- .../Tests/BundlingSystemComponentTests.cpp | 2 - .../Code/Source/Animation/AzEntityNode.cpp | 11 +- Gems/LyShine/Code/Source/LyShine.cpp | 3 +- Gems/LyShine/Code/Source/LyShine.h | 2 - .../Code/Source/LyShineSystemComponent.cpp | 2 - Gems/LyShine/Code/Source/Sprite.cpp | 4 - .../internal/test_UiTransform2dComponent.cpp | 2 - Gems/LyShine/Code/Source/UiImageComponent.cpp | 2 - .../Code/Source/UiImageSequenceComponent.cpp | 2 - Gems/LyShine/Code/Source/UiRenderer.cpp | 2 - .../Code/Source/UiScrollBoxComponent.cpp | 1 - Gems/LyShine/Code/Source/UiTextComponent.cpp | 3 - .../Code/Source/UiTransform2dComponent.cpp | 2 +- .../Source/World/UiCanvasOnMeshComponent.cpp | 184 ------------------ Gems/Maestro/Code/Source/Cinematics/Movie.cpp | 3 - .../Code/Source/Cinematics/SceneNode.cpp | 1 - .../Cinematics/Tests/EntityNodeTest.cpp | 1 - .../LocalPredictionPlayerInputComponent.cpp | 2 - .../Debug/MultiplayerDebugSystemComponent.cpp | 2 - .../Source/MultiplayerSystemComponent.cpp | 4 +- .../EntityReplication/PropertySubscriber.h | 1 - .../ServerToClientReplicationWindow.cpp | 7 +- .../ServerToClientReplicationWindow.h | 1 - .../Code/Tests/System/FabricCookerTest.cpp | 3 - Gems/PhysX/Code/Source/Utils.cpp | 4 - .../PhysXCharactersRagdollBenchmarks.cpp | 1 - .../Code/Tests/CharacterControllerTests.cpp | 2 - .../Code/Tests/PhysXMultithreadingTest.cpp | 2 - .../PhysX/Code/Tests/PhysXSceneQueryTests.cpp | 16 +- Gems/PhysX/Code/Tests/PhysXSceneTests.cpp | 2 +- Gems/PhysX/Code/Tests/PhysXSpecificTest.cpp | 2 +- .../ScriptCanvas/Core/NodeFunctionGeneric.h | 2 +- .../Operators/Containers/OperatorErase.cpp | 2 +- .../Operators/Containers/OperatorFront.cpp | 2 +- .../Operators/Containers/OperatorInsert.cpp | 2 +- .../Operators/Containers/OperatorPushBack.cpp | 2 +- .../Libraries/Spawning/SpawnNodeable.cpp | 2 +- .../ScriptEvents/ScriptEventsAssetRef.h | 1 - .../Tests/Tests/ScriptEventsTest_Core.cpp | 20 -- .../SurfaceData/Tests/SurfaceDataTestMocks.h | 2 +- Gems/Twitch/Code/Source/TwitchREST.cpp | 10 +- .../Source/Components/BlockerComponent.cpp | 2 +- .../Components/MeshBlockerComponent.cpp | 2 +- .../Code/Source/PrefabInstanceSpawner.cpp | 2 +- Gems/Vegetation/Code/Tests/VegetationTest.h | 1 - 66 files changed, 62 insertions(+), 348 deletions(-) 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; }; From fb75e3570094fde403ddc557c238523acbccf1f2 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:52:36 -0700 Subject: [PATCH 07/49] enabling MSVC warning to match clang warnings Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- cmake/Platform/Common/MSVC/Configurations_msvc.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/Platform/Common/MSVC/Configurations_msvc.cmake b/cmake/Platform/Common/MSVC/Configurations_msvc.cmake index 9353e4eb1c..7a66f397c5 100644 --- a/cmake/Platform/Common/MSVC/Configurations_msvc.cmake +++ b/cmake/Platform/Common/MSVC/Configurations_msvc.cmake @@ -40,6 +40,8 @@ ly_append_configurations_options( # Enabling warnings that are disabled by default from /W4 # https://docs.microsoft.com/en-us/cpp/preprocessor/compiler-warnings-that-are-off-by-default?view=vs-2019 /we4296 # 'operator': expression is always false + /we5233 # explicit lambda capture 'identifier' is not used + # /we4426 # optimization flags changed after including header, may be due to #pragma optimize() # /we4464 # relative include path contains '..' # /we4619 # #pragma warning: there is no warning number 'number' From eaefc580d68020bbad949125ea75d26ba90cd804 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:53:14 -0700 Subject: [PATCH 08/49] Code/Editor Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../AzAssetBrowserRequestHandler.cpp | 2 +- Code/Editor/Controls/ColorGradientCtrl.h | 1 - Code/Editor/Controls/ConsoleSCB.cpp | 1 - Code/Editor/Controls/ConsoleSCB.h | 1 - Code/Editor/Controls/SplineCtrl.cpp | 2 - Code/Editor/Controls/SplineCtrlEx.cpp | 2 - Code/Editor/Controls/TimelineCtrl.h | 1 - Code/Editor/Controls/WndGridHelper.h | 2 - Code/Editor/Core/LevelEditorMenuHandler.cpp | 6 +- Code/Editor/Core/LevelEditorMenuHandler.h | 2 - Code/Editor/CryEditDoc.cpp | 8 --- Code/Editor/CryEditPy.cpp | 5 -- ...bjectSelectionReferenceFrameCalculator.cpp | 3 +- ...bObjectSelectionReferenceFrameCalculator.h | 1 - Code/Editor/GameExporter.h | 1 - Code/Editor/LayoutWnd.cpp | 1 - Code/Editor/LevelFileDialog.h | 1 - Code/Editor/LogFile.cpp | 4 +- Code/Editor/Objects/ObjectManager.cpp | 16 +---- Code/Editor/Objects/SelectionGroup.cpp | 2 - Code/Editor/Objects/TrackGizmo.cpp | 1 - .../SandboxIntegration.cpp | 5 +- .../SandboxIntegration.h | 3 - .../UI/Outliner/OutlinerListModel.cpp | 6 +- Code/Editor/PythonEditorFuncs.cpp | 58 ------------------- Code/Editor/QtViewPaneManager.cpp | 3 +- Code/Editor/QtViewPaneManager.h | 1 - .../Editor/RenderHelpers/AxisHelperShared.inl | 2 - Code/Editor/StartupTraceHandler.cpp | 2 +- Code/Editor/ToolbarManager.cpp | 1 - .../Editor/TrackView/DirectorNodeAnimator.cpp | 4 +- Code/Editor/TrackView/DirectorNodeAnimator.h | 2 - Code/Editor/TrackView/TrackViewAnimNode.cpp | 1 - .../TrackView/TrackViewDopeSheetBase.cpp | 7 --- Code/Editor/TrackView/TrackViewNode.h | 7 +-- Code/Editor/TrackView/TrackViewNodes.h | 1 - Code/Editor/TrackView/TrackViewSequence.cpp | 4 +- Code/Editor/TrackView/TrackViewSplineCtrl.cpp | 1 - Code/Editor/Util/ColumnGroupTreeView.h | 1 - Code/Editor/Util/Image.h | 1 - Code/Editor/Util/ImageASC.cpp | 2 +- Code/Editor/Util/ImageGif.cpp | 2 - Code/Editor/Util/ImageUtil.cpp | 2 +- Code/Editor/ViewPane.h | 1 - 44 files changed, 17 insertions(+), 163 deletions(-) diff --git a/Code/Editor/AzAssetBrowser/AzAssetBrowserRequestHandler.cpp b/Code/Editor/AzAssetBrowser/AzAssetBrowserRequestHandler.cpp index b164323238..1c2be16a3d 100644 --- a/Code/Editor/AzAssetBrowser/AzAssetBrowserRequestHandler.cpp +++ b/Code/Editor/AzAssetBrowser/AzAssetBrowserRequestHandler.cpp @@ -327,7 +327,7 @@ void AzAssetBrowserRequestHandler::AddContextMenuActions(QWidget* caller, QMenu* if (!vetoOpenerFound) { // if we found no valid openers and no veto openers then just allow it to be opened with the operating system itself. - menu->addAction(QObject::tr("Open with associated application..."), [this, fullFilePath]() + menu->addAction(QObject::tr("Open with associated application..."), [fullFilePath]() { OpenWithOS(fullFilePath); }); diff --git a/Code/Editor/Controls/ColorGradientCtrl.h b/Code/Editor/Controls/ColorGradientCtrl.h index 80d8b966f4..a3f95fcd8c 100644 --- a/Code/Editor/Controls/ColorGradientCtrl.h +++ b/Code/Editor/Controls/ColorGradientCtrl.h @@ -130,7 +130,6 @@ private: private: ISplineInterpolator* m_pSpline; - bool m_bAutoDelete; bool m_bNoZoom; QRect m_rcClipRect; diff --git a/Code/Editor/Controls/ConsoleSCB.cpp b/Code/Editor/Controls/ConsoleSCB.cpp index dbe7ba3472..aed148976f 100644 --- a/Code/Editor/Controls/ConsoleSCB.cpp +++ b/Code/Editor/Controls/ConsoleSCB.cpp @@ -298,7 +298,6 @@ Lines CConsoleSCB::s_pendingLines; CConsoleSCB::CConsoleSCB(QWidget* parent) : QWidget(parent) , ui(new Ui::Console()) - , m_richEditTextLength(0) , m_backgroundTheme(gSettings.consoleBackgroundColorTheme) { m_lines = s_pendingLines; diff --git a/Code/Editor/Controls/ConsoleSCB.h b/Code/Editor/Controls/ConsoleSCB.h index f51786e2a5..051f3ea4e7 100644 --- a/Code/Editor/Controls/ConsoleSCB.h +++ b/Code/Editor/Controls/ConsoleSCB.h @@ -191,7 +191,6 @@ private: void OnEditorNotifyEvent(EEditorNotifyEvent event) override; QScopedPointer ui; - int m_richEditTextLength; Lines m_lines; static Lines s_pendingLines; diff --git a/Code/Editor/Controls/SplineCtrl.cpp b/Code/Editor/Controls/SplineCtrl.cpp index 80d30b37ad..8ccf103c25 100644 --- a/Code/Editor/Controls/SplineCtrl.cpp +++ b/Code/Editor/Controls/SplineCtrl.cpp @@ -123,8 +123,6 @@ void CSplineCtrl::paintEvent(QPaintEvent* event) { QPainter painter(this); - QRect rcClient = rect(); - if (m_pSpline) { m_bSelectedKeys.resize(m_pSpline->GetKeyCount()); diff --git a/Code/Editor/Controls/SplineCtrlEx.cpp b/Code/Editor/Controls/SplineCtrlEx.cpp index f299ce185d..9e0a954c79 100644 --- a/Code/Editor/Controls/SplineCtrlEx.cpp +++ b/Code/Editor/Controls/SplineCtrlEx.cpp @@ -819,8 +819,6 @@ void SplineWidget::DrawSpline(QPainter* painter, SSplineInfo& splineInfo, float { const QPen pOldPen = painter->pen(); - const QRect rcClip = painter->clipBoundingRect().intersected(m_rcSpline).toRect(); - ////////////////////////////////////////////////////////////////////////// ISplineInterpolator* pSpline = splineInfo.pSpline; ISplineInterpolator* pDetailSpline = splineInfo.pDetailSpline; diff --git a/Code/Editor/Controls/TimelineCtrl.h b/Code/Editor/Controls/TimelineCtrl.h index 015704460a..f87bdf3410 100644 --- a/Code/Editor/Controls/TimelineCtrl.h +++ b/Code/Editor/Controls/TimelineCtrl.h @@ -136,7 +136,6 @@ protected: void DrawFrameTicks(QPainter* dc); private: - bool m_bAutoDelete; QRect m_rcClient; QRect m_rcTimeline; float m_fTimeMarker; diff --git a/Code/Editor/Controls/WndGridHelper.h b/Code/Editor/Controls/WndGridHelper.h index 158ffca508..d5d90b3a92 100644 --- a/Code/Editor/Controls/WndGridHelper.h +++ b/Code/Editor/Controls/WndGridHelper.h @@ -81,8 +81,6 @@ public: newzoom.y = 0.01f; } - Vec2 prevz = zoom; - // Zoom to mouse position. float ofsx = origin.x; float ofsy = origin.y; diff --git a/Code/Editor/Core/LevelEditorMenuHandler.cpp b/Code/Editor/Core/LevelEditorMenuHandler.cpp index 3724993604..8c757a361e 100644 --- a/Code/Editor/Core/LevelEditorMenuHandler.cpp +++ b/Code/Editor/Core/LevelEditorMenuHandler.cpp @@ -41,8 +41,6 @@ using namespace AZ; using namespace AzToolsFramework; static const char* const s_LUAEditorName = "Lua Editor"; -static const char* const s_shortTimeInterval = "debug"; -static const char* const s_assetImporterMetricsIdentifier = "AssetImporter"; // top level menu ids static const char* const s_fileMenuId = "FileMenu"; @@ -50,7 +48,6 @@ static const char* const s_editMenuId = "EditMenu"; static const char* const s_gameMenuId = "GameMenu"; static const char* const s_toolMenuId = "ToolMenu"; static const char* const s_viewMenuId = "ViewMenu"; -static const char* const s_awsMenuId = "AwsMenu"; static const char* const s_helpMenuId = "HelpMenu"; static bool CompareLayoutNames(const QString& name1, const QString& name2) @@ -158,12 +155,11 @@ namespace } LevelEditorMenuHandler::LevelEditorMenuHandler( - MainWindow* mainWindow, QtViewPaneManager* const viewPaneManager, QSettings& settings) + MainWindow* mainWindow, QtViewPaneManager* const viewPaneManager, [[maybe_unused]] QSettings& settings) : QObject(mainWindow) , m_mainWindow(mainWindow) , m_viewPaneManager(viewPaneManager) , m_actionManager(mainWindow->GetActionManager()) - , m_settings(settings) { #if defined(AZ_PLATFORM_MAC) // Hide the non-native toolbar, then setNativeMenuBar to ensure it is always visible on macOS. diff --git a/Code/Editor/Core/LevelEditorMenuHandler.h b/Code/Editor/Core/LevelEditorMenuHandler.h index 4cf1569c59..95f2f70703 100644 --- a/Code/Editor/Core/LevelEditorMenuHandler.h +++ b/Code/Editor/Core/LevelEditorMenuHandler.h @@ -106,7 +106,6 @@ private: ActionManager::MenuWrapper m_toolsMenu; QMenu* m_mostRecentLevelsMenu = nullptr; - QMenu* m_mostRecentProjectsMenu = nullptr; QMenu* m_editmenu = nullptr; ActionManager::MenuWrapper m_viewPanesMenu; @@ -117,7 +116,6 @@ private: int m_viewPaneVersion = 0; QList m_topLevelMenus; - QSettings& m_settings; }; #endif // LEVELEDITORMENUHANDLER_H diff --git a/Code/Editor/CryEditDoc.cpp b/Code/Editor/CryEditDoc.cpp index cb920da2de..c6de10c0cb 100644 --- a/Code/Editor/CryEditDoc.cpp +++ b/Code/Editor/CryEditDoc.cpp @@ -1018,14 +1018,6 @@ bool CCryEditDoc::AfterSaveDocument([[maybe_unused]] const QString& lpszPathName return bSaved; } - -static void GetUserSettingsFile(const QString& levelFolder, QString& userSettings) -{ - const char* pUserName = GetISystem()->GetUserName(); - QString fileName = QStringLiteral("%1_usersettings.editor_xml").arg(pUserName); - userSettings = Path::Make(levelFolder, fileName); -} - static bool TryRenameFile(const QString& oldPath, const QString& newPath, int retryAttempts=10) { QFile(newPath).setPermissions(QFile::ReadOther | QFile::WriteOther); diff --git a/Code/Editor/CryEditPy.cpp b/Code/Editor/CryEditPy.cpp index 2477cd2f35..10fd56c134 100644 --- a/Code/Editor/CryEditPy.cpp +++ b/Code/Editor/CryEditPy.cpp @@ -97,11 +97,6 @@ namespace } } - const char* PyGetGameFolder() - { - return Path::GetEditingGameDataFolder().c_str(); - } - AZStd::string PyGetGameFolderAsString() { return Path::GetEditingGameDataFolder(); diff --git a/Code/Editor/EditMode/SubObjectSelectionReferenceFrameCalculator.cpp b/Code/Editor/EditMode/SubObjectSelectionReferenceFrameCalculator.cpp index 80368d3ec1..99f4ab1ca6 100644 --- a/Code/Editor/EditMode/SubObjectSelectionReferenceFrameCalculator.cpp +++ b/Code/Editor/EditMode/SubObjectSelectionReferenceFrameCalculator.cpp @@ -13,12 +13,11 @@ #include "SubObjectSelectionReferenceFrameCalculator.h" -SubObjectSelectionReferenceFrameCalculator::SubObjectSelectionReferenceFrameCalculator(ESubObjElementType selectionType) +SubObjectSelectionReferenceFrameCalculator::SubObjectSelectionReferenceFrameCalculator([[maybe_unused]] ESubObjElementType selectionType) : m_anySelected(false) , pos(0.0f, 0.0f, 0.0f) , normal(0.0f, 0.0f, 0.0f) , nNormals(0) - , selectionType(selectionType) , bUseExplicitFrame(false) , bExplicitAnySelected(false) { diff --git a/Code/Editor/EditMode/SubObjectSelectionReferenceFrameCalculator.h b/Code/Editor/EditMode/SubObjectSelectionReferenceFrameCalculator.h index 7c0d6f40c6..dd33342feb 100644 --- a/Code/Editor/EditMode/SubObjectSelectionReferenceFrameCalculator.h +++ b/Code/Editor/EditMode/SubObjectSelectionReferenceFrameCalculator.h @@ -32,7 +32,6 @@ private: Vec3 pos; Vec3 normal; int nNormals; - ESubObjElementType selectionType; std::vector positions; Matrix34 m_refFrame; bool bUseExplicitFrame; diff --git a/Code/Editor/GameExporter.h b/Code/Editor/GameExporter.h index 3e3c57fb4c..19ec601ff7 100644 --- a/Code/Editor/GameExporter.h +++ b/Code/Editor/GameExporter.h @@ -102,7 +102,6 @@ private: AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING bool m_bAutoExportMode; - int m_numExportedMaterials; static CGameExporter* m_pCurrentExporter; }; diff --git a/Code/Editor/LayoutWnd.cpp b/Code/Editor/LayoutWnd.cpp index 7f73c313d9..aa2a008844 100644 --- a/Code/Editor/LayoutWnd.cpp +++ b/Code/Editor/LayoutWnd.cpp @@ -183,7 +183,6 @@ void CLayoutWnd::MaximizeViewport(int paneId) QString viewClass = m_viewType[paneId]; - const QRect rc = rect(); if (!m_bMaximized) { CLayoutViewPane* pViewPane = GetViewPane(paneId); diff --git a/Code/Editor/LevelFileDialog.h b/Code/Editor/LevelFileDialog.h index 93d8e4eb9b..6347eb946a 100644 --- a/Code/Editor/LevelFileDialog.h +++ b/Code/Editor/LevelFileDialog.h @@ -64,7 +64,6 @@ private: QString m_fileName; QString m_filter; const bool m_bOpenDialog; - bool m_initialized = false; LevelTreeModel* const m_model; LevelTreeModelFilter* const m_filterModel; }; diff --git a/Code/Editor/LogFile.cpp b/Code/Editor/LogFile.cpp index 5978356781..2ebb353915 100644 --- a/Code/Editor/LogFile.cpp +++ b/Code/Editor/LogFile.cpp @@ -180,18 +180,17 @@ void CLogFile::FormatLineV(const char * format, va_list argList) void CLogFile::AboutSystem() { char szBuffer[MAX_LOGBUFFER_SIZE]; - wchar_t szBufferW[MAX_LOGBUFFER_SIZE]; #if defined(AZ_PLATFORM_WINDOWS) || defined(AZ_PLATFORM_LINUX) ////////////////////////////////////////////////////////////////////// // Write the system informations to the log ////////////////////////////////////////////////////////////////////// - wchar_t szLanguageBufferW[64]; //wchar_t szCPUModel[64]; MEMORYSTATUS MemoryStatus; #endif // defined(AZ_PLATFORM_WINDOWS) || defined(AZ_PLATFORM_LINUX) #if defined(AZ_PLATFORM_WINDOWS) + wchar_t szLanguageBufferW[64]; DEVMODE DisplayConfig; OSVERSIONINFO OSVerInfo; OSVerInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); @@ -296,6 +295,7 @@ AZ_POP_DISABLE_WARNING ////////////////////////////////////////////////////////////////////// str += " ("; + wchar_t szBufferW[MAX_LOGBUFFER_SIZE]; GetWindowsDirectoryW(szBufferW, sizeof(szBufferW)); AZStd::to_string(szBuffer, MAX_LOGBUFFER_SIZE, szBufferW); str += szBuffer; diff --git a/Code/Editor/Objects/ObjectManager.cpp b/Code/Editor/Objects/ObjectManager.cpp index 940ef5b551..22d1d8bb17 100644 --- a/Code/Editor/Objects/ObjectManager.cpp +++ b/Code/Editor/Objects/ObjectManager.cpp @@ -1556,11 +1556,8 @@ void CObjectManager::DeleteSelection() // Make sure to unlock selection. GetIEditor()->LockSelection(false); - GUID bID = GUID_NULL; - - int i; CSelectionGroup objects; - for (i = 0; i < m_currSelection->GetCount(); i++) + for (int i = 0; i < m_currSelection->GetCount(); i++) { // Check condition(s) if object could be deleted if (!IsObjectDeletionAllowed(m_currSelection->GetObject(i))) @@ -2900,17 +2897,6 @@ namespace return AZ::Vector3(position.x, position.y, position.z); } - AZ::Vector3 PyGetWorldObjectPosition(const char* pName) - { - CBaseObject* pObject = GetIEditor()->GetObjectManager()->FindObject(pName); - if (!pObject) - { - throw std::logic_error((QString("\"") + pName + "\" is an invalid object.").toUtf8().data()); - } - Vec3 position = pObject->GetWorldPos(); - return AZ::Vector3(position.x, position.y, position.z); - } - void PySetObjectPosition(const char* pName, float fValueX, float fValueY, float fValueZ) { CBaseObject* pObject = GetIEditor()->GetObjectManager()->FindObject(pName); diff --git a/Code/Editor/Objects/SelectionGroup.cpp b/Code/Editor/Objects/SelectionGroup.cpp index f2b7b9ddaf..06d881d607 100644 --- a/Code/Editor/Objects/SelectionGroup.cpp +++ b/Code/Editor/Objects/SelectionGroup.cpp @@ -316,8 +316,6 @@ void CSelectionGroup::Rotate(const Ang3& angles, int referenceCoordSys) // return; // Rotate selection about selection center. - Vec3 center = GetCenter(); - Matrix34 rotateTM = Matrix34::CreateRotationXYZ(DEG2RAD(angles)); Rotate(rotateTM, referenceCoordSys); } diff --git a/Code/Editor/Objects/TrackGizmo.cpp b/Code/Editor/Objects/TrackGizmo.cpp index 8cbd7df2e5..59163c1e3d 100644 --- a/Code/Editor/Objects/TrackGizmo.cpp +++ b/Code/Editor/Objects/TrackGizmo.cpp @@ -176,7 +176,6 @@ void CTrackGizmo::DrawAxis(DisplayContext& dc, const Vec3& org) z = z * fScreenScale; float col[4] = { 1, 1, 1, 1 }; - float hcol[4] = { 1, 0, 0, 1 }; dc.renderer->DrawLabelEx(org + x, 1.2f, col, true, true, "X"); dc.renderer->DrawLabelEx(org + y, 1.2f, col, true, true, "Y"); dc.renderer->DrawLabelEx(org + z, 1.2f, col, true, true, "Z"); diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp b/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp index 429fbd923c..47bd214b8d 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp @@ -528,7 +528,6 @@ void SandboxIntegrationManager::EntityParentChanged( oldAncestor = nextParentId; } while (oldAncestor.IsValid()); - AZ::EntityId newAncestors = newParentId; AZ::EntityId newAncestor = newParentId; bool isGoingToRootScene = false; @@ -721,7 +720,7 @@ void SandboxIntegrationManager::PopulateEditorGlobalContextMenu(QMenu* menu, con if (selected.size() > 0) { action = menu->addAction(QObject::tr("Find in Entity Outliner")); - QObject::connect(action, &QAction::triggered, [this, selected] + QObject::connect(action, &QAction::triggered, [selected] { AzToolsFramework::EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::OnFocusInEntityOutliner, selected); }); @@ -842,7 +841,7 @@ void SandboxIntegrationManager::SetupLayerContextMenu(QMenu* menu) QAction* findLayerAssetAction = menu->addAction(QObject::tr("Find layer in Asset Browser")); findLayerAssetAction->setToolTip(QObject::tr("Selects this layer in the Asset Browser")); - QObject::connect(findLayerAssetAction, &QAction::triggered, [this, fullFilePath] { + QObject::connect(findLayerAssetAction, &QAction::triggered, [fullFilePath] { QtViewPaneManager::instance()->OpenPane(LyViewPane::AssetBrowser); AzToolsFramework::AssetBrowser::AssetBrowserViewRequestBus::Broadcast( diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h b/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h index d14ba80bce..f2764681b2 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h @@ -280,7 +280,6 @@ private: private: AZ::Vector2 m_contextMenuViewPoint; - AZ::Vector3 m_sliceWorldPos; int m_inObjectPickMode; short m_startedUndoRecordingNestingLevel; // used in OnBegin/EndUndo to ensure we only accept undo's we started recording @@ -298,8 +297,6 @@ private: const AZStd::string m_defaultComponentViewportIconLocation = "Icons/Components/Viewport/Component_Placeholder.svg"; const AZStd::string m_defaultEntityIconLocation = "Icons/Components/Viewport/Transform.svg"; - bool m_debugDisplayBusImplementationActive = false; - AzToolsFramework::Prefab::PrefabIntegrationManager* m_prefabIntegrationManager = nullptr; AzToolsFramework::EditorEntityUiInterface* m_editorEntityUiInterface = nullptr; diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.cpp b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.cpp index 9ec81cdb3b..c25248d4f6 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.cpp +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.cpp @@ -1234,8 +1234,6 @@ bool OutlinerListModel::ReparentEntities(const AZ::EntityId& newParentId, const QMimeData* OutlinerListModel::mimeData(const QModelIndexList& indexes) const { AZ_PROFILE_FUNCTION(AzToolsFramework); - AZ::TypeId uuid1 = AZ::AzTypeInfo::Uuid(); - AZ::TypeId uuid2 = AZ::AzTypeInfo::Uuid(); AzToolsFramework::EditorEntityIdContainer entityIdList; for (const QModelIndex& index : indexes) @@ -1462,13 +1460,11 @@ void OutlinerListModel::OnEntityRuntimeActivationChanged(AZ::EntityId entityId, QueueEntityUpdate(entityId); } -void OutlinerListModel::OnEntityInfoUpdatedRemoveChildBegin(AZ::EntityId parentId, AZ::EntityId childId) +void OutlinerListModel::OnEntityInfoUpdatedRemoveChildBegin([[maybe_unused]] AZ::EntityId parentId, [[maybe_unused]] AZ::EntityId childId) { //add/remove operations trigger selection change signals which assert and break undo/redo operations in progress in inspector etc. //so disallow selection updates until change is complete emit EnableSelectionUpdates(false); - auto parentIndex = GetIndexFromEntity(parentId); - auto childIndex = GetIndexFromEntity(childId); beginResetModel(); } diff --git a/Code/Editor/PythonEditorFuncs.cpp b/Code/Editor/PythonEditorFuncs.cpp index dff41c0a86..342cc607d7 100644 --- a/Code/Editor/PythonEditorFuncs.cpp +++ b/Code/Editor/PythonEditorFuncs.cpp @@ -33,18 +33,6 @@ namespace { - ////////////////////////////////////////////////////////////////////////// - const char* PyGetCVar(const char* pName) - { - ICVar* pCVar = GetIEditor()->GetSystem()->GetIConsole()->GetCVar(pName); - if (!pCVar) - { - Warning("PyGetCVar: Attempt to access non-existent CVar '%s'", pName ? pName : "(null)"); - throw std::logic_error((QString("\"") + pName + "\" is an invalid cvar.").toUtf8().data()); - } - return pCVar->GetString(); - } - ////////////////////////////////////////////////////////////////////////// const char* PyGetCVarAsString(const char* pName) { @@ -212,52 +200,6 @@ namespace return GetIEditor()->IsInSimulationMode(); } - ////////////////////////////////////////////////////////////////////////// - QString PyNewObject(const char* typeName, const char* fileName, const char* name, float x, float y, float z) - { - CBaseObject* object = GetIEditor()->NewObject(typeName, fileName, name, x, y, z); - if (object) - { - return object->GetName(); - } - else - { - return ""; - } - } - - ////////////////////////////////////////////////////////////////////////// - QString PyNewObjectAtCursor(const char* typeName, const char* fileName, const char* name) - { - CUndo undo("Create new object"); - - Vec3 pos(0, 0, 0); - - QPoint p = QCursor::pos(); - CViewport* viewport = GetIEditor()->GetViewManager()->GetViewportAtPoint(p); - if (viewport) - { - viewport->ScreenToClient(p); - if (GetIEditor()->GetAxisConstrains() != AXIS_TERRAIN) - { - pos = viewport->MapViewToCP(p); - } - else - { - // Snap to terrain. - bool hitTerrain; - pos = viewport->ViewToWorld(p, &hitTerrain); - if (hitTerrain) - { - pos.z = GetIEditor()->GetTerrainElevation(pos.x, pos.y) + 1.0f; - } - pos = viewport->SnapToGrid(pos); - } - } - - return PyNewObject(typeName, fileName, name, pos.x, pos.y, pos.z); - } - ////////////////////////////////////////////////////////////////////////// void PyRunConsole(const char* text) { diff --git a/Code/Editor/QtViewPaneManager.cpp b/Code/Editor/QtViewPaneManager.cpp index 022bb6ecd9..eff3a7331e 100644 --- a/Code/Editor/QtViewPaneManager.cpp +++ b/Code/Editor/QtViewPaneManager.cpp @@ -240,14 +240,13 @@ static bool SkipTitleBarOverdraw(QtViewPane* pane) return !pane->m_options.isDockable; } -DockWidget::DockWidget(QWidget* widget, QtViewPane* pane, QSettings* settings, QMainWindow* parent, AzQtComponents::FancyDocking* advancedDockManager) +DockWidget::DockWidget(QWidget* widget, QtViewPane* pane, [[maybe_unused]] QSettings* settings, QMainWindow* parent, AzQtComponents::FancyDocking* advancedDockManager) : AzQtComponents::StyledDockWidget(pane->m_name, SkipTitleBarOverdraw(pane), #if AZ_TRAIT_OS_PLATFORM_APPLE pane->m_options.detachedWindow ? nullptr : parent) #else parent) #endif - , m_settings(settings) , m_mainWindow(parent) , m_pane(pane) , m_advancedDockManager(advancedDockManager) diff --git a/Code/Editor/QtViewPaneManager.h b/Code/Editor/QtViewPaneManager.h index 49440068a0..3ad1cc9cf7 100644 --- a/Code/Editor/QtViewPaneManager.h +++ b/Code/Editor/QtViewPaneManager.h @@ -67,7 +67,6 @@ private: void reparentToMainWindowFix(); QRect ProperGeometry() const; QString settingsKey() const; - QSettings* const m_settings; QMainWindow* const m_mainWindow; QtViewPane* const m_pane; AzQtComponents::FancyDocking* m_advancedDockManager; diff --git a/Code/Editor/RenderHelpers/AxisHelperShared.inl b/Code/Editor/RenderHelpers/AxisHelperShared.inl index 2ceac98eae..24cd2ef9f5 100644 --- a/Code/Editor/RenderHelpers/AxisHelperShared.inl +++ b/Code/Editor/RenderHelpers/AxisHelperShared.inl @@ -191,7 +191,6 @@ void CAxisHelper::DrawAxis(const Matrix34& worldTM, const SGizmoParameters& setu { if (axis) { - float col[4] = { 1, 0, 0, 1 }; if (axis == AXIS_X || axis == AXIS_XY || axis == AXIS_XZ || axis == AXIS_XYZ) { colX = colSelected; @@ -436,7 +435,6 @@ void CAxisHelper::DrawAxis(const Matrix34& worldTM, const SGizmoParameters& setu { dc.SetColor(QColor(128, 32, 32), 0.4f); } - Vec3 org = worldTM.GetTranslation(); dc.DrawBall(Vec3(0.0f), m_size * kSelectionBallScale); } diff --git a/Code/Editor/StartupTraceHandler.cpp b/Code/Editor/StartupTraceHandler.cpp index ae525eb4e3..498bf10e31 100644 --- a/Code/Editor/StartupTraceHandler.cpp +++ b/Code/Editor/StartupTraceHandler.cpp @@ -168,7 +168,7 @@ namespace SandboxEditor void StartupTraceHandler::ShowMessageBox(const QString& message) { - AZ::SystemTickBus::QueueFunction([this, message]() + AZ::SystemTickBus::QueueFunction([message]() { // Parent to the main window, so that the error dialog doesn't // show up as a separate window when alt-tabbing. diff --git a/Code/Editor/ToolbarManager.cpp b/Code/Editor/ToolbarManager.cpp index 1831fe6a55..00b7992ef0 100644 --- a/Code/Editor/ToolbarManager.cpp +++ b/Code/Editor/ToolbarManager.cpp @@ -1217,7 +1217,6 @@ void EditableQToolBar::dropEvent(QDropEvent* ev) return; } - const int actionId = action->data().toInt(); QWidget* beforeWidget = insertPositionForDrop(ev->pos()); QAction* beforeAction = beforeWidget ? ActionForWidget(beforeWidget) : nullptr; diff --git a/Code/Editor/TrackView/DirectorNodeAnimator.cpp b/Code/Editor/TrackView/DirectorNodeAnimator.cpp index 3e2a1d5626..d9736075ce 100644 --- a/Code/Editor/TrackView/DirectorNodeAnimator.cpp +++ b/Code/Editor/TrackView/DirectorNodeAnimator.cpp @@ -19,8 +19,7 @@ //////////////////////////////////////////////////////////////////////////// -CDirectorNodeAnimator::CDirectorNodeAnimator(CTrackViewAnimNode* pDirectorNode) - : m_pDirectorNode(pDirectorNode) +CDirectorNodeAnimator::CDirectorNodeAnimator([[maybe_unused]] CTrackViewAnimNode* pDirectorNode) { assert(m_pDirectorNode != nullptr); } @@ -139,7 +138,6 @@ void CDirectorNodeAnimator::ForEachActiveSequence(const SAnimContext& ac, CTrack const bool bHandleOtherKeys, std::function animateFunction, std::function resetFunction) { - const float time = ac.time; const unsigned int numKeys = pSequenceTrack->GetKeyCount(); if (bHandleOtherKeys) diff --git a/Code/Editor/TrackView/DirectorNodeAnimator.h b/Code/Editor/TrackView/DirectorNodeAnimator.h index d2bde01c54..87d72bf5c8 100644 --- a/Code/Editor/TrackView/DirectorNodeAnimator.h +++ b/Code/Editor/TrackView/DirectorNodeAnimator.h @@ -34,7 +34,5 @@ private: void ForEachActiveSequence(const SAnimContext& ac, CTrackViewTrack* pSequenceTrack, const bool bHandleOtherKeys, std::function animateFunction, std::function resetFunction); - - CTrackViewAnimNode* m_pDirectorNode; }; #endif // CRYINCLUDE_EDITOR_TRACKVIEW_DIRECTORNODEANIMATOR_H diff --git a/Code/Editor/TrackView/TrackViewAnimNode.cpp b/Code/Editor/TrackView/TrackViewAnimNode.cpp index 4b599859e9..4b1ea688ee 100644 --- a/Code/Editor/TrackView/TrackViewAnimNode.cpp +++ b/Code/Editor/TrackView/TrackViewAnimNode.cpp @@ -1820,7 +1820,6 @@ bool CTrackViewAnimNode::IsDisabled() const ////////////////////////////////////////////////////////////////////////// void CTrackViewAnimNode::SetPos(const Vec3& position) { - const float time = GetSequence()->GetTime(); CTrackViewTrack* track = GetTrackForParameter(AnimParamType::Position); if (track) diff --git a/Code/Editor/TrackView/TrackViewDopeSheetBase.cpp b/Code/Editor/TrackView/TrackViewDopeSheetBase.cpp index d0034b2da4..12af760e95 100644 --- a/Code/Editor/TrackView/TrackViewDopeSheetBase.cpp +++ b/Code/Editor/TrackView/TrackViewDopeSheetBase.cpp @@ -199,7 +199,6 @@ void CTrackViewDopeSheetBase::SetTimeRange(float start, float end) void CTrackViewDopeSheetBase::SetTimeScale(float timeScale, float fAnchorTime) { const double fOldOffset = -fAnchorTime * m_timeScale; - const double fOldScale = m_timeScale; timeScale = std::max(timeScale, 0.001f); timeScale = std::min(timeScale, 100000.0f); @@ -1426,8 +1425,6 @@ void CTrackViewDopeSheetBase::OnCaptureChanged() ////////////////////////////////////////////////////////////////////////// bool CTrackViewDopeSheetBase::IsOkToAddKeyHere(const CTrackViewTrack* pTrack, float time) const { - const float timeEpsilon = 0.05f; - for (unsigned int i = 0; i < pTrack->GetKeyCount(); ++i) { const CTrackViewKeyConstHandle& keyHandle = pTrack->GetKey(i); @@ -2152,8 +2149,6 @@ void CTrackViewDopeSheetBase::AcceptUndo() { if (CUndo::IsRecording()) { - const QPoint mousePos = mapFromGlobal(QCursor::pos()); - CTrackViewSequence* sequence = GetIEditor()->GetAnimation()->GetSequence(); if (m_mouseMode == eTVMouseMode_Paste) @@ -2623,7 +2618,6 @@ void CTrackViewDopeSheetBase::DrawBoolTrack(const Range& timeRange, QPainter* pa { int x0 = TimeToClient(timeRange.start); float t0 = timeRange.start; - QRect trackRect; const QBrush prevBrush = painter->brush(); painter->setBrush(m_visibilityBrush); @@ -2752,7 +2746,6 @@ void CTrackViewDopeSheetBase::DrawKeys(CTrackViewTrack* pTrack, QPainter* painte } int x1 = x + kDefaultWidthForDescription; - CTrackViewKeyHandle nextKey = keyHandle.GetNextKey(); int nextKeyIndex = i + 1; diff --git a/Code/Editor/TrackView/TrackViewNode.h b/Code/Editor/TrackView/TrackViewNode.h index 2c289049e9..3c005b7fd9 100644 --- a/Code/Editor/TrackView/TrackViewNode.h +++ b/Code/Editor/TrackView/TrackViewNode.h @@ -22,13 +22,11 @@ class CTrackViewKeyConstHandle { public: CTrackViewKeyConstHandle() - : m_bIsValid(false) - , m_keyIndex(0) + : m_keyIndex(0) , m_pTrack(nullptr) {} CTrackViewKeyConstHandle(const CTrackViewTrack* pTrack, unsigned int keyIndex) - : m_bIsValid(true) - , m_keyIndex(keyIndex) + : m_keyIndex(keyIndex) , m_pTrack(pTrack) {} void GetKey(IKey* pKey) const; @@ -36,7 +34,6 @@ public: const CTrackViewTrack* GetTrack() const { return m_pTrack; } private: - bool m_bIsValid; unsigned int m_keyIndex; const CTrackViewTrack* m_pTrack; }; diff --git a/Code/Editor/TrackView/TrackViewNodes.h b/Code/Editor/TrackView/TrackViewNodes.h index d6ed95b88d..fc9804b4e4 100644 --- a/Code/Editor/TrackView/TrackViewNodes.h +++ b/Code/Editor/TrackView/TrackViewNodes.h @@ -202,7 +202,6 @@ private: // Drag and drop CTrackViewAnimNodeBundle m_draggedNodes; - CTrackViewAnimNode* m_pDragTarget; std::unordered_map m_menuParamTypeMap; std::unordered_map m_nodeToRecordMap; diff --git a/Code/Editor/TrackView/TrackViewSequence.cpp b/Code/Editor/TrackView/TrackViewSequence.cpp index f66e5276cd..76609ac947 100644 --- a/Code/Editor/TrackView/TrackViewSequence.cpp +++ b/Code/Editor/TrackView/TrackViewSequence.cpp @@ -135,9 +135,7 @@ CTrackViewKeyHandle CTrackViewSequence::FindSingleSelectedKey() ////////////////////////////////////////////////////////////////////////// void CTrackViewSequence::OnEntityComponentPropertyChanged(AZ::ComponentId changedComponentId) -{ - const AZ::EntityId entityId = *AzToolsFramework::PropertyEditorEntityChangeNotificationBus::GetCurrentBusId(); - +{ // find the component node for this changeComponentId if it exists for (int i = m_pAnimSequence->GetNodeCount(); --i >= 0;) { diff --git a/Code/Editor/TrackView/TrackViewSplineCtrl.cpp b/Code/Editor/TrackView/TrackViewSplineCtrl.cpp index 4911297985..352f2f3699 100644 --- a/Code/Editor/TrackView/TrackViewSplineCtrl.cpp +++ b/Code/Editor/TrackView/TrackViewSplineCtrl.cpp @@ -611,7 +611,6 @@ void CTrackViewSplineCtrl::mouseMoveEvent(QMouseEvent* event) CTrackViewSequenceNotificationContext context(pSequence); - QPoint cMousePosPrev = m_cMousePos; m_cMousePos = point; if (m_editMode == NothingMode) diff --git a/Code/Editor/Util/ColumnGroupTreeView.h b/Code/Editor/Util/ColumnGroupTreeView.h index c9226df8d0..3c7dea91c3 100644 --- a/Code/Editor/Util/ColumnGroupTreeView.h +++ b/Code/Editor/Util/ColumnGroupTreeView.h @@ -71,7 +71,6 @@ private: ColumnGroupHeaderView* m_header; ColumnGroupProxyModel* m_groupModel; QSet m_openNodes; - bool m_showGroups; }; #endif // COLUMNGROUPTREEVIEW_H diff --git a/Code/Editor/Util/Image.h b/Code/Editor/Util/Image.h index 8886598c43..a6d36673cb 100644 --- a/Code/Editor/Util/Image.h +++ b/Code/Editor/Util/Image.h @@ -178,7 +178,6 @@ public: ////////////////////////////////////////////////////////////////////////// void GetSubImage(int x1, int y1, int width, int height, TImage& img) const { - int size = width * height; img.Allocate(width, height); for (int y = 0; y < height; y++) { diff --git a/Code/Editor/Util/ImageASC.cpp b/Code/Editor/Util/ImageASC.cpp index c166917a68..a72ea8b9fd 100644 --- a/Code/Editor/Util/ImageASC.cpp +++ b/Code/Editor/Util/ImageASC.cpp @@ -99,7 +99,7 @@ bool CImageASC::Load(const QString& fileName, CFloatImage& image) // Break all of the values in the file apart into tokens. - char* nextToken = nullptr; + [[maybe_unused]] char* nextToken = nullptr; token = azstrtok(str, 0, seps, &nextToken); // ncols = grid width diff --git a/Code/Editor/Util/ImageGif.cpp b/Code/Editor/Util/ImageGif.cpp index a9ab4efdaf..67c5911344 100644 --- a/Code/Editor/Util/ImageGif.cpp +++ b/Code/Editor/Util/ImageGif.cpp @@ -76,8 +76,6 @@ static int numused; const char* id87 = "GIF87a"; const char* id89 = "GIF89a"; -static int log2 (int); - /* Fetch the next code from the raster data stream. The codes can be * any length from 3 to 12 bits, packed into 8-bit bytes, so we have to * maintain our location in the Raster array as a BIT Offset. We compute diff --git a/Code/Editor/Util/ImageUtil.cpp b/Code/Editor/Util/ImageUtil.cpp index 00e33162cf..c8432a3d1a 100644 --- a/Code/Editor/Util/ImageUtil.cpp +++ b/Code/Editor/Util/ImageUtil.cpp @@ -145,7 +145,7 @@ bool CImageUtil::LoadPGM(const QString& fileName, CImageEx& image) char* str = new char[fileSize]; fread(str, fileSize, 1, file); - char* nextToken = nullptr; + [[maybe_unused]] char* nextToken = nullptr; token = azstrtok(str, 0, seps, &nextToken); while (token != nullptr && token[0] == '#') diff --git a/Code/Editor/ViewPane.h b/Code/Editor/ViewPane.h index 5771a687c0..8cc9170e5f 100644 --- a/Code/Editor/ViewPane.h +++ b/Code/Editor/ViewPane.h @@ -118,7 +118,6 @@ private: int m_id; int m_nBorder; - int m_titleHeight; QWidget* m_viewport; QScrollArea* m_viewportScrollArea = nullptr; From 588d702e435a20afe4e099d8cfca6f438f409bf4 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:53:31 -0700 Subject: [PATCH 09/49] Code/Framework/AzToolsFramework Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../AzToolsFramework/UI/Slice/SliceRelationshipWidget.hxx | 1 - .../Tests/EditorTransformComponentSelectionTests.cpp | 2 +- .../AzToolsFramework/Tests/Prefab/PrefabEntityAliasTests.cpp | 3 --- .../AzToolsFramework/Tests/Prefab/PrefabTestDomUtils.cpp | 2 +- .../AzToolsFramework/Tests/Prefab/PrefabUndoTests.cpp | 1 - Code/Framework/AzToolsFramework/Tests/Slice.cpp | 2 +- .../Tests/ToolsComponents/EditorLayerComponentTests.cpp | 4 ++-- Code/Framework/AzToolsFramework/Tests/TransformComponent.cpp | 1 - .../Tests/Viewport/ViewportUiManagerTests.cpp | 2 +- 9 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Slice/SliceRelationshipWidget.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Slice/SliceRelationshipWidget.hxx index 64debe12bb..496f8b439f 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Slice/SliceRelationshipWidget.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Slice/SliceRelationshipWidget.hxx @@ -111,7 +111,6 @@ namespace AzToolsFramework QTreeWidget* m_sliceDependentsTree; ///< Tree widget for fields (left side) QTreeWidget* m_sliceDependencyTree; ///< Tree widget for slice targets (right side) - QLabel* m_infoLabel; ///< Label above slice tree describing selection QVBoxLayout* m_bottomLayout; ///< Bottom layout containing optional status messages, legend and buttons }; diff --git a/Code/Framework/AzToolsFramework/Tests/EditorTransformComponentSelectionTests.cpp b/Code/Framework/AzToolsFramework/Tests/EditorTransformComponentSelectionTests.cpp index e95f7aa271..c1c158d0f9 100644 --- a/Code/Framework/AzToolsFramework/Tests/EditorTransformComponentSelectionTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/EditorTransformComponentSelectionTests.cpp @@ -1579,7 +1579,7 @@ namespace UnitTest /////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Given AZ::Entity* entity = nullptr; - const AZ::EntityId entityId = CreateDefaultEditorEntity("Entity", &entity); + CreateDefaultEditorEntity("Entity", &entity); entity->Deactivate(); const auto* entityInfoComponent = entity->CreateComponent(); diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabEntityAliasTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabEntityAliasTests.cpp index 78be56e6ba..6158394f20 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabEntityAliasTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabEntityAliasTests.cpp @@ -160,9 +160,6 @@ namespace UnitTest ASSERT_TRUE(secondRootInstance); - // Find the new instances versions of the new and referenced entities using the aliases we saved - AZ::EntityId secondNewEntityId = secondRootInstance->GetEntityId(newEntityAlias); - InstanceOptionalReference secondNestedInstance = secondRootInstance->FindNestedInstance(nestedAlias); ASSERT_TRUE(secondNestedInstance); AZ::EntityId secondReferencedEntityId = secondNestedInstance->get().GetEntityId(referencedEntityAlias); diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestDomUtils.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestDomUtils.cpp index b8d2ce63f5..334f01fc3a 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestDomUtils.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestDomUtils.cpp @@ -132,7 +132,7 @@ namespace UnitTest PrefabDomUtils::FindPrefabDomValue(valueADom, PrefabDomUtils::LinkIdName); PrefabDomValueConstReference expectedNestedInstanceDomLinkId = PrefabDomUtils::FindPrefabDomValue(valueBDom, PrefabDomUtils::LinkIdName); - ComparePrefabDomValues(actualNestedInstanceDomLinkId, actualNestedInstanceDomLinkId); + ComparePrefabDomValues(actualNestedInstanceDomLinkId, expectedNestedInstanceDomLinkId); } if (shouldCompareContainerEntities) diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUndoTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUndoTests.cpp index 912f642118..5c68b30e8f 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUndoTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUndoTests.cpp @@ -99,7 +99,6 @@ namespace UnitTest //create single entity AZ::Entity* newEntity = CreateEntity("New Entity", false); ASSERT_TRUE(newEntity); - AZ::EntityId entityId = newEntity->GetId(); //create a first instance where the entity will be added AZStd::unique_ptr testInstance = m_prefabSystemComponent->CreatePrefab({}, {}, "test/path"); diff --git a/Code/Framework/AzToolsFramework/Tests/Slice.cpp b/Code/Framework/AzToolsFramework/Tests/Slice.cpp index dd374826a5..1723fbed8b 100644 --- a/Code/Framework/AzToolsFramework/Tests/Slice.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Slice.cpp @@ -225,7 +225,7 @@ namespace UnitTest tempAssetEntity = aznew AZ::Entity("TestEntity1"); tempAssetEntity->CreateComponent(); - AZ::Data::AssetId sliceAssetId1 = SaveAsSlice(tempAssetEntity); + SaveAsSlice(tempAssetEntity); tempAssetEntity = nullptr; AZ::SliceComponent::EntityList slice1EntitiesA = InstantiateSlice(sliceAssetId0); diff --git a/Code/Framework/AzToolsFramework/Tests/ToolsComponents/EditorLayerComponentTests.cpp b/Code/Framework/AzToolsFramework/Tests/ToolsComponents/EditorLayerComponentTests.cpp index 19cf1ad325..2f1d93c109 100644 --- a/Code/Framework/AzToolsFramework/Tests/ToolsComponents/EditorLayerComponentTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/ToolsComponents/EditorLayerComponentTests.cpp @@ -401,7 +401,7 @@ namespace AzToolsFramework TEST_F(EditorLayerComponentTest, LayerTests_TwoLayersUniqueNames_LayerNameIsValid) { - EntityAndLayerComponent secondLayer = CreateEntityWithLayer("UniqueLayerName"); + CreateEntityWithLayer("UniqueLayerName"); bool isLayerNameValid = true; AzToolsFramework::Layers::EditorLayerComponentRequestBus::EventResult( isLayerNameValid, @@ -412,7 +412,7 @@ namespace AzToolsFramework TEST_F(EditorLayerComponentTest, LayerTests_TwoLayersConflictingNames_LayerNameIsNotValid) { - EntityAndLayerComponent secondLayer = CreateEntityWithLayer(m_entityName); + CreateEntityWithLayer(m_entityName); bool isLayerNameValid = true; AzToolsFramework::Layers::EditorLayerComponentRequestBus::EventResult( isLayerNameValid, diff --git a/Code/Framework/AzToolsFramework/Tests/TransformComponent.cpp b/Code/Framework/AzToolsFramework/Tests/TransformComponent.cpp index 57ba0f998b..4fbebc8526 100644 --- a/Code/Framework/AzToolsFramework/Tests/TransformComponent.cpp +++ b/Code/Framework/AzToolsFramework/Tests/TransformComponent.cpp @@ -713,7 +713,6 @@ namespace UnitTest TransformBus::Event(m_childId, &TransformBus::Events::SetParentRelative, AZ::EntityId()); - childLocalPos; TransformBus::EventResult(childLocalPos, m_childId, &TransformBus::Events::GetLocalTranslation); EXPECT_TRUE(childLocalPos == expectedChildLocalPos); diff --git a/Code/Framework/AzToolsFramework/Tests/Viewport/ViewportUiManagerTests.cpp b/Code/Framework/AzToolsFramework/Tests/Viewport/ViewportUiManagerTests.cpp index 16a49577d1..91100b18c5 100644 --- a/Code/Framework/AzToolsFramework/Tests/Viewport/ViewportUiManagerTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Viewport/ViewportUiManagerTests.cpp @@ -168,7 +168,7 @@ namespace UnitTest m_viewportManagerWrapper.GetMockRenderOverlay()->setVisible(true); auto clusterId = m_viewportManagerWrapper.GetViewportManager()->CreateCluster(AzToolsFramework::ViewportUi::Alignment::TopLeft); - auto buttonId = m_viewportManagerWrapper.GetViewportManager()->CreateClusterButton(clusterId, ""); + m_viewportManagerWrapper.GetViewportManager()->CreateClusterButton(clusterId, ""); m_viewportManagerWrapper.GetViewportManager()->Update(); m_viewportManagerWrapper.GetViewportManager()->SetClusterVisible(clusterId, false); From 9d5e7abfb151f26bae71a972d4cd1812c70feb8f Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:53:48 -0700 Subject: [PATCH 10/49] Code/Framework/GridMate Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Framework/GridMate/Tests/ReplicaSmall.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Framework/GridMate/Tests/ReplicaSmall.cpp b/Code/Framework/GridMate/Tests/ReplicaSmall.cpp index ede2a9a195..3b3942e8f3 100644 --- a/Code/Framework/GridMate/Tests/ReplicaSmall.cpp +++ b/Code/Framework/GridMate/Tests/ReplicaSmall.cpp @@ -388,7 +388,7 @@ public: // If data set was not changed it should remain as non-dirty even after several PrepareData calls for (auto i = 0; i < 10; ++i) { - auto pdr = chunk->Data1.PrepareData(EndianType::BigEndian, 0); + [[maybe_unused]] auto pdr = chunk->Data1.PrepareData(EndianType::BigEndian, 0); AZ_TEST_ASSERT(chunk->Data1.IsDefaultValue() == true); } From ca03f65a5d7e752849f3282fbba9a3c3b0b12477 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:54:03 -0700 Subject: [PATCH 11/49] Code/Legacy/CryCommon Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Legacy/CryCommon/CryLibrary.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Legacy/CryCommon/CryLibrary.h b/Code/Legacy/CryCommon/CryLibrary.h index 31cc91cbe7..b7e1c0f359 100644 --- a/Code/Legacy/CryCommon/CryLibrary.h +++ b/Code/Legacy/CryCommon/CryLibrary.h @@ -161,7 +161,7 @@ inline static HMODULE CryLoadLibrary(const char* libName, bool bLazy = false, bo return module; } -bool CryFreeLibrary(void* lib) +inline static bool CryFreeLibrary(void* lib) { if (lib) { From a2ab05a2622b21fc905b2c5522e5da1cb42673a6 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:54:20 -0700 Subject: [PATCH 12/49] Code/Tools Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../AssetBundler/source/ui/AddSeedDialog.h | 1 - .../SerializationDependencies.cpp | 1 - .../native/FileWatcher/FileWatcher_linux.cpp | 1 - .../native/AssetManager/AssetRequestHandler.h | 2 +- .../SettingsRegistryBuilder.cpp | 2 +- .../assetmanager/AssetProcessorManagerTest.cpp | 1 - .../tests/resourcecompiler/RCBuilderTest.cpp | 5 ----- .../native/ui/SourceAssetTreeModel.cpp | 2 -- .../native/unittests/RCcontrollerUnitTests.cpp | 6 +++--- .../native/unittests/UtilitiesUnitTests.cpp | 7 ------- .../utilities/ApplicationManagerBase.cpp | 2 +- .../native/utilities/assetUtils.cpp | 1 - .../ProjectManager/Source/ProjectsScreen.cpp | 2 +- .../Importers/AssImpAnimationImporter.cpp | 1 - .../SceneAPI/SceneBuilder/SceneSystem.cpp | 1 - .../Tests/Containers/SceneGraphTests.cpp | 10 +++++----- .../Views/SceneGraphDownwardsIteratorTests.cpp | 1 - .../SceneUI/RowWidgets/TransformRowWidget.cpp | 2 +- .../Standalone/Source/Driller/AreaChart.cpp | 5 ++--- .../Standalone/Source/Driller/AreaChart.hxx | 2 -- .../Source/Driller/ChannelDataView.cpp | 1 - .../Source/Driller/DrillerCaptureWindow.cpp | 1 - .../Driller/Profiler/ProfilerDataView.cpp | 1 - .../LUA/CodeCompletion/LUACompletionModel.cpp | 6 +----- .../Source/LUA/LUAEditorBreakpointWidget.cpp | 4 +--- .../Standalone/Source/LUA/LUAEditorContext.cpp | 3 +-- .../Source/LUA/LUAEditorFindDialog.cpp | 5 +---- .../Source/LUA/LUAEditorFoldingWidget.cpp | 4 +--- .../Source/LUA/LUAEditorMainWindow.cpp | 3 +-- .../Source/LUA/LUAEditorSyntaxHighlighter.cpp | 18 +++++++----------- .../Standalone/Source/LUA/LUAEditorView.cpp | 2 -- 31 files changed, 28 insertions(+), 75 deletions(-) diff --git a/Code/Tools/AssetBundler/source/ui/AddSeedDialog.h b/Code/Tools/AssetBundler/source/ui/AddSeedDialog.h index 436db64693..c24e724994 100644 --- a/Code/Tools/AssetBundler/source/ui/AddSeedDialog.h +++ b/Code/Tools/AssetBundler/source/ui/AddSeedDialog.h @@ -47,7 +47,6 @@ namespace AssetBundler QSharedPointer m_ui; QString m_platformSpecificCachePath; - bool m_isAddSeedDialog = false; AZStd::string m_fileName; diff --git a/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/SerializationDependencies.cpp b/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/SerializationDependencies.cpp index 06d076dcfe..9e826faabb 100644 --- a/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/SerializationDependencies.cpp +++ b/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/SerializationDependencies.cpp @@ -101,7 +101,6 @@ namespace AssetBuilderSDK for (const auto& thisEntry : productDependencySet) { - constexpr int flags = 0; productDependencies.emplace_back(thisEntry.first, thisEntry.second); } } diff --git a/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_linux.cpp b/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_linux.cpp index 96f3dfb5e6..ea458ba826 100644 --- a/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_linux.cpp +++ b/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_linux.cpp @@ -192,7 +192,6 @@ void FolderRootWatch::WatchFolderLoop() for (size_t index=0; indexname; if (event->mask & (IN_CREATE | IN_DELETE | IN_MODIFY | IN_MOVE )) { diff --git a/Code/Tools/AssetProcessor/native/AssetManager/AssetRequestHandler.h b/Code/Tools/AssetProcessor/native/AssetManager/AssetRequestHandler.h index 5ebd507685..5fcb2ca730 100644 --- a/Code/Tools/AssetProcessor/native/AssetManager/AssetRequestHandler.h +++ b/Code/Tools/AssetProcessor/native/AssetManager/AssetRequestHandler.h @@ -115,7 +115,7 @@ namespace AssetProcessor { static constexpr unsigned int MessageType = TRequest::MessageType; - m_messageHandlers[MessageType] = [this, handler = AZStd::move(handler)](MessageData messageData) + m_messageHandlers[MessageType] = [handler = AZStd::move(handler)](MessageData messageData) { MessageData downcastData = messageData; diff --git a/Code/Tools/AssetProcessor/native/InternalBuilders/SettingsRegistryBuilder.cpp b/Code/Tools/AssetProcessor/native/InternalBuilders/SettingsRegistryBuilder.cpp index 9781c200fd..7c88c4324c 100644 --- a/Code/Tools/AssetProcessor/native/InternalBuilders/SettingsRegistryBuilder.cpp +++ b/Code/Tools/AssetProcessor/native/InternalBuilders/SettingsRegistryBuilder.cpp @@ -337,7 +337,7 @@ namespace AssetProcessor // Merge the Project User and User home settings registry only in non-release builds constexpr bool executeRegDumpCommands = false; AZ::CommandLine* commandLine{}; - AZ::ComponentApplicationBus::Broadcast([®istry, &commandLine](AZ::ComponentApplicationRequests* appRequests) + AZ::ComponentApplicationBus::Broadcast([&commandLine](AZ::ComponentApplicationRequests* appRequests) { commandLine = appRequests->GetAzCommandLine(); }); diff --git a/Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.cpp b/Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.cpp index 10ecc411ab..48a86dc5f6 100644 --- a/Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.cpp +++ b/Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.cpp @@ -3500,7 +3500,6 @@ TEST_F(AssetProcessorManagerTest, JobDependencyOrderOnce_MultipleJobs_EmitOK) using namespace AssetProcessor; using namespace AssetBuilderSDK; - AZ::Uuid dummyBuilderUUID = AZ::Uuid::CreateRandom(); QDir tempPath(m_tempDir.path()); QString watchFolderPath = tempPath.absoluteFilePath("subfolder1"); const ScanFolderInfo* scanFolder = m_config->GetScanFolderByPath(watchFolderPath); diff --git a/Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCBuilderTest.cpp b/Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCBuilderTest.cpp index 2465be2b33..9b2a12ecad 100644 --- a/Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCBuilderTest.cpp +++ b/Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCBuilderTest.cpp @@ -447,7 +447,6 @@ TEST_F(RCBuilderTest, ProcessLegacyRCJob_ProcessStandardSingleJob_Valid) TEST_F(RCBuilderTest, ProcessLegacyRCJob_ProcessCopySingleJob_Valid) { AZStd::string name = "test"; - AZ::Uuid builderUuid = AZ::Uuid::CreateRandom(); AZ::Uuid assetTypeUUid = AZ::Uuid::CreateRandom(); MockRCCompiler* mockRC = new MockRCCompiler(); TestInternalRecognizerBasedBuilder test(mockRC); @@ -506,7 +505,6 @@ TEST_F(RCBuilderTest, MatchTempFileToSkip_SkipRCFiles_false) TEST_F(RCBuilderTest, ProcessJob_ProcessStandardRCSingleJob_Valid) { - AZ::Uuid assetTypeUUid = AZ::Uuid::CreateRandom(); MockRCCompiler* mockRC = new MockRCCompiler(); TestInternalRecognizerBasedBuilder test(mockRC); MockRecognizerConfiguration configuration; @@ -536,7 +534,6 @@ TEST_F(RCBuilderTest, ProcessJob_ProcessStandardRCSingleJob_Valid) TEST_F(RCBuilderTest, ProcessJob_ProcessStandardRCSingleJob_Failed) { - AZ::Uuid assetTypeUUid = AZ::Uuid::CreateRandom(); MockRCCompiler* mockRC = new MockRCCompiler(); TestInternalRecognizerBasedBuilder test(mockRC); MockRecognizerConfiguration configuration; @@ -564,7 +561,6 @@ TEST_F(RCBuilderTest, ProcessJob_ProcessStandardRCSingleJob_Failed) TEST_F(RCBuilderTest, ProcessJob_ProcessStandardCopySingleJob_Valid) { - AZ::Uuid assetTypeUUid = AZ::Uuid::CreateRandom(); MockRCCompiler* mockRC = new MockRCCompiler(); TestInternalRecognizerBasedBuilder test(mockRC); MockRecognizerConfiguration configuration; @@ -590,7 +586,6 @@ TEST_F(RCBuilderTest, ProcessJob_ProcessStandardCopySingleJob_Valid) TEST_F(RCBuilderTest, ProcessJob_ProcessStandardSkippedSingleJob_Invalid) { - AZ::Uuid assetTypeUUid = AZ::Uuid::CreateRandom(); MockRCCompiler* mockRC = new MockRCCompiler(); TestInternalRecognizerBasedBuilder test(mockRC); MockRecognizerConfiguration configuration; diff --git a/Code/Tools/AssetProcessor/native/ui/SourceAssetTreeModel.cpp b/Code/Tools/AssetProcessor/native/ui/SourceAssetTreeModel.cpp index 1fcdd62cf7..88fbe5a204 100644 --- a/Code/Tools/AssetProcessor/native/ui/SourceAssetTreeModel.cpp +++ b/Code/Tools/AssetProcessor/native/ui/SourceAssetTreeModel.cpp @@ -87,8 +87,6 @@ namespace AssetProcessor return; } - QModelIndex newIndicesStart; - AssetTreeItem* parentItem = m_root.get(); // Use posix path separator for each child item AZ::IO::Path currentFullFolderPath(AZ::IO::PosixPathSeparator); diff --git a/Code/Tools/AssetProcessor/native/unittests/RCcontrollerUnitTests.cpp b/Code/Tools/AssetProcessor/native/unittests/RCcontrollerUnitTests.cpp index 0f5fea5eb9..5b15a6a552 100644 --- a/Code/Tools/AssetProcessor/native/unittests/RCcontrollerUnitTests.cpp +++ b/Code/Tools/AssetProcessor/native/unittests/RCcontrollerUnitTests.cpp @@ -604,14 +604,14 @@ void RCcontrollerUnitTests::RunRCControllerTests() m_rcController.m_RCJobListModel.addNewJob(jobA); bool beginWorkA = false; - QObject::connect(jobA, &RCJob::BeginWork, this, [this, &beginWorkA]() + QObject::connect(jobA, &RCJob::BeginWork, this, [&beginWorkA]() { beginWorkA = true; } ); bool jobFinishedA = false; - QObject::connect(jobA, &RCJob::JobFinished, this, [this, &jobFinishedA](AssetBuilderSDK::ProcessJobResponse /*result*/) + QObject::connect(jobA, &RCJob::JobFinished, this, [&jobFinishedA](AssetBuilderSDK::ProcessJobResponse /*result*/) { jobFinishedA = true; } @@ -655,7 +655,7 @@ void RCcontrollerUnitTests::RunRCControllerTests() ); bool jobFinishedB = false; - QObject::connect(jobB, &RCJob::JobFinished, this, [this, &jobFinishedB](AssetBuilderSDK::ProcessJobResponse /*result*/) + QObject::connect(jobB, &RCJob::JobFinished, this, [&jobFinishedB](AssetBuilderSDK::ProcessJobResponse /*result*/) { jobFinishedB = true; } diff --git a/Code/Tools/AssetProcessor/native/unittests/UtilitiesUnitTests.cpp b/Code/Tools/AssetProcessor/native/unittests/UtilitiesUnitTests.cpp index ed6fa4b8b4..b34f79142c 100644 --- a/Code/Tools/AssetProcessor/native/unittests/UtilitiesUnitTests.cpp +++ b/Code/Tools/AssetProcessor/native/unittests/UtilitiesUnitTests.cpp @@ -319,13 +319,6 @@ void UtilitiesUnitTests::StartTest() // --------------- TEST FilePatternMatcher { - const char* wildcardMatch[] = { - "*.cfg", - "*.txt", - "abf*.llm" - "sdf.c*", - "a.bcd" - }; { AssetBuilderSDK::FilePatternMatcher extensionWildcardTest(AssetBuilderSDK::AssetBuilderPattern("*.cfg", AssetBuilderSDK::AssetBuilderPattern::Wildcard)); UNIT_TEST_EXPECT_TRUE(extensionWildcardTest.MatchesPath(AZStd::string("foo.cfg"))); diff --git a/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp index b90364e1c5..4e0bc7e434 100644 --- a/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp @@ -1209,7 +1209,7 @@ void ApplicationManagerBase::InitFileProcessor() AssetProcessor::ThreadController* fileProcessorHelper = new AssetProcessor::ThreadController(); addRunningThread(fileProcessorHelper); - m_fileProcessor.reset(fileProcessorHelper->initialize([this, &fileProcessorHelper]() + m_fileProcessor.reset(fileProcessorHelper->initialize([this]() { return new AssetProcessor::FileProcessor(m_platformConfiguration); })); diff --git a/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp b/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp index 72a036bdaa..7292990a72 100644 --- a/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp @@ -1399,7 +1399,6 @@ namespace AssetUtilities QString inputName; QString platformName; QString jobDescription; - AZ::Uuid guid = AZ::Uuid::CreateNull(); using namespace AzToolsFramework::AssetDatabase; diff --git a/Code/Tools/ProjectManager/Source/ProjectsScreen.cpp b/Code/Tools/ProjectManager/Source/ProjectsScreen.cpp index e27eedd122..4c763fb501 100644 --- a/Code/Tools/ProjectManager/Source/ProjectsScreen.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectsScreen.cpp @@ -360,7 +360,7 @@ namespace O3DE::ProjectManager constexpr int waitTimeInMs = 3000; QTimer::singleShot( waitTimeInMs, this, - [this, button] + [button] { if (button) { diff --git a/Code/Tools/SceneAPI/SceneBuilder/Importers/AssImpAnimationImporter.cpp b/Code/Tools/SceneAPI/SceneBuilder/Importers/AssImpAnimationImporter.cpp index 16f8d85509..a5b286bbc6 100644 --- a/Code/Tools/SceneAPI/SceneBuilder/Importers/AssImpAnimationImporter.cpp +++ b/Code/Tools/SceneAPI/SceneBuilder/Importers/AssImpAnimationImporter.cpp @@ -652,7 +652,6 @@ namespace AZ aiAnimMesh* aiAnimMesh = mesh->mAnimMeshes[meshIdx]; AZStd::string_view nodeName(aiAnimMesh->mName.C_Str()); - const AZ::u32 maxKeys = static_cast(keys.size()); AZ::u32 keyIdx = 0; for (AZ::u32 frame = 0; frame < numKeyFrames; ++frame) { diff --git a/Code/Tools/SceneAPI/SceneBuilder/SceneSystem.cpp b/Code/Tools/SceneAPI/SceneBuilder/SceneSystem.cpp index e9117b780a..ebe907706d 100644 --- a/Code/Tools/SceneAPI/SceneBuilder/SceneSystem.cpp +++ b/Code/Tools/SceneAPI/SceneBuilder/SceneSystem.cpp @@ -105,7 +105,6 @@ namespace AZ } break; } - AZ::Matrix4x4 inverse = currentCoordMatrix.GetInverseTransform(); AZ::Matrix4x4 adjustmatrix = targetCoordMatrix * currentCoordMatrix.GetInverseTransform(); m_adjustTransform.reset(new DataTypes::MatrixType(AssImpSDKWrapper::AssImpTypeConverter::ToTransform(adjustmatrix))); m_adjustTransformInverse.reset(new DataTypes::MatrixType(m_adjustTransform->GetInverseFull())); diff --git a/Code/Tools/SceneAPI/SceneCore/Tests/Containers/SceneGraphTests.cpp b/Code/Tools/SceneAPI/SceneCore/Tests/Containers/SceneGraphTests.cpp index b57f284003..87e2cbdbde 100644 --- a/Code/Tools/SceneAPI/SceneCore/Tests/Containers/SceneGraphTests.cpp +++ b/Code/Tools/SceneAPI/SceneCore/Tests/Containers/SceneGraphTests.cpp @@ -332,7 +332,7 @@ namespace AZ { SceneGraph testSceneGraph; AZStd::shared_ptr testDataObject = AZStd::make_shared(); - SceneGraph::NodeIndex firstChildNodeIndex = testSceneGraph.AddChild(testSceneGraph.GetRoot(), "FirstChild", AZStd::move(testDataObject)); + testSceneGraph.AddChild(testSceneGraph.GetRoot(), "FirstChild", AZStd::move(testDataObject)); testDataObject = AZStd::make_shared(); SceneGraph::NodeIndex testNodeIndex = testSceneGraph.AddChild(testSceneGraph.GetRoot(), "SecondChild", AZStd::move(testDataObject)); @@ -350,7 +350,7 @@ namespace AZ SceneGraph::NodeIndex testRootNodeIndex = testSceneGraph.AddChild(testSceneGraph.GetRoot(), "testRoot", AZStd::move(testDataObject)); testDataObject = AZStd::make_shared(); - SceneGraph::NodeIndex firstChildNodeIndex = testSceneGraph.AddChild(testRootNodeIndex, "FirstChild", AZStd::move(testDataObject)); + testSceneGraph.AddChild(testRootNodeIndex, "FirstChild", AZStd::move(testDataObject)); testDataObject = AZStd::make_shared(); SceneGraph::NodeIndex testNodeIndex = testSceneGraph.AddChild(testRootNodeIndex, "SecondChild", AZStd::move(testDataObject)); @@ -371,10 +371,10 @@ namespace AZ SceneGraph::NodeIndex testRootNodeSiblingIndex = testSceneGraph.AddChild(testSceneGraph.GetRoot(), "testRootSibling", AZStd::move(testDataObject)); testDataObject = AZStd::make_shared(); - SceneGraph::NodeIndex firstChildNodeIndex = testSceneGraph.AddChild(testRootNodeIndex, "FirstChild", AZStd::move(testDataObject)); + testSceneGraph.AddChild(testRootNodeIndex, "FirstChild", AZStd::move(testDataObject)); testDataObject = AZStd::make_shared(); - SceneGraph::NodeIndex testNodeIndex = testSceneGraph.AddChild(testRootNodeIndex, "SecondChild", AZStd::move(testDataObject)); + testSceneGraph.AddChild(testRootNodeIndex, "SecondChild", AZStd::move(testDataObject)); SceneGraph::NodeIndex foundIndex = testSceneGraph.Find(testRootNodeSiblingIndex, "SecondChild"); EXPECT_FALSE(foundIndex.IsValid()); @@ -475,7 +475,7 @@ namespace AZ AZStd::string expectedNodeName("TestNode"); - SceneGraph::NodeIndex testNodeIndex = testSceneGraph.AddChild(testSceneGraph.GetRoot(), expectedNodeName.c_str()); + testSceneGraph.AddChild(testSceneGraph.GetRoot(), expectedNodeName.c_str()); SceneGraph::NodeIndex foundIndex = testSceneGraph.Find(expectedNodeName); ASSERT_TRUE(foundIndex.IsValid()); const SceneGraph::Name& nodeName = testSceneGraph.GetNodeName(foundIndex); diff --git a/Code/Tools/SceneAPI/SceneCore/Tests/Containers/Views/SceneGraphDownwardsIteratorTests.cpp b/Code/Tools/SceneAPI/SceneCore/Tests/Containers/Views/SceneGraphDownwardsIteratorTests.cpp index fbecbe635c..84892373bf 100644 --- a/Code/Tools/SceneAPI/SceneCore/Tests/Containers/Views/SceneGraphDownwardsIteratorTests.cpp +++ b/Code/Tools/SceneAPI/SceneCore/Tests/Containers/Views/SceneGraphDownwardsIteratorTests.cpp @@ -303,7 +303,6 @@ namespace AZ TYPED_TEST_P(SceneGraphDownwardsIteratorContext, Algorithms_FindIf_FindsValue3InNodeAdotC) { using Traversal = typename SceneGraphDownwardsIteratorContext::Traversal; - SceneGraph::NodeIndex index = this->m_graph.Find("A.C"); auto sceneView = MakeSceneGraphDownwardsView(this->m_graph, this->m_graph.GetContentStorage().begin()); auto result = AZStd::find_if(sceneView.begin(), sceneView.end(), [](const AZStd::shared_ptr& object) -> bool diff --git a/Code/Tools/SceneAPI/SceneUI/RowWidgets/TransformRowWidget.cpp b/Code/Tools/SceneAPI/SceneUI/RowWidgets/TransformRowWidget.cpp index e9d83002e9..2672555850 100644 --- a/Code/Tools/SceneAPI/SceneUI/RowWidgets/TransformRowWidget.cpp +++ b/Code/Tools/SceneAPI/SceneUI/RowWidgets/TransformRowWidget.cpp @@ -149,7 +149,7 @@ namespace AZ hider->setLayout(layout2); layoutOriginal->addWidget(hider); - connect(toolButton, &QToolButton::clicked, this, [this, hider, parentWidget, toolButton] + connect(toolButton, &QToolButton::clicked, this, [this, hider, toolButton] { m_expanded = !m_expanded; if (m_expanded) diff --git a/Code/Tools/Standalone/Source/Driller/AreaChart.cpp b/Code/Tools/Standalone/Source/Driller/AreaChart.cpp index a0eccc7d45..3416975be8 100644 --- a/Code/Tools/Standalone/Source/Driller/AreaChart.cpp +++ b/Code/Tools/Standalone/Source/Driller/AreaChart.cpp @@ -23,9 +23,8 @@ namespace AreaChart // LineSeries /////////////// - LineSeries::LineSeries(AreaChart* owner, size_t seriesId, const QString& name, const QColor& color, size_t seriesSize) - : m_owner(owner) - , m_seriesId(seriesId) + LineSeries::LineSeries([[maybe_unused]] AreaChart* owner, size_t seriesId, const QString& name, const QColor& color, size_t seriesSize) + : m_seriesId(seriesId) , m_name(name) , m_color(color) , m_highlighted(false) diff --git a/Code/Tools/Standalone/Source/Driller/AreaChart.hxx b/Code/Tools/Standalone/Source/Driller/AreaChart.hxx index 6e41734d07..35a279a1e4 100644 --- a/Code/Tools/Standalone/Source/Driller/AreaChart.hxx +++ b/Code/Tools/Standalone/Source/Driller/AreaChart.hxx @@ -69,7 +69,6 @@ namespace AreaChart private: - AreaChart* m_owner; LinePoints m_linePoints; size_t m_seriesId; @@ -182,7 +181,6 @@ namespace AreaChart size_t m_inspectionSeries; - size_t m_mouseOverArea; AZStd::vector< AZStd::vector > m_hitAreas; bool m_clicked; diff --git a/Code/Tools/Standalone/Source/Driller/ChannelDataView.cpp b/Code/Tools/Standalone/Source/Driller/ChannelDataView.cpp index 27922f47a3..0fd94476e3 100644 --- a/Code/Tools/Standalone/Source/Driller/ChannelDataView.cpp +++ b/Code/Tools/Standalone/Source/Driller/ChannelDataView.cpp @@ -439,7 +439,6 @@ namespace Driller QColor drawColor = budgetMarker.GetColor(); - QRect sizeRect = rect(); int x = rect().left(); float normalizedValue = ((budgetMarker.GetValue() + 1.0f) / 2.0f); int y = static_cast(rect().bottom() - (rect().height() * normalizedValue)); diff --git a/Code/Tools/Standalone/Source/Driller/DrillerCaptureWindow.cpp b/Code/Tools/Standalone/Source/Driller/DrillerCaptureWindow.cpp index 7f39136649..f5df4f1629 100644 --- a/Code/Tools/Standalone/Source/Driller/DrillerCaptureWindow.cpp +++ b/Code/Tools/Standalone/Source/Driller/DrillerCaptureWindow.cpp @@ -744,7 +744,6 @@ namespace Driller bool wascapturing = IsInCaptureMode(CaptureMode::Capturing); - CaptureMode::Inspecting; emit OnCaptureModeChange(m_captureMode); if (m_data) diff --git a/Code/Tools/Standalone/Source/Driller/Profiler/ProfilerDataView.cpp b/Code/Tools/Standalone/Source/Driller/Profiler/ProfilerDataView.cpp index 26bcb82fea..f8e2a9e5da 100644 --- a/Code/Tools/Standalone/Source/Driller/Profiler/ProfilerDataView.cpp +++ b/Code/Tools/Standalone/Source/Driller/Profiler/ProfilerDataView.cpp @@ -496,7 +496,6 @@ namespace Driller m_persistentState->m_treeExpansionData.clear(); QSet qSetQString; m_gui->widgetProfilerData->WriteTreeViewStateTo(qSetQString); - QSet::iterator iter = qSetQString.begin(); for (auto iterStrings = qSetQString.begin(); iterStrings != qSetQString.end(); ++iterStrings) { m_persistentState->m_treeExpansionData.push_back(iterStrings->toUtf8().data()); diff --git a/Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompletionModel.cpp b/Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompletionModel.cpp index 8fadc230cd..977b7a4d29 100644 --- a/Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompletionModel.cpp +++ b/Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompletionModel.cpp @@ -130,12 +130,8 @@ namespace LUAEditor return Qt::ItemIsEnabled | Qt::ItemIsSelectable; } - QVariant CompletionModel::headerData(int section, Qt::Orientation orientation, int role) const + QVariant CompletionModel::headerData([[maybe_unused]] int section, [[maybe_unused]] Qt::Orientation orientation, [[maybe_unused]] int role) const { - section; - orientation; - role; - return QVariant(); } diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorBreakpointWidget.cpp b/Code/Tools/Standalone/Source/LUA/LUAEditorBreakpointWidget.cpp index 8cce681a74..5b47ee136a 100644 --- a/Code/Tools/Standalone/Source/LUA/LUAEditorBreakpointWidget.cpp +++ b/Code/Tools/Standalone/Source/LUA/LUAEditorBreakpointWidget.cpp @@ -67,10 +67,8 @@ namespace LUAEditor OnBreakpointLineDeleted.clear(); } - void LUAEditorBreakpointWidget::paintEvent(QPaintEvent* paintEvent) + void LUAEditorBreakpointWidget::paintEvent([[maybe_unused]] QPaintEvent* paintEvent) { - paintEvent; - QPainter p(this); auto colors = AZ::UserSettings::CreateFind(AZ_CRC("LUA Editor Text Settings", 0xb6e15565), AZ::UserSettings::CT_GLOBAL); diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorContext.cpp b/Code/Tools/Standalone/Source/LUA/LUAEditorContext.cpp index 0c9b3a1d77..1fa127dd7d 100644 --- a/Code/Tools/Standalone/Source/LUA/LUAEditorContext.cpp +++ b/Code/Tools/Standalone/Source/LUA/LUAEditorContext.cpp @@ -950,7 +950,6 @@ namespace LUAEditor newAssetName += ".lua"; } - AZ::Data::AssetType assetType = AZ::AzTypeInfo::Uuid(); AZ::Data::AssetId catalogAssetId; EBUS_EVENT_RESULT(catalogAssetId, AZ::Data::AssetCatalogRequestBus, GetAssetIdByPath, newAssetName.c_str(), AZ::AzTypeInfo::Uuid(), false); @@ -2419,7 +2418,7 @@ namespace LUAEditor std::regex errorRegex(".+\\.lua:(\\d+):(.*)"); AzToolsFramework::Logging::LogLine::ParseLog(logResult.GetValue().c_str(), logResult.GetValue().size(), - [this, &msg, ¤tAsset, &errorRegex](AzToolsFramework::Logging::LogLine& logLine) + [this, ¤tAsset, &errorRegex](AzToolsFramework::Logging::LogLine& logLine) { if ((logLine.GetLogType() == AzToolsFramework::Logging::LogLine::TYPE_WARNING) || (logLine.GetLogType() == AzToolsFramework::Logging::LogLine::TYPE_ERROR)) { diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFindDialog.cpp b/Code/Tools/Standalone/Source/LUA/LUAEditorFindDialog.cpp index 69108a1ad2..c775ddc0ba 100644 --- a/Code/Tools/Standalone/Source/LUA/LUAEditorFindDialog.cpp +++ b/Code/Tools/Standalone/Source/LUA/LUAEditorFindDialog.cpp @@ -80,7 +80,7 @@ namespace LUAEditor auto pState = AZ::UserSettings::CreateFind(AZ_CRC("FindInCurrent", 0xba0962af), AZ::UserSettings::CT_LOCAL); m_gui->wrapCheckBox->setChecked((pState ? pState->m_findWrap : true)); - connect(m_gui->wrapCheckBox, &QCheckBox::stateChanged, this, [this](int newState) + connect(m_gui->wrapCheckBox, &QCheckBox::stateChanged, this, [](int newState) { auto pState = AZ::UserSettings::CreateFind(AZ_CRC("FindInCurrent", 0xba0962af), AZ::UserSettings::CT_LOCAL); pState->m_findWrap = (newState == Qt::Checked); @@ -350,7 +350,6 @@ namespace LUAEditor void LUAEditorFindDialog::FindInView(LUAViewWidget* pLUAViewWidget, QListWidget* pCurrentFindListView) { - pCurrentFindListView; if (!pLUAViewWidget) { return; @@ -373,8 +372,6 @@ namespace LUAEditor void LUAEditorFindDialog::FindNextInView(LUAViewWidget::FindOperation* operation, LUAViewWidget* pLUAViewWidget, QListWidget* pCurrentFindListView) { - pLUAViewWidget; - pCurrentFindListView; int line = 0; int index = 0; pLUAViewWidget->GetCursorPosition(line, index); diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFoldingWidget.cpp b/Code/Tools/Standalone/Source/LUA/LUAEditorFoldingWidget.cpp index 98bf18e7ca..43257f66f2 100644 --- a/Code/Tools/Standalone/Source/LUA/LUAEditorFoldingWidget.cpp +++ b/Code/Tools/Standalone/Source/LUA/LUAEditorFoldingWidget.cpp @@ -31,10 +31,8 @@ namespace LUAEditor { } - void FoldingWidget::paintEvent(QPaintEvent* paintEvent) + void FoldingWidget::paintEvent([[maybe_unused]] QPaintEvent* paintEvent) { - paintEvent; - auto colors = AZ::UserSettings::CreateFind(AZ_CRC("LUA Editor Text Settings", 0xb6e15565), AZ::UserSettings::CT_GLOBAL); auto cursor = m_textEdit->textCursor(); diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.cpp b/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.cpp index 45484f2815..ffbc5a445c 100644 --- a/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.cpp +++ b/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.cpp @@ -213,7 +213,7 @@ namespace LUAEditor auto newState = AZ::UserSettings::CreateFind(AZ_CRC("LUA EDITOR MAIN WINDOW STATE", 0xa181bc4a), AZ::UserSettings::CT_LOCAL); m_gui->actionAutoReloadUnmodifiedFiles->setChecked(newState->m_bAutoReloadUnmodifiedFiles); - connect(m_gui->actionAutoReloadUnmodifiedFiles, &QAction::triggered, this, [this](bool newValue) + connect(m_gui->actionAutoReloadUnmodifiedFiles, &QAction::triggered, this, [](bool newValue) { auto newState = AZ::UserSettings::CreateFind(AZ_CRC("LUA EDITOR MAIN WINDOW STATE", 0xa181bc4a), AZ::UserSettings::CT_LOCAL); newState->m_bAutoReloadUnmodifiedFiles = newValue; @@ -2394,7 +2394,6 @@ namespace LUAEditor // if we have any elements, the last element is top right aligned: QLayoutItem* pItem = children[children.size() - 1]; QSize lastItemSize = pItem->minimumSize(); - QPoint topRight = effectiveRect.topRight(); const int magicalRightEdgeOffset = pItem->widget()->style()->pixelMetric(QStyle::PM_ScrollBarExtent); QRect topRightCorner(effectiveRect.topRight() - QPoint(lastItemSize.width() + magicalRightEdgeOffset, 0) + QPoint(-2, 2), lastItemSize); diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorSyntaxHighlighter.cpp b/Code/Tools/Standalone/Source/LUA/LUAEditorSyntaxHighlighter.cpp index a0c4d175a7..29229d36d0 100644 --- a/Code/Tools/Standalone/Source/LUA/LUAEditorSyntaxHighlighter.cpp +++ b/Code/Tools/Standalone/Source/LUA/LUAEditorSyntaxHighlighter.cpp @@ -16,9 +16,8 @@ namespace LUAEditor namespace { template - void CreateTypes(Container& container) + void CreateTypes([[maybe_unused]] Container& container) { - container; } template @@ -44,11 +43,11 @@ namespace LUAEditor { public: virtual ~BaseParserState() {} - virtual bool IsMultilineState(LUASyntaxHighlighter::StateMachine& machine) const { (void*)&machine; return false; } - virtual void StartState(LUASyntaxHighlighter::StateMachine& machine) { (void*)&machine; } + virtual bool IsMultilineState([[maybe_unused]] LUASyntaxHighlighter::StateMachine& machine) const { return false; } + virtual void StartState([[maybe_unused]] LUASyntaxHighlighter::StateMachine& machine) {} //note you only get 13 bits of usable space here. see QTBlockState m_syntaxHighlighterStateExtra virtual AZ::u16 GetSaveState() const { return 0; } - virtual void SetSaveState(AZ::u16 state) { state; } + virtual void SetSaveState([[maybe_unused]] AZ::u16 state) {} virtual void Parse(LUASyntaxHighlighter::StateMachine& machine, const QChar& nextChar) = 0; }; @@ -87,7 +86,7 @@ namespace LUAEditor class LongCommentParserState : public BaseParserState { - bool IsMultilineState(LUASyntaxHighlighter::StateMachine& machine) const override { (void*)&machine; return true; } + bool IsMultilineState([[maybe_unused]] LUASyntaxHighlighter::StateMachine& machine) const override { return true; } void StartState(LUASyntaxHighlighter::StateMachine& machine) override; AZ::u16 GetSaveState() const override { return m_bracketLevel; } void SetSaveState(AZ::u16 state) override; @@ -341,9 +340,8 @@ namespace LUAEditor } } - void ShortCommentParserState::StartState(LUASyntaxHighlighter::StateMachine& machine) + void ShortCommentParserState::StartState([[maybe_unused]] LUASyntaxHighlighter::StateMachine& machine) { - machine; m_mightBeLong = true; } @@ -365,10 +363,8 @@ namespace LUAEditor m_endNextChar = false; } - void LongCommentParserState::Parse(LUASyntaxHighlighter::StateMachine& machine, const QChar& nextChar) + void LongCommentParserState::Parse(LUASyntaxHighlighter::StateMachine& machine, [[maybe_unused]] const QChar& nextChar) { - nextChar; - if (m_endNextChar) { machine.SetState(ParserStates::Null); diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorView.cpp b/Code/Tools/Standalone/Source/LUA/LUAEditorView.cpp index 092d3f4b8c..18d12f292c 100644 --- a/Code/Tools/Standalone/Source/LUA/LUAEditorView.cpp +++ b/Code/Tools/Standalone/Source/LUA/LUAEditorView.cpp @@ -1200,8 +1200,6 @@ namespace LUAEditor void LUAViewWidget::focusInEvent(QFocusEvent* pEvent) { - pEvent; - QWidget::focusInEvent(pEvent); m_gui->m_luaTextEdit->setFocus(); } From d4ee5423a91d0694b5be86e5cfa0bd7178e2c4bc Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:54:53 -0700 Subject: [PATCH 13/49] Code/Framework/AzCore Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Framework/AzCore/Tests/AZStd/Algorithms.cpp | 3 +-- Code/Framework/AzCore/Tests/AZStd/FunctorsBind.cpp | 3 ++- Code/Framework/AzCore/Tests/AZStd/ListsIntrusive.cpp | 2 +- Code/Framework/AzCore/Tests/AZStd/SetsIntrusive.cpp | 2 +- Code/Framework/AzCore/Tests/AZStd/String.cpp | 8 ++++---- .../AzCore/Tests/Math/ShapeIntersectionTests.cpp | 3 --- Code/Framework/AzCore/Tests/Math/SimdMathTests.cpp | 2 -- Code/Framework/AzCore/Tests/Memory/LeakDetection.cpp | 1 - 8 files changed, 9 insertions(+), 15 deletions(-) diff --git a/Code/Framework/AzCore/Tests/AZStd/Algorithms.cpp b/Code/Framework/AzCore/Tests/AZStd/Algorithms.cpp index 2bb799e627..a1c9e5d79e 100644 --- a/Code/Framework/AzCore/Tests/AZStd/Algorithms.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/Algorithms.cpp @@ -1032,7 +1032,7 @@ namespace UnitTest auto CreateArray = []() constexpr -> AZStd::array { AZStd::array localArray = { {1, 2, 3} }; - auto resultFunc = AZStd::for_each(localArray.begin(), localArray.end(), [](int& element) { ++element; }); + AZStd::for_each(localArray.begin(), localArray.end(), [](int& element) { ++element; }); return localArray; }; constexpr AZStd::array testArray = CreateArray(); @@ -1271,7 +1271,6 @@ namespace UnitTest TEST_F(Algorithms, Unique_Compile_WhenUsedInConstexpr) { - constexpr AZStd::array testList = { { 1, 2, 3 } }; auto TestUnique = []() constexpr { AZStd::array localArray{ { 1, 2, 2, 5, 5, 6} }; diff --git a/Code/Framework/AzCore/Tests/AZStd/FunctorsBind.cpp b/Code/Framework/AzCore/Tests/AZStd/FunctorsBind.cpp index b720257f18..58ab71096b 100644 --- a/Code/Framework/AzCore/Tests/AZStd/FunctorsBind.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/FunctorsBind.cpp @@ -940,9 +940,10 @@ namespace UnitTest // 64 Byte buffer is used to prevent AZStd::function for storing the // lambda internal storage using the small buffer optimization // Therefore causing the supplied allocator to be used - AZStd::aligned_storage_t<64, 1> bufferToAvoidSmallBufferOptimization; + [[maybe_unused]] AZStd::aligned_storage_t<64, 1> bufferToAvoidSmallBufferOptimization; auto xValueAndConstXValueFunc = [bufferToAvoidSmallBufferOptimization](int lhs, int rhs) -> int { + AZ_UNUSED(bufferToAvoidSmallBufferOptimization); return lhs + rhs; }; diff --git a/Code/Framework/AzCore/Tests/AZStd/ListsIntrusive.cpp b/Code/Framework/AzCore/Tests/AZStd/ListsIntrusive.cpp index 511a4e479e..9e238b3d7d 100644 --- a/Code/Framework/AzCore/Tests/AZStd/ListsIntrusive.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/ListsIntrusive.cpp @@ -997,7 +997,7 @@ namespace UnitTest myclass_base_list.clear(); auto reverseIterBegin = myclass_base_list.rbegin(); auto reverseIterEnd = myclass_base_list.rend(); - EXPECT_EQ(reverseIterEnd, reverseIterEnd); + EXPECT_EQ(reverseIterBegin, reverseIterEnd); } } } diff --git a/Code/Framework/AzCore/Tests/AZStd/SetsIntrusive.cpp b/Code/Framework/AzCore/Tests/AZStd/SetsIntrusive.cpp index 61f9144452..6cae83c3ad 100644 --- a/Code/Framework/AzCore/Tests/AZStd/SetsIntrusive.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/SetsIntrusive.cpp @@ -287,7 +287,7 @@ namespace UnitTest myclass_base_set.clear(); auto reverseIterBegin = myclass_base_set.rbegin(); auto reverseIterEnd = myclass_base_set.rend(); - EXPECT_EQ(reverseIterEnd, reverseIterEnd); + EXPECT_EQ(reverseIterBegin, reverseIterEnd); } } } diff --git a/Code/Framework/AzCore/Tests/AZStd/String.cpp b/Code/Framework/AzCore/Tests/AZStd/String.cpp index 0ff12a352c..4c6687b00d 100644 --- a/Code/Framework/AzCore/Tests/AZStd/String.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/String.cpp @@ -1229,7 +1229,7 @@ namespace UnitTest string_view subView2 = view2.substr(10); EXPECT_EQ("Haystack", subView2); AZ_TEST_START_TRACE_SUPPRESSION; - string_view assertSubView = view2.substr(view2.size() + 1); + [[maybe_unused]] string_view assertSubView = view2.substr(view2.size() + 1); AZ_TEST_STOP_TRACE_SUPPRESSION(1); // compare @@ -1472,7 +1472,7 @@ namespace UnitTest class WrappedInt { - int val; + [[maybe_unused]] int val; }; using ValidFormatArg = AZStd::string::_Format_Internal::ValidFormatArg; @@ -1751,6 +1751,7 @@ namespace UnitTest static constexpr basic_string_view elementView1(compileTimeString1); static constexpr basic_string_view elementView2(compileTimeString2); static_assert(elementView1.data(), "string_view.data() should be non-nullptr"); + static_assert(elementView2.data(), "string_view.data() should be non-nullptr"); } TYPED_TEST(BasicStringViewConstexprFixture, StringView_SizeOperatorsConstexpr) @@ -1779,7 +1780,7 @@ namespace UnitTest { using TypeParam = char; // null terminated compile time string - auto MakeCompileTimeString1 = []() constexpr -> const TypeParam* + [[maybe_unused]] auto MakeCompileTimeString1 = []() constexpr -> const TypeParam* { return "HelloWorld"; }; @@ -2131,7 +2132,6 @@ namespace UnitTest constexpr AZStd::fixed_string<128> test3{ AZStd::fixed_string<128>{}.insert(0, "Brown") }; constexpr AZStd::fixed_string<128> test4{ AZStd::fixed_string<128>{ "App" }.insert(0, AZStd::string_view("Blue")) }; constexpr AZStd::fixed_string<128> test5{ AZStd::fixed_string<128>{ "App" }.insert(0, test1, 2, 2) }; - constexpr AZStd::string_view redView("Red"); constexpr AZStd::fixed_string<128> test6{ AZStd::fixed_string<128>{ "App" }.insert(size_t(0), 5, 'X') }; constexpr AZStd::fixed_string<128> test7{ AZStd::fixed_string<128>{ "App" }.insert(0, "GreenTea", 5) }; auto MakeFixedStringWithInsertWithIteratorPos1 = []() constexpr diff --git a/Code/Framework/AzCore/Tests/Math/ShapeIntersectionTests.cpp b/Code/Framework/AzCore/Tests/Math/ShapeIntersectionTests.cpp index 659febf564..e7980af781 100644 --- a/Code/Framework/AzCore/Tests/Math/ShapeIntersectionTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/ShapeIntersectionTests.cpp @@ -117,9 +117,6 @@ namespace UnitTest EXPECT_TRUE(AZ::ShapeIntersection::Classify(frustum, s2) == AZ::IntersectResult::Exterior); } - AZ::Vector3 axisX = AZ::Vector3::CreateAxisX(); - AZ::Vector3 axisY = AZ::Vector3::CreateAxisY(); - AZ::Vector3 axisZ = AZ::Vector3::CreateAxisZ(); { AZ::Obb obb = AZ::Obb::CreateFromPositionRotationAndHalfLengths( AZ::Vector3(0.0f, -3.9f, 0.0f), AZ::Quaternion::CreateIdentity(), AZ::Vector3::CreateOne()); diff --git a/Code/Framework/AzCore/Tests/Math/SimdMathTests.cpp b/Code/Framework/AzCore/Tests/Math/SimdMathTests.cpp index 4570d79b83..b7b3c9c952 100644 --- a/Code/Framework/AzCore/Tests/Math/SimdMathTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/SimdMathTests.cpp @@ -1414,7 +1414,6 @@ namespace UnitTest typename VectorType::Int32Type testVector = VectorType::ConvertToInt(sourceVector); VectorType::StoreUnaligned(testStoreValues, testVector); - int32_t results[4] = { 0, 1, -1, 2 }; for (int32_t i = 0; i < VectorType::ElementCount; ++i) { EXPECT_THAT(testStoreValues[i], testWholeLoadValues[i]); @@ -1476,7 +1475,6 @@ namespace UnitTest typename VectorType::Int32Type testVector = VectorType::ConvertToIntNearest(sourceVector); VectorType::StoreUnaligned(testStoreValues, testVector); - int32_t results[4] = { 0, 1, -1, 2 }; for (int32_t i = 0; i < VectorType::ElementCount; ++i) { EXPECT_THAT(testStoreValues[i], testWholeLoadValues[i]); diff --git a/Code/Framework/AzCore/Tests/Memory/LeakDetection.cpp b/Code/Framework/AzCore/Tests/Memory/LeakDetection.cpp index ce94ce14f2..b4f129bb48 100644 --- a/Code/Framework/AzCore/Tests/Memory/LeakDetection.cpp +++ b/Code/Framework/AzCore/Tests/Memory/LeakDetection.cpp @@ -76,7 +76,6 @@ namespace UnitTest return true; } - AZ::Debug::DrillerManager* m_drillerManager = nullptr; bool m_leakDetected = false; bool m_leakExpected = false; }; From 847fe108b7769278ca5ac5762338598662eba0fc Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:55:10 -0700 Subject: [PATCH 14/49] Code/Framework/AtomCore Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Framework/AtomCore/Tests/InstanceDatabase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Framework/AtomCore/Tests/InstanceDatabase.cpp b/Code/Framework/AtomCore/Tests/InstanceDatabase.cpp index 7b47a9b99e..5d1edc5a09 100644 --- a/Code/Framework/AtomCore/Tests/InstanceDatabase.cpp +++ b/Code/Framework/AtomCore/Tests/InstanceDatabase.cpp @@ -324,7 +324,7 @@ namespace UnitTest // Tests whether the deleter actually calls delete properly without // a parent database. - instance->m_onDeleteCallback = [this, &m_deleted]() + instance->m_onDeleteCallback = [&m_deleted]() { m_deleted = true; }; From 4efaafeb96bb837937456f67190def7cf0798a64 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:55:28 -0700 Subject: [PATCH 15/49] Code/Framework/AzFramework Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Framework/AzFramework/Tests/Scene.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Code/Framework/AzFramework/Tests/Scene.cpp b/Code/Framework/AzFramework/Tests/Scene.cpp index 0f701f3190..31df6e6774 100644 --- a/Code/Framework/AzFramework/Tests/Scene.cpp +++ b/Code/Framework/AzFramework/Tests/Scene.cpp @@ -230,7 +230,7 @@ namespace SceneUnitTest // Check to make sure there are no more active scenes. size_t index = 0; - m_sceneSystem->IterateActiveScenes([&index, &scenes](const AZStd::shared_ptr&) + m_sceneSystem->IterateActiveScenes([&index](const AZStd::shared_ptr&) { index++; return true; @@ -251,7 +251,7 @@ namespace SceneUnitTest scenes[i].reset(); } index = 0; - m_sceneSystem->IterateZombieScenes([&index, &scenes](Scene&) { + m_sceneSystem->IterateZombieScenes([&index](Scene&) { index++; return true; }); From ece541b79f1d9f9de56869d577d01df3f01fb143 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:55:54 -0700 Subject: [PATCH 16/49] Code/Framework/AzManipulatorTestFramework Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../AzManipulatorTestFramework/Tests/GridSnappingTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Framework/AzManipulatorTestFramework/Tests/GridSnappingTest.cpp b/Code/Framework/AzManipulatorTestFramework/Tests/GridSnappingTest.cpp index c824ddc766..12b2a6546c 100644 --- a/Code/Framework/AzManipulatorTestFramework/Tests/GridSnappingTest.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Tests/GridSnappingTest.cpp @@ -71,7 +71,7 @@ namespace UnitTest // callback to update the manipulator's current position linearManipulator->InstallMouseMoveCallback( - [this, linearManipulator](const AzToolsFramework::LinearManipulator::Action& action) + [linearManipulator](const AzToolsFramework::LinearManipulator::Action& action) { linearManipulator->SetLocalPosition(action.LocalPosition()); }); From 657853c093bf63723c15e8463f8aaa1550702c33 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:56:09 -0700 Subject: [PATCH 17/49] Code/Framework/AzNetworking Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Framework/AzNetworking/AzNetworking/Utilities/Endian.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Code/Framework/AzNetworking/AzNetworking/Utilities/Endian.h b/Code/Framework/AzNetworking/AzNetworking/Utilities/Endian.h index 67165c380d..df6dd87494 100644 --- a/Code/Framework/AzNetworking/AzNetworking/Utilities/Endian.h +++ b/Code/Framework/AzNetworking/AzNetworking/Utilities/Endian.h @@ -14,14 +14,14 @@ #include #if AZ_TRAIT_NEEDS_HTONLL -const uint64_t htonll(uint64_t value) +inline static const uint64_t htonll(uint64_t value) { const uint32_t hiValue = htonl(static_cast(value >> 32)); const uint32_t loValue = htonl(static_cast(value & 0x00000000FFFFFFFF)); return static_cast(hiValue) << 32 | static_cast(loValue); } -const uint64_t ntohll(uint64_t value) +inline static const uint64_t ntohll(uint64_t value) { return htonll(value); } From fbbcdfd3cae605a7797c079b2d3453a309494008 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:56:25 -0700 Subject: [PATCH 18/49] Code/Framework/AzQtComponents Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../AzQtComponents/AzQtComponents/Gallery/SpinBoxPage.cpp | 6 +++--- .../AzQtComponents/AzQtComponents/Gallery/TabWidgetPage.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Gallery/SpinBoxPage.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Gallery/SpinBoxPage.cpp index 0ee5d90d38..1ee8daf786 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Gallery/SpinBoxPage.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Gallery/SpinBoxPage.cpp @@ -146,7 +146,7 @@ AzQtComponents::SpinBox::setHasError(doubleSpinBox, true); { QAction* action = new QAction("Up", this); action->setShortcut(QKeySequence(Qt::Key_Up)); - connect(action, &QAction::triggered, [this]() + connect(action, &QAction::triggered, []() { qDebug() << "Up pressed"; }); @@ -155,7 +155,7 @@ AzQtComponents::SpinBox::setHasError(doubleSpinBox, true); { QAction* action = new QAction("Down", this); action->setShortcut(QKeySequence(Qt::Key_Down)); - connect(action, &QAction::triggered, [this]() + connect(action, &QAction::triggered, []() { qDebug() << "Down pressed"; }); @@ -171,7 +171,7 @@ template void SpinBoxPage::track(SpinBoxType* spinBox) { // connect to changes in the spinboxes and listen for the undo state - QObject::connect(spinBox, &SpinBoxType::valueChangeBegan, this, [this, spinBox]() { + QObject::connect(spinBox, &SpinBoxType::valueChangeBegan, this, [spinBox]() { ValueType oldValue = spinBox->value(); spinBox->setProperty("OldValue", oldValue); }); diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Gallery/TabWidgetPage.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Gallery/TabWidgetPage.cpp index 9059e910a3..6e553e7436 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Gallery/TabWidgetPage.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Gallery/TabWidgetPage.cpp @@ -36,17 +36,17 @@ TabWidgetPage::TabWidgetPage(QWidget* parent) menu->addAction("Action 4 (No-op)"); actionMenu->setMenu(menu); - connect(action1, &QAction::triggered, this, [this]() { + connect(action1, &QAction::triggered, this, []() { QMessageBox messageBox({}, "Action 1 triggered", "Action 1 has been triggered", QMessageBox::Ok); messageBox.exec(); }); - connect(action2, &QAction::triggered, this, [this]() { + connect(action2, &QAction::triggered, this, []() { QMessageBox messageBox({}, "Action 2 triggered", "Action 2 has been triggered", QMessageBox::Ok); messageBox.exec(); }); - connect(action3, &QAction::triggered, this, [this]() { + connect(action3, &QAction::triggered, this, []() { QMessageBox messageBox({}, "Action 3 triggered", "Action 3 has been triggered", QMessageBox::Ok); messageBox.exec(); }); From 257557c69291c2dfe9b3e537791576e520ab74dc Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:56:42 -0700 Subject: [PATCH 19/49] Code/Framework/AzToolsFramework Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Archive/ArchiveComponent.cpp | 2 +- .../Views/AssetBrowserFolderWidget.cpp | 2 +- .../AssetEditor/AssetEditorWidget.cpp | 6 +++--- .../UI/Logging/LogPanel_Panel.cpp | 1 - .../UI/PropertyEditor/ComponentEditor.cpp | 2 +- .../UI/PropertyEditor/ComponentEditor.hxx | 1 - .../PropertyEditor/PropertyBoolComboBoxCtrl.cpp | 16 ++++++++-------- .../UI/PropertyEditor/PropertyCRCCtrl.cpp | 8 ++++---- .../UI/PropertyEditor/PropertyColorCtrl.cpp | 16 ++++++++-------- .../PropertyEditor/PropertyDoubleSliderCtrl.cpp | 16 ++++++++-------- .../UI/PropertyEditor/PropertyDoubleSpinCtrl.cpp | 16 ++++++++-------- .../UI/PropertyEditor/PropertyEntityIdCtrl.cpp | 4 ++-- .../PropertyStringLineEditCtrl.cpp | 8 ++++---- 13 files changed, 48 insertions(+), 50 deletions(-) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Archive/ArchiveComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Archive/ArchiveComponent.cpp index 2a09ba0471..5004108132 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Archive/ArchiveComponent.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Archive/ArchiveComponent.cpp @@ -236,7 +236,7 @@ namespace AzToolsFramework { AZStd::string commandLineArgs = Platform::GetListFilesInArchiveCommand(archivePath); - auto parseOutput = [respCallback, taskHandle, &fileEntries](bool exitCode, AZStd::string consoleOutput) + auto parseOutput = [respCallback, &fileEntries](bool exitCode, AZStd::string consoleOutput) { Platform::ParseConsoleOutputFromListFilesInArchive(consoleOutput, fileEntries); AZ::TickBus::QueueFunction(respCallback, exitCode, AZStd::move(consoleOutput)); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserFolderWidget.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserFolderWidget.cpp index 7e2b0859a6..d918cad2a2 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserFolderWidget.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserFolderWidget.cpp @@ -81,7 +81,7 @@ namespace AzToolsFramework mainLayout->addWidget(m_viewStack); - connect(actionGroup, &QActionGroup::triggered, this, [this, thumbnailViewAction, listViewAction, sizeComboBox](QAction* action) { + connect(actionGroup, &QActionGroup::triggered, this, [this, thumbnailViewAction, sizeComboBox](QAction* action) { if (action == thumbnailViewAction) { m_viewStack->setCurrentWidget(m_thumbnailView); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetEditor/AssetEditorWidget.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetEditor/AssetEditorWidget.cpp index 744b87d753..7198ed1be8 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetEditor/AssetEditorWidget.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetEditor/AssetEditorWidget.cpp @@ -57,7 +57,7 @@ namespace AzToolsFramework { using AssetCheckoutCallback = AZStd::function; - void AssetCheckoutCommon(const AZ::Data::AssetId& id, AZ::Data::Asset asset, AZ::SerializeContext* serializeContext, AssetCheckoutCallback assetCheckoutAndSaveCallback) + void AssetCheckoutCommon(const AZ::Data::AssetId& id, AZ::Data::Asset asset, [[maybe_unused]] AZ::SerializeContext* serializeContext, AssetCheckoutCallback assetCheckoutAndSaveCallback) { AZStd::string assetPath; AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetPath, &AZ::Data::AssetCatalogRequests::GetAssetPathById, id); @@ -74,7 +74,7 @@ namespace AzToolsFramework { using SCCommandBus = SourceControlCommandBus; SCCommandBus::Broadcast(&SCCommandBus::Events::RequestEdit, assetFullPath.c_str(), true, - [id, asset, assetFullPath, serializeContext, assetCheckoutAndSaveCallback](bool /*success*/, const SourceControlFileInfo& info) + [id, asset, assetFullPath, assetCheckoutAndSaveCallback](bool /*success*/, const SourceControlFileInfo& info) { if (!info.IsReadOnly()) { @@ -360,7 +360,7 @@ namespace AzToolsFramework if (savedCallback) { auto conn = AZStd::make_shared(); - *conn = connect(this, &AssetEditorWidget::OnAssetSavedSignal, this, [this, conn, savedCallback]() + *conn = connect(this, &AssetEditorWidget::OnAssetSavedSignal, this, [conn, savedCallback]() { disconnect(*conn); savedCallback(); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/LogPanel_Panel.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/LogPanel_Panel.cpp index 55c42e2535..4fabdfad12 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/LogPanel_Panel.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/LogPanel_Panel.cpp @@ -657,7 +657,6 @@ namespace AzToolsFramework // if we have any elements, the last element is top right aligned: QLayoutItem* pItem = m_children[m_children.size() - 1]; QSize lastItemSize = pItem->minimumSize(); - QPoint topRight = effectiveRect.topRight(); QRect topRightCorner(effectiveRect.topRight() - QPoint(lastItemSize.width(), 0), lastItemSize); pItem->setGeometry(topRightCorner); } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ComponentEditor.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ComponentEditor.cpp index fbbf55d0ad..85676df243 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ComponentEditor.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ComponentEditor.cpp @@ -397,7 +397,7 @@ namespace AzToolsFramework AzQtComponents::CardNotification * notification = CreateNotification(message); const QPushButton * featureButton = notification->addButtonFeature(tr("Continue")); - connect(featureButton, &QPushButton::clicked, this, [this, notification]() + connect(featureButton, &QPushButton::clicked, this, [notification]() { notification->close(); }); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ComponentEditor.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ComponentEditor.hxx index bd44d513fd..b2140868da 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ComponentEditor.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ComponentEditor.hxx @@ -135,7 +135,6 @@ namespace AzToolsFramework QIcon m_warningIcon; ReflectedPropertyEditor* m_propertyEditor = nullptr; - QVBoxLayout* m_mainLayout = nullptr; AZ::SerializeContext* m_serializeContext; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyBoolComboBoxCtrl.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyBoolComboBoxCtrl.cpp index 094204e5a6..4a1e969e41 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyBoolComboBoxCtrl.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyBoolComboBoxCtrl.cpp @@ -93,24 +93,24 @@ namespace AzToolsFramework void BoolPropertyComboBoxHandler::ConsumeAttribute(PropertyBoolComboBoxCtrl* GUI, AZ::u32 attrib, PropertyAttributeReader* attrValue, const char* debugName) { - (void)GUI; - (void)attrib; - (void)attrValue; - (void)debugName; + AZ_UNUSED(GUI); + AZ_UNUSED(attrib); + AZ_UNUSED(attrValue); + AZ_UNUSED(debugName); } void BoolPropertyComboBoxHandler::WriteGUIValuesIntoProperty(size_t index, PropertyBoolComboBoxCtrl* GUI, property_t& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); bool val = GUI->value(); instance = static_cast(val); } bool BoolPropertyComboBoxHandler::ReadValuesIntoGUI(size_t index, PropertyBoolComboBoxCtrl* GUI, const property_t& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); bool val = instance; GUI->setValue(val); return false; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyCRCCtrl.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyCRCCtrl.cpp index 84d7d37585..6a1f1404a1 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyCRCCtrl.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyCRCCtrl.cpp @@ -173,16 +173,16 @@ namespace AzToolsFramework void U32CRCHandler::WriteGUIValuesIntoProperty(size_t index, PropertyCRCCtrl* GUI, AZ::u32& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); AZ::u32 val = GUI->value(); instance = static_cast(val); } bool U32CRCHandler::ReadValuesIntoGUI(size_t index, PropertyCRCCtrl* GUI, const AZ::u32& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); GUI->setValue(instance); return false; } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyColorCtrl.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyColorCtrl.cpp index 2534df50b6..13c5c8bfac 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyColorCtrl.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyColorCtrl.cpp @@ -373,8 +373,8 @@ namespace AzToolsFramework void AZColorPropertyHandler::WriteGUIValuesIntoProperty(size_t index, PropertyColorCtrl* GUI, property_t& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); QColor val = GUI->value(); AZ::Color asAZColor((float)val.redF(), (float)val.greenF(), (float)val.blueF(), (float)val.alphaF()); instance = static_cast(asAZColor); @@ -382,8 +382,8 @@ namespace AzToolsFramework bool AZColorPropertyHandler::ReadValuesIntoGUI(size_t index, PropertyColorCtrl* GUI, const property_t& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); AZ::Vector4 asVector4 = static_cast(instance); QColor asQColor; asQColor.setRedF((qreal)asVector4.GetX()); @@ -410,8 +410,8 @@ namespace AzToolsFramework } void Vector3ColorPropertyHandler::WriteGUIValuesIntoProperty(size_t index, PropertyColorCtrl* GUI, property_t& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); QColor val = GUI->value(); AZ::Vector3 asVector3((float)val.redF(), (float)val.greenF(), (float)val.blueF()); instance = static_cast(asVector3); @@ -419,8 +419,8 @@ namespace AzToolsFramework bool Vector3ColorPropertyHandler::ReadValuesIntoGUI(size_t index, PropertyColorCtrl* GUI, const property_t& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); AZ::Vector3 asVector3 = static_cast(instance); QColor asQColor; asQColor.setRedF((qreal)asVector3.GetX()); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyDoubleSliderCtrl.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyDoubleSliderCtrl.cpp index 0b9120bcce..64ba3b604b 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyDoubleSliderCtrl.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyDoubleSliderCtrl.cpp @@ -305,24 +305,24 @@ namespace AzToolsFramework void doublePropertySliderHandler::WriteGUIValuesIntoProperty(size_t index, PropertyDoubleSliderCtrl* GUI, property_t& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); double val = GUI->value(); instance = static_cast(val); } void floatPropertySliderHandler::WriteGUIValuesIntoProperty(size_t index, PropertyDoubleSliderCtrl* GUI, property_t& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); double val = GUI->value(); instance = static_cast(val); } bool doublePropertySliderHandler::ReadValuesIntoGUI(size_t index, PropertyDoubleSliderCtrl* GUI, const property_t& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); GUI->blockSignals(true); GUI->setValue(instance); GUI->blockSignals(false); @@ -331,8 +331,8 @@ namespace AzToolsFramework bool floatPropertySliderHandler::ReadValuesIntoGUI(size_t index, PropertyDoubleSliderCtrl* GUI, const property_t& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); GUI->blockSignals(true); GUI->setValue(instance); GUI->blockSignals(false); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyDoubleSpinCtrl.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyDoubleSpinCtrl.cpp index 58f1192f7c..6842b50d80 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyDoubleSpinCtrl.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyDoubleSpinCtrl.cpp @@ -363,32 +363,32 @@ namespace AzToolsFramework void doublePropertySpinboxHandler::WriteGUIValuesIntoProperty(size_t index, PropertyDoubleSpinCtrl* GUI, property_t& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); double val = GUI->value() / GUI->multiplier(); instance = static_cast(val); } void floatPropertySpinboxHandler::WriteGUIValuesIntoProperty(size_t index, PropertyDoubleSpinCtrl* GUI, property_t& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); double val = GUI->value() / GUI->multiplier(); instance = static_cast(val); } bool doublePropertySpinboxHandler::ReadValuesIntoGUI(size_t index, PropertyDoubleSpinCtrl* GUI, const property_t& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); GUI->setValue(instance * GUI->multiplier()); return false; } bool floatPropertySpinboxHandler::ReadValuesIntoGUI(size_t index, PropertyDoubleSpinCtrl* GUI, const property_t& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); GUI->setValue(instance * GUI->multiplier()); return false; } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyEntityIdCtrl.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyEntityIdCtrl.cpp index 424a110c49..f98638fd69 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyEntityIdCtrl.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyEntityIdCtrl.cpp @@ -518,8 +518,8 @@ namespace AzToolsFramework void EntityIdPropertyHandler::WriteGUIValuesIntoProperty(size_t index, PropertyEntityIdCtrl* GUI, property_t& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); instance = GUI->GetEntityId(); } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyStringLineEditCtrl.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyStringLineEditCtrl.cpp index ea02e93c96..feb2a9e2ad 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyStringLineEditCtrl.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyStringLineEditCtrl.cpp @@ -142,16 +142,16 @@ namespace AzToolsFramework void StringPropertyLineEditHandler::WriteGUIValuesIntoProperty(size_t index, PropertyStringLineEditCtrl* GUI, property_t& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); AZStd::string val = GUI->value(); instance = static_cast(val); } bool StringPropertyLineEditHandler::ReadValuesIntoGUI(size_t index, PropertyStringLineEditCtrl* GUI, const property_t& instance, InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); AZStd::string val = instance; GUI->setValue(val); return false; From c19c4af1e1b381b4945fed312e1a518acad8c8d0 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:57:02 -0700 Subject: [PATCH 20/49] Gems/Atom Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Code/Source/Compressors/ETC2.cpp | 2 -- .../Code/Source/Converters/ColorChart.cpp | 1 - .../Code/Source/Converters/FIR-Filter.cpp | 14 ++++++------- .../Code/Source/Converters/HighPass.cpp | 3 --- .../Code/Source/ImageLoader/DdsLoader.cpp | 4 ++-- .../Code/Source/Processing/ImageConvert.cpp | 2 -- .../Source/Processing/ImageObjectImpl.cpp | 2 -- .../ImageThumbnailSystemComponent.cpp | 2 +- .../Editor/CommonFiles/Preprocessor.cpp | 3 ++- .../Source/Editor/ShaderBuilderUtility.cpp | 2 +- .../Model/ModelAssetBuilderComponent.cpp | 1 - .../Model/MorphTargetExporter.cpp | 2 -- .../RPI/Code/Tests/Buffer/BufferTests.cpp | 1 - .../Code/Tests/Common/ErrorMessageFinder.cpp | 2 +- .../Code/Tests/Image/StreamingImageTests.cpp | 1 - .../Tests/Material/MaterialAssetTests.cpp | 18 ++++++++--------- .../Material/MaterialSourceDataTests.cpp | 4 ++-- .../Tests/Material/MaterialTypeAssetTests.cpp | 20 +++++++++---------- Gems/Atom/RPI/Code/Tests/Model/ModelTests.cpp | 1 - .../Viewport/RenderViewportWidget.h | 2 -- .../MaterialEditorBrowserInteractions.cpp | 6 +++--- .../Source/Window/MaterialEditorWindow.cpp | 8 ++++---- .../EditorMaterialComponentInspector.cpp | 4 ++-- 23 files changed, 44 insertions(+), 61 deletions(-) diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Compressors/ETC2.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Compressors/ETC2.cpp index 9c002952be..0c3d6dca3d 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Compressors/ETC2.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Compressors/ETC2.cpp @@ -115,8 +115,6 @@ namespace ImageProcessingAtom IImageObjectPtr ETC2Compressor::CompressImage(IImageObjectPtr srcImage, EPixelFormat fmtDst, const CompressOption* compressOption) const { - const size_t srcPixelSize = 4; - //validate input EPixelFormat fmtSrc = srcImage->GetPixelFormat(); diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/ColorChart.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/ColorChart.cpp index 0b06e00a9f..b6e9cf4c8c 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/ColorChart.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/ColorChart.cpp @@ -133,7 +133,6 @@ namespace ImageProcessingAtom IImageObjectPtr C3dLutColorChart::GenerateChartImage() { - const AZ::u32 mipCount = 1; IImageObjectPtr image(IImageObject::CreateImage(ePS_Red* ePS_Blue, ePS_Green, 1, ePixelFormat_R8G8B8A8)); { diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/FIR-Filter.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/FIR-Filter.cpp index 0bfdf6d672..0387ec5c7b 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/FIR-Filter.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/FIR-Filter.cpp @@ -209,18 +209,18 @@ namespace ImageProcessingAtom /* addition of c-pointers already takes care of datatype-sizes */ \ const signed long int dy = /*parm->mirror ? -1 :*/ 1; \ const unsigned int stridei = parm->incols * 1 * 1; \ - const unsigned int stridet = parm->subcols * 1 * 1; \ - const unsigned int strideo = parm->outcols * 1 * 1; \ + [[maybe_unused]] const unsigned int stridet = parm->subcols * 1 * 1; \ + [[maybe_unused]] const unsigned int strideo = parm->outcols * 1 * 1; \ /* offset and shift calculations still require the unmodified values */ \ const unsigned int strideiraw = parm->incols; \ - const unsigned int stridetraw = parm->subcols; \ + [[maybe_unused]] const unsigned int stridetraw = parm->subcols; \ const unsigned int strideoraw = parm->outcols; \ \ class Plane2D tmp(tmpcols, tmprows, 4); \ dtyp*** t = (dtyp***)tmp; \ int srcPos, dstPos; \ - bool plusminush = false; const bool of = true; \ - bool plusminusv = false; const bool nc = false; \ + bool plusminush = false; [[maybe_unused]] const bool of = true; \ + bool plusminusv = false; [[maybe_unused]] const bool nc = false; \ FilterWeights* fwh = calculateFilterWeights(parm->resample.colrem, parm->caged ? 0 : 0 - parm->region.subtop, parm->caged ? srccols : parm->subrows - parm->region.subtop, \ parm->resample.colquo, 0, dstcols, reps, parm->resample.colblur, parm->resample.wf, parm->resample.operation != eWindowEvaluation_Sum, plusminush); \ FilterWeights* fwv = calculateFilterWeights(parm->resample.rowrem, parm->caged ? 0 : 0 - parm->region.intop, parm->caged ? srcrows : parm->inrows - parm->region.intop, \ @@ -833,7 +833,7 @@ namespace ImageProcessingAtom #define filterRowFetch(srcOffs, srcSize, srcSkip, dstOffs, dstSize, dstSkip) \ /* vertical stride, horizontal fetch */ \ - getCxNFromStreamSwapped(srcSkip, i); \ + /* getCxNFromStreamSwapped(srcSkip, i); Expands to nothing */ \ getCxNFromStream(srcSkip, i); \ getCxNFromPlane(1); \ \ @@ -935,7 +935,7 @@ namespace ImageProcessingAtom comcpyCHistogram(); \ \ /* horizontal stride, vertical store */ \ - putCxNToStreamSwapped(dstSkip, o); \ + /* putCxNToStreamSwapped(dstSkip, o); Expands to nothing */ \ putCxNToStream(dstSkip, o); \ putCxNToPlane(1); \ \ diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/HighPass.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/HighPass.cpp index eefd5332be..e2071fb586 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/HighPass.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/HighPass.cpp @@ -58,9 +58,6 @@ namespace ImageProcessingAtom // linear interpolation FilterImage(MipGenType::triangle, MipGenEvalType::sum, 0.0f, 0.0f, m_img, dwMipDown, newImage, dstMip, NULL, NULL); - const AZ::u32 pixelCountIn = m_img->GetWidth(dstMip) * m_img->GetHeight(dstMip); - const AZ::u32 pixelCountOut = newImage->GetWidth(dstMip) * newImage->GetHeight(dstMip); - //substraction AZ::u8* srcPixelBuf; AZ::u32 srcPitch; diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageLoader/DdsLoader.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageLoader/DdsLoader.cpp index b9054a9911..20367227bd 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageLoader/DdsLoader.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageLoader/DdsLoader.cpp @@ -87,7 +87,7 @@ namespace ImageProcessingAtom if (dxgiFormat != DXGI_FORMAT_UNKNOWN) { int i = 0; - for (i; i < ePixelFormat_Count; i++) + for (; i < ePixelFormat_Count; i++) { const PixelFormatInfo* info = CPixelFormats::GetInstance().GetPixelFormatInfo((EPixelFormat)i); if (static_cast(info->d3d10Format) == dxgiFormat) @@ -506,7 +506,7 @@ namespace ImageProcessingAtom if (dxgiFormat != DXGI_FORMAT_UNKNOWN) { uint32_t i = 0; - for (i; i < ePixelFormat_Count; i++) + for (; i < ePixelFormat_Count; i++) { const PixelFormatInfo* info = CPixelFormats::GetInstance().GetPixelFormatInfo((EPixelFormat)i); if (static_cast(info->d3d10Format) == dxgiFormat) diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.cpp index 9abb6de300..3f28e89334 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.cpp @@ -603,8 +603,6 @@ namespace ImageProcessingAtom const bool isCompressing = isSourceFormatUncompressed ? true : false; const EPixelFormat outputFormat = isCompressing ? destinationFormat : sourceFormat; - const uint32_t imageWidth = m_image->Get()->GetWidth(0); - const uint32_t imageHeight = m_image->Get()->GetHeight(0); ICompressorPtr compressor = ICompressor::FindCompressor(outputFormat, m_input->m_presetSetting.m_destColorSpace, isCompressing); // find out if the compressor has a preference to any specific colorspace diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageObjectImpl.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageObjectImpl.cpp index fd3923d7bf..8504f5e074 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageObjectImpl.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageObjectImpl.cpp @@ -241,8 +241,6 @@ namespace ImageProcessingAtom // clone this image-object's contents IImageObject* CImageObject::Clone(uint32_t maxMipCount) const { - const EPixelFormat srcPixelformat = GetPixelFormat(); - IImageObject* outImage = AllocateImage(maxMipCount); AZ::u32 mips = outImage->GetMipCount(); diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Thumbnail/ImageThumbnailSystemComponent.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Thumbnail/ImageThumbnailSystemComponent.cpp index 7e4d29e23c..5a41411d86 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Thumbnail/ImageThumbnailSystemComponent.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Thumbnail/ImageThumbnailSystemComponent.cpp @@ -180,7 +180,7 @@ namespace ImageProcessingAtom // Dispatch event on main thread AZ::SystemTickBus::QueueFunction( [ - thumbnailKey, thumbnailSize, + thumbnailKey, pixmap = QPixmap::fromImage(image.scaled(QSize(thumbnailSize, thumbnailSize), Qt::KeepAspectRatio, Qt::SmoothTransformation)) ]() mutable { diff --git a/Gems/Atom/Asset/Shader/Code/Source/Editor/CommonFiles/Preprocessor.cpp b/Gems/Atom/Asset/Shader/Code/Source/Editor/CommonFiles/Preprocessor.cpp index 9c77ae6b35..9c1b3a78ca 100644 --- a/Gems/Atom/Asset/Shader/Code/Source/Editor/CommonFiles/Preprocessor.cpp +++ b/Gems/Atom/Asset/Shader/Code/Source/Editor/CommonFiles/Preprocessor.cpp @@ -154,7 +154,8 @@ namespace AZ // Remark: for MacOS & Linux it is important to call va_start again before // each call to azvsnprintf. Not required for Windows. va_start(args, format); - count = azvscprintf(format, args) + 1; // vscprintf returns a size that doesn't include the null character. + count = azvscprintf(format, args); + count += 1; // vscprintf returns a size that doesn't include the null character. va_end(args); biggerData.reset(new char[count]); diff --git a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderBuilderUtility.cpp b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderBuilderUtility.cpp index 0018f2ead8..450631eaae 100644 --- a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderBuilderUtility.cpp +++ b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderBuilderUtility.cpp @@ -517,7 +517,7 @@ namespace AZ { // Search the function name into the list of valid entry points into the shader. auto findId = - AZStd::find_if(shaderEntryPoints.begin(), shaderEntryPoints.end(), [&functionName, &mask](const auto& item) { + AZStd::find_if(shaderEntryPoints.begin(), shaderEntryPoints.end(), [&functionName](const auto& item) { return item.first == functionName; }); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelAssetBuilderComponent.cpp b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelAssetBuilderComponent.cpp index 13e5714b52..5fcbcd7180 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelAssetBuilderComponent.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelAssetBuilderComponent.cpp @@ -959,7 +959,6 @@ namespace AZ size_t numInfluencesAdded = 0; for (const auto& skinData : sourceMesh.m_skinData) { - const size_t numJoints = skinData->GetBoneCount(); const AZ::u32 controlPointIndex = sourceMeshData->GetControlPointIndex(static_cast(vertexIndex)); const size_t numSkinInfluences = skinData->GetLinkCount(controlPointIndex); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/MorphTargetExporter.cpp b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/MorphTargetExporter.cpp index fa437c002f..44141f3ae3 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/MorphTargetExporter.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/MorphTargetExporter.cpp @@ -149,8 +149,6 @@ namespace AZ::RPI const float tolerance = CalcPositionDeltaTolerance(sourceMesh); AZ::Aabb deltaPositionAabb = AZ::Aabb::CreateNull(); - const uint32_t numFaces = blendShapeData->GetFaceCount(); - AZStd::vector& packedCompressedMorphTargetVertexData = productMesh.m_morphTargetVertexData; MorphTargetMetaAsset::MorphTarget metaData; diff --git a/Gems/Atom/RPI/Code/Tests/Buffer/BufferTests.cpp b/Gems/Atom/RPI/Code/Tests/Buffer/BufferTests.cpp index f648de6997..a2f478901c 100644 --- a/Gems/Atom/RPI/Code/Tests/Buffer/BufferTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Buffer/BufferTests.cpp @@ -616,7 +616,6 @@ namespace UnitTest Data::Asset asset; creator.End(asset); - bufferInfo.m_bufferDescriptor.m_byteCount; Data::Instance bufferInst = RPI::Buffer::FindOrCreate(asset); ASSERT_NE(bufferInst.get(), nullptr); diff --git a/Gems/Atom/RPI/Code/Tests/Common/ErrorMessageFinder.cpp b/Gems/Atom/RPI/Code/Tests/Common/ErrorMessageFinder.cpp index 7ffdffbb14..fa88f145a6 100644 --- a/Gems/Atom/RPI/Code/Tests/Common/ErrorMessageFinder.cpp +++ b/Gems/Atom/RPI/Code/Tests/Common/ErrorMessageFinder.cpp @@ -105,7 +105,7 @@ namespace UnitTest { EXPECT_FALSE(m_disabled); - AZStd::for_each(m_expectedErrors.begin(), m_expectedErrors.end(), [this](ExpectedError& expectedError) { expectedError.m_gotCount = 0; }); + AZStd::for_each(m_expectedErrors.begin(), m_expectedErrors.end(), [](ExpectedError& expectedError) { expectedError.m_gotCount = 0; }); m_checked = false; } diff --git a/Gems/Atom/RPI/Code/Tests/Image/StreamingImageTests.cpp b/Gems/Atom/RPI/Code/Tests/Image/StreamingImageTests.cpp index 3836f5c8f5..345637bfe5 100644 --- a/Gems/Atom/RPI/Code/Tests/Image/StreamingImageTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Image/StreamingImageTests.cpp @@ -490,7 +490,6 @@ namespace UnitTest const uint16_t mipLevels = 1; const uint16_t arraySize = 1; - const uint16_t pixelSize = 4; Data::Asset mipChain; diff --git a/Gems/Atom/RPI/Code/Tests/Material/MaterialAssetTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/MaterialAssetTests.cpp index 0b30b723d6..ce223ceb35 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/MaterialAssetTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/MaterialAssetTests.cpp @@ -267,47 +267,47 @@ namespace UnitTest creator.SetPropertyValue(Name{ "MyBool" }, m_testImageAsset); }); - expectCreatorError([this](MaterialAssetCreator& creator) + expectCreatorError([](MaterialAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyInt" }, 0.0f); }); - expectCreatorError([this](MaterialAssetCreator& creator) + expectCreatorError([](MaterialAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyUInt" }, -1); }); - expectCreatorError([this](MaterialAssetCreator& creator) + expectCreatorError([](MaterialAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyFloat" }, 10u); }); - expectCreatorError([this](MaterialAssetCreator& creator) + expectCreatorError([](MaterialAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyFloat2" }, 1.0f); }); - expectCreatorError([this](MaterialAssetCreator& creator) + expectCreatorError([](MaterialAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyFloat3" }, AZ::Vector4{}); }); - expectCreatorError([this](MaterialAssetCreator& creator) + expectCreatorError([](MaterialAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyFloat4" }, AZ::Vector3{}); }); - expectCreatorError([this](MaterialAssetCreator& creator) + expectCreatorError([](MaterialAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyColor" }, MaterialPropertyValue(false)); }); - expectCreatorError([this](MaterialAssetCreator& creator) + expectCreatorError([](MaterialAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyImage" }, true); }); - expectCreatorError([this](MaterialAssetCreator& creator) + expectCreatorError([](MaterialAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyEnum" }, -1); }); diff --git a/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp index a20d16b0d6..553c3243e1 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp @@ -566,7 +566,7 @@ namespace UnitTest // We use local functions to easily start a new MaterialAssetCreator for each test case because // the AssetCreator would just skip subsequent operations after the first failure is detected. - auto expectError = [this](AZStd::function setOneBadInput, [[maybe_unused]] uint32_t expectedAsserts = 2) + auto expectError = [](AZStd::function setOneBadInput, [[maybe_unused]] uint32_t expectedAsserts = 2) { MaterialSourceData sourceData; @@ -583,7 +583,7 @@ namespace UnitTest EXPECT_FALSE(materialAssetOutcome.IsSuccess()); }; - auto expectWarning = [this](AZStd::function setOneBadInput, [[maybe_unused]] uint32_t expectedAsserts = 1) + auto expectWarning = [](AZStd::function setOneBadInput, [[maybe_unused]] uint32_t expectedAsserts = 1) { MaterialSourceData sourceData; diff --git a/Gems/Atom/RPI/Code/Tests/Material/MaterialTypeAssetTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/MaterialTypeAssetTests.cpp index 6b788addc7..e11a049af2 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/MaterialTypeAssetTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/MaterialTypeAssetTests.cpp @@ -413,7 +413,7 @@ namespace UnitTest EXPECT_EQ(1, creator.GetErrorCount()); }; - auto expectCreatorWarning = [this](AZStd::function passBadInput) + auto expectCreatorWarning = [](AZStd::function passBadInput) { MaterialTypeAssetCreator creator; creator.Begin(Uuid::CreateRandom()); @@ -442,47 +442,47 @@ namespace UnitTest creator.SetPropertyValue(Name{ "MyBool" }, m_testImageAsset); }); - expectCreatorError([this](MaterialTypeAssetCreator& creator) + expectCreatorError([](MaterialTypeAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyInt" }, 0.0f); }); - expectCreatorError([this](MaterialTypeAssetCreator& creator) + expectCreatorError([](MaterialTypeAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyUInt" }, -1); }); - expectCreatorError([this](MaterialTypeAssetCreator& creator) + expectCreatorError([](MaterialTypeAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyFloat" }, 10u); }); - expectCreatorError([this](MaterialTypeAssetCreator& creator) + expectCreatorError([](MaterialTypeAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyFloat2" }, 1.0f); }); - expectCreatorError([this](MaterialTypeAssetCreator& creator) + expectCreatorError([](MaterialTypeAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyFloat3" }, AZ::Vector4{}); }); - expectCreatorError([this](MaterialTypeAssetCreator& creator) + expectCreatorError([](MaterialTypeAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyFloat4" }, AZ::Vector3{}); }); - expectCreatorError([this](MaterialTypeAssetCreator& creator) + expectCreatorError([](MaterialTypeAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyColor" }, MaterialPropertyValue(false)); }); - expectCreatorError([this](MaterialTypeAssetCreator& creator) + expectCreatorError([](MaterialTypeAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyImage" }, true); }); - expectCreatorError([this](MaterialTypeAssetCreator& creator) + expectCreatorError([](MaterialTypeAssetCreator& creator) { creator.SetPropertyValue(Name{ "MyEnum" }, -1); }); diff --git a/Gems/Atom/RPI/Code/Tests/Model/ModelTests.cpp b/Gems/Atom/RPI/Code/Tests/Model/ModelTests.cpp index ff998ad4d3..7b07e14de0 100644 --- a/Gems/Atom/RPI/Code/Tests/Model/ModelTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Model/ModelTests.cpp @@ -783,7 +783,6 @@ namespace UnitTest const uint32_t vertexCount = 36; const uint32_t vertexSize = sizeof(float) * 3; - const uint32_t vertexBufferSize = vertexCount * vertexSize; RHI::BufferViewDescriptor validStreamBufferViewDescriptor = RHI::BufferViewDescriptor::CreateStructured(0, vertexCount, vertexSize); diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h index bb26e116af..1dad34cdb5 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h @@ -160,8 +160,6 @@ namespace AtomToolsFramework QElapsedTimer m_renderTimer; // The time of the last recorded tick event from the system tick bus. AZ::ScriptTimePoint m_time; - // Whether the Viewport is currently hiding and capturing the cursor position. - bool m_capturingCursor = false; // The viewport settings (e.g. grid snapping, grid size) for this viewport. const AzToolsFramework::ViewportInteraction::ViewportSettings* m_viewportSettings = nullptr; // Maps our internal Qt events into AzFramework InputChannels for our ViewportControllerList. diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorBrowserInteractions.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorBrowserInteractions.cpp index 3440d9c316..e6ffd2842f 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorBrowserInteractions.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorBrowserInteractions.cpp @@ -125,7 +125,7 @@ namespace MaterialEditor QDesktopServices::openUrl(QUrl::fromLocalFile(entry->GetFullPath().c_str())); }); - menu->addAction("Duplicate...", [entry, caller]() + menu->addAction("Duplicate...", [entry]() { const QFileInfo duplicateFileInfo(AtomToolsFramework::GetDuplicationFileInfo(entry->GetFullPath().c_str())); if (!duplicateFileInfo.absoluteFilePath().isEmpty()) @@ -156,7 +156,7 @@ namespace MaterialEditor AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Broadcast(&AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Events::OpenDocument, entry->GetFullPath()); }); - menu->addAction("Duplicate...", [entry, caller]() + menu->addAction("Duplicate...", [entry]() { const QFileInfo duplicateFileInfo(AtomToolsFramework::GetDuplicationFileInfo(entry->GetFullPath().c_str())); if (!duplicateFileInfo.absoluteFilePath().isEmpty()) @@ -285,7 +285,7 @@ namespace MaterialEditor }); // add get latest action - m_getLatestAction = sourceControlMenu->addAction("Get Latest", [path, this]() + m_getLatestAction = sourceControlMenu->addAction("Get Latest", [path]() { SourceControlCommandBus::Broadcast(&SourceControlCommandBus::Events::RequestLatest, path.c_str(), [](bool, const SourceControlFileInfo&) {}); diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindow.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindow.cpp index 8922591580..4c742d4ee1 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindow.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindow.cpp @@ -304,7 +304,7 @@ namespace MaterialEditor } }, QKeySequence::New); - m_actionOpen = m_menuFile->addAction("&Open...", [this]() { + m_actionOpen = m_menuFile->addAction("&Open...", []() { const AZStd::vector assetTypes = { azrtti_typeid() }; const AZStd::string filePath = AtomToolsFramework::GetOpenFileInfo(assetTypes).absoluteFilePath().toUtf8().constData(); if (!filePath.empty()) @@ -369,7 +369,7 @@ namespace MaterialEditor AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Broadcast(&AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Events::CloseDocument, documentId); }, QKeySequence::Close); - m_actionCloseAll = m_menuFile->addAction("Close All", [this]() { + m_actionCloseAll = m_menuFile->addAction("Close All", []() { AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Broadcast(&AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Events::CloseAllDocuments); }); @@ -436,7 +436,7 @@ namespace MaterialEditor SetDockWidgetVisible(label, !IsDockWidgetVisible(label)); }); - m_actionConsole = m_menuView->addAction("&Console", [this]() { + m_actionConsole = m_menuView->addAction("&Console", []() { }); m_actionPythonTerminal = m_menuView->addAction("Python &Terminal", [this]() { @@ -471,7 +471,7 @@ namespace MaterialEditor dialog.exec(); }); - m_actionAbout = m_menuHelp->addAction("&About...", [this]() { + m_actionAbout = m_menuHelp->addAction("&About...", []() { }); } diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentInspector.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentInspector.cpp index f4c255d774..b9a4adc068 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentInspector.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentInspector.cpp @@ -214,7 +214,7 @@ namespace AZ groupNameId.c_str())); auto propertyGroupWidget = new AtomToolsFramework::InspectorPropertyGroupWidget( &group, &group, group.TYPEINFO_Uuid(), this, this, saveStateKey, - [this](const AzToolsFramework::InstanceDataNode* source, const AzToolsFramework::InstanceDataNode* target) { + [](const AzToolsFramework::InstanceDataNode* source, const AzToolsFramework::InstanceDataNode* target) { AZ_UNUSED(source); const AtomToolsFramework::DynamicProperty* property = AtomToolsFramework::FindDynamicPropertyForInstanceDataNode(target); return property && AtomToolsFramework::ArePropertyValuesEqual(property->GetValue(), property->GetConfig().m_parentValue); @@ -267,7 +267,7 @@ namespace AZ groupNameId.c_str())); auto propertyGroupWidget = new AtomToolsFramework::InspectorPropertyGroupWidget( &group, &group, group.TYPEINFO_Uuid(), this, this, saveStateKey, - [this](const AzToolsFramework::InstanceDataNode* source, const AzToolsFramework::InstanceDataNode* target) { + [](const AzToolsFramework::InstanceDataNode* source, const AzToolsFramework::InstanceDataNode* target) { AZ_UNUSED(source); const AtomToolsFramework::DynamicProperty* property = AtomToolsFramework::FindDynamicPropertyForInstanceDataNode(target); return property && AtomToolsFramework::ArePropertyValuesEqual(property->GetValue(), property->GetConfig().m_parentValue); From ff0f85e031e5660259d8925817e45694b59ca9ab Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:57:35 -0700 Subject: [PATCH 21/49] Gems/AWS Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Source/Editor/Attribution/AWSCoreAttributionManager.cpp | 4 ++-- .../AWSGameLiftServer/Tests/AWSGameLiftServerManagerTest.cpp | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionManager.cpp b/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionManager.cpp index 85dd1469cb..712c083e7a 100644 --- a/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionManager.cpp +++ b/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionManager.cpp @@ -298,7 +298,7 @@ namespace AWSCore { AZ::ModuleManagerRequestBus::Broadcast( &AZ::ModuleManagerRequestBus::Events::EnumerateModules, - [this, &gems](const AZ::ModuleData& moduleData) + [&gems](const AZ::ModuleData& moduleData) { AZ::Entity* moduleEntity = moduleData.GetEntity(); auto moduleEntityName = moduleEntity->GetName(); @@ -338,7 +338,7 @@ namespace AWSCore AZ_Printf("AWSAttributionManager", "AWSAttribution metric submit success"); }, - [this]([[maybe_unused]] ServiceAPI::AWSAttributionRequestJob* failJob) + []([[maybe_unused]] ServiceAPI::AWSAttributionRequestJob* failJob) { AZ_Error("AWSAttributionManager", false, "Metrics send error: %s", failJob->error.message.c_str()); }, diff --git a/Gems/AWSGameLift/Code/AWSGameLiftServer/Tests/AWSGameLiftServerManagerTest.cpp b/Gems/AWSGameLift/Code/AWSGameLiftServer/Tests/AWSGameLiftServerManagerTest.cpp index a0b8f2e495..e0a7caba24 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftServer/Tests/AWSGameLiftServerManagerTest.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftServer/Tests/AWSGameLiftServerManagerTest.cpp @@ -398,7 +398,6 @@ namespace UnitTest .WillOnce(Return(successOutcome)); AZStd::vector testThreadPool; - AZStd::atomic trueCount = 0; AZ_TEST_START_TRACE_SUPPRESSION; for (int index = 0; index < testThreadNumber; index++) { From 303be51957d4b65e334938c663dcdf5d1fdcec2b Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:58:13 -0700 Subject: [PATCH 22/49] Gems/Camera Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Gems/Camera/Code/Source/ViewportCameraSelectorWindow_Internals.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Gems/Camera/Code/Source/ViewportCameraSelectorWindow_Internals.h b/Gems/Camera/Code/Source/ViewportCameraSelectorWindow_Internals.h index 2c3d114908..b07ae7789f 100644 --- a/Gems/Camera/Code/Source/ViewportCameraSelectorWindow_Internals.h +++ b/Gems/Camera/Code/Source/ViewportCameraSelectorWindow_Internals.h @@ -58,7 +58,6 @@ namespace Camera private: AZStd::vector m_cameraItems; AZ::EntityId m_sequenceCameraEntityId; - bool m_sequenceCameraSelected; }; struct ViewportCameraSelectorWindow From 62439e03fb90e919687b2a05d89d617ef14b7e77 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:58:32 -0700 Subject: [PATCH 23/49] Gems/EditorPythonBindings Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Code/Source/PythonMarshalComponent.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Gems/EditorPythonBindings/Code/Source/PythonMarshalComponent.cpp b/Gems/EditorPythonBindings/Code/Source/PythonMarshalComponent.cpp index 257df31778..fd12635325 100644 --- a/Gems/EditorPythonBindings/Code/Source/PythonMarshalComponent.cpp +++ b/Gems/EditorPythonBindings/Code/Source/PythonMarshalComponent.cpp @@ -697,14 +697,12 @@ namespace EditorPythonBindings class TypeConverterDictionary final : public PythonMarshalComponent::TypeConverter { - AZ::GenericClassInfo* m_genericClassInfo = nullptr; const AZ::SerializeContext::ClassData* m_classData = nullptr; const AZ::TypeId m_typeId = {}; public: - TypeConverterDictionary(AZ::GenericClassInfo* genericClassInfo, const AZ::SerializeContext::ClassData* classData, const AZ::TypeId& typeId) - : m_genericClassInfo(genericClassInfo) - , m_classData(classData) + TypeConverterDictionary([[maybe_unused]] AZ::GenericClassInfo* genericClassInfo, const AZ::SerializeContext::ClassData* classData, const AZ::TypeId& typeId) + : m_classData(classData) , m_typeId(typeId) { } From 794d656c662b2f5146a9a2b2491eb43f8027e12e Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:58:50 -0700 Subject: [PATCH 24/49] Gems/EMotionFX Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../EMotionFX/Pipeline/RCExt/Actor/ActorGroupExporter.cpp | 1 - Gems/EMotionFX/Code/EMotionFX/Rendering/Common/RenderUtil.cpp | 2 -- .../Tools/EMotionStudio/EMStudioSDK/Source/FileManager.h | 2 -- .../Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.h | 3 --- .../EMotionStudio/EMStudioSDK/Source/MainWindowEventFilter.h | 2 +- .../Plugins/StandardPlugins/Source/AnimGraph/AnimGraphModel.h | 2 +- .../Source/AnimGraph/BlendSpace1DNodeWidget.cpp | 2 -- .../StandardPlugins/Source/AnimGraph/ParameterWindow.cpp | 1 - .../StandardPlugins/Source/AnimGraph/ParameterWindow.h | 1 - .../StandardPlugins/Source/Attachments/AttachmentsPlugin.h | 1 - .../Source/MorphTargetsWindow/MorphTargetsWindowPlugin.h | 1 - .../Source/MotionEvents/MotionEventsPlugin.cpp | 1 - .../StandardPlugins/Source/MotionEvents/MotionEventsPlugin.h | 1 - .../Source/MotionSetsWindow/MotionSetWindow.cpp | 2 -- .../StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.h | 1 - .../Source/MotionWindow/MotionExtractionWindow.h | 1 - .../Source/MotionWindow/MotionRetargetingWindow.h | 2 -- .../StandardPlugins/Source/NodeGroups/NodeGroupWidget.h | 1 - .../StandardPlugins/Source/TimeView/TimeViewToolBar.cpp | 2 +- .../StandardPlugins/Source/TimeView/TrackDataHeaderWidget.cpp | 4 ---- .../Editor/Plugins/SimulatedObject/SimulatedObjectWidget.cpp | 1 - .../Editor/PropertyWidgets/AnimGraphTransitionHandler.cpp | 2 +- .../Integration/Editor/Components/EditorActorComponent.cpp | 1 - .../ProvidesUI/AnimGraph/Transitions/RemoveTransition.cpp | 1 - .../AnimGraph/Transitions/RemoveTransitionCondition.cpp | 1 - 25 files changed, 4 insertions(+), 35 deletions(-) diff --git a/Gems/EMotionFX/Code/EMotionFX/Pipeline/RCExt/Actor/ActorGroupExporter.cpp b/Gems/EMotionFX/Code/EMotionFX/Pipeline/RCExt/Actor/ActorGroupExporter.cpp index efd3d84aa0..4cba50138a 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Pipeline/RCExt/Actor/ActorGroupExporter.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Pipeline/RCExt/Actor/ActorGroupExporter.cpp @@ -163,7 +163,6 @@ namespace EMotionFX } // Default to the first mesh group until we get a way to choose it via the scene settings (ATOM-13590). - AZStd::optional meshAssetId = AZStd::nullopt; AZ_Error("EMotionFX", atomModelAssets.size() <= 1, "Ambigious mesh for actor asset. More than one mesh group found. Defaulting to the first one."); if (!atomModelAssets.empty()) { diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/RenderUtil.cpp b/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/RenderUtil.cpp index 183d56a07f..6fd28ee72f 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/RenderUtil.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/RenderUtil.cpp @@ -519,7 +519,6 @@ namespace MCommon EMotionFX::SubMesh* subMesh = mesh->GetSubMesh(subMeshIndex); const uint32 numVertices = subMesh->GetNumVertices(); const uint32 startVertex = subMesh->GetStartVertex(); - const uint32 startIndex = subMesh->GetStartIndex(); for (uint32 j = 0; j < numVertices; ++j) { @@ -1332,7 +1331,6 @@ namespace MCommon // render mesh based axis void RenderUtil::RenderAxis(float size, const AZ::Vector3& position, const AZ::Vector3& right, const AZ::Vector3& up, const AZ::Vector3& forward) { - const float zeroSphereRadius = size * 0.075f; static const MCore::RGBAColor xAxisColor(1.0f, 0.0f, 0.0f); static const MCore::RGBAColor yAxisColor(0.0f, 1.0f, 0.0f); static const MCore::RGBAColor zAxisColor(0.0f, 0.0f, 1.0f); diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/FileManager.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/FileManager.h index 98d7de188d..9e2b4001b5 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/FileManager.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/FileManager.h @@ -112,8 +112,6 @@ namespace EMStudio QString m_lastWorkspaceFolder; QString m_lastNodeMapFolder; - bool m_skipFileChangedCheck; - void UpdateLastUsedFolder(const char* filename, QString& outLastFolder) const; QString GetLastUsedFolder(const QString& lastUsedFolder) const; }; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.h index 734dd7840d..318838b2b1 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.h @@ -203,9 +203,6 @@ namespace EMStudio QAction* m_saveAllAction; QAction* m_mergeActorAction; QAction* m_saveSelectedActorsAction; -#ifdef EMFX_DEVELOPMENT_BUILD - QAction* m_saveSelectedActorAsAttachmentsAction; -#endif // application mode QComboBox* m_applicationMode; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindowEventFilter.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindowEventFilter.h index c7e82b13e9..144fac4eed 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindowEventFilter.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindowEventFilter.h @@ -27,6 +27,6 @@ namespace EMStudio virtual bool nativeEventFilter(const QByteArray& /*eventType*/, void* message, long* /*result*/) Q_DECL_OVERRIDE; private: - MainWindow* m_mainWindow; + [[maybe_unused]] MainWindow* m_mainWindow; }; } diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AnimGraphModel.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AnimGraphModel.h index 7ff61123cb..46ab632ce2 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AnimGraphModel.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AnimGraphModel.h @@ -313,7 +313,7 @@ namespace EMStudio bool Execute(MCore::Command * command, const MCore::CommandLine& commandLine) override; \ bool Undo(MCore::Command* command, const MCore::CommandLine& commandLine) override; \ private: \ - AnimGraphModel& m_animGraphModel; \ + [[maybe_unused]] AnimGraphModel& m_animGraphModel; \ }; \ friend class CLASSNAME; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/BlendSpace1DNodeWidget.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/BlendSpace1DNodeWidget.cpp index bd8b94f361..e4990d658b 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/BlendSpace1DNodeWidget.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/BlendSpace1DNodeWidget.cpp @@ -364,8 +364,6 @@ namespace EMStudio const int rectLeft = m_drawRect.left(); const int rectRight = m_drawRect.right(); - const int rectBottom = m_drawRect.bottom(); - const int xValueTop = rectBottom + 4; const int xAxisLabelTop = m_drawCenterY + 15; const char numFormat = 'g'; const int numPrecision = 4; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/ParameterWindow.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/ParameterWindow.cpp index c93d358c07..3f3c7c1c7d 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/ParameterWindow.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/ParameterWindow.cpp @@ -651,7 +651,6 @@ namespace EMStudio // enable/disable recording/playback mode void ParameterWindow::OnRecorderStateChanged() { - const bool readOnly = (EMotionFX::GetRecorder().GetIsInPlayMode()); // disable when in playback mode, enable otherwise if (m_animGraph) { // update parameter values diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/ParameterWindow.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/ParameterWindow.h index 66cb62f0a5..f3b1702751 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/ParameterWindow.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/ParameterWindow.h @@ -205,7 +205,6 @@ namespace EMStudio ParameterWindowTreeWidget* m_treeWidget; AzQtComponents::FilteredSearchWidget* m_searchWidget; QVBoxLayout* m_verticalLayout; - QScrollArea* m_scrollArea; AZStd::string m_nameString; struct ParameterWidget { diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/Attachments/AttachmentsPlugin.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/Attachments/AttachmentsPlugin.h index d59d0d1b93..edab3a9580 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/Attachments/AttachmentsPlugin.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/Attachments/AttachmentsPlugin.h @@ -85,7 +85,6 @@ namespace EMStudio CommandAdjustActorCallback* m_adjustActorCallback; CommandRemoveActorInstanceCallback* m_removeActorInstanceCallback; - QWidget* m_noSelectionWidget; MysticQt::DialogStack* m_dialogStack; AttachmentsWindow* m_attachmentsWindow; AttachmentsHierarchyWindow* m_attachmentsHierarchyWindow; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MorphTargetsWindow/MorphTargetsWindowPlugin.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MorphTargetsWindow/MorphTargetsWindowPlugin.h index d2295fcd9c..26503bfbc6 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MorphTargetsWindow/MorphTargetsWindowPlugin.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MorphTargetsWindow/MorphTargetsWindowPlugin.h @@ -91,6 +91,5 @@ namespace EMStudio QVBoxLayout* m_staticTextLayout; QWidget* m_staticTextWidget; MysticQt::DialogStack* m_dialogStack; - QLabel* m_infoText; }; } // namespace EMStudio diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionEvents/MotionEventsPlugin.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionEvents/MotionEventsPlugin.cpp index 316b2017cc..8d77bd5e04 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionEvents/MotionEventsPlugin.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionEvents/MotionEventsPlugin.cpp @@ -32,7 +32,6 @@ namespace EMStudio , m_dialogStack(nullptr) , m_motionEventPresetsWidget(nullptr) , m_motionEventWidget(nullptr) - , m_motionTable(nullptr) , m_timeViewPlugin(nullptr) , m_trackHeaderWidget(nullptr) , m_trackDataWidget(nullptr) diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionEvents/MotionEventsPlugin.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionEvents/MotionEventsPlugin.h index 7cd34e4bca..f2c0f43b9b 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionEvents/MotionEventsPlugin.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionEvents/MotionEventsPlugin.h @@ -87,7 +87,6 @@ namespace EMStudio MotionEventPresetsWidget* m_motionEventPresetsWidget; MotionEventWidget* m_motionEventWidget; - QTableWidget* m_motionTable; TimeViewPlugin* m_timeViewPlugin; TrackHeaderWidget* m_trackHeaderWidget; TrackDataWidget* m_trackDataWidget; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.cpp index 6d16ea19b1..393e26790b 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.cpp @@ -819,7 +819,6 @@ namespace EMStudio } const QList selectedItems = m_tableWidget->selectedItems(); - const size_t numSelectedItems = selectedItems.count(); // Get the row indices from the selected items. AZStd::vector rowIndices; @@ -1079,7 +1078,6 @@ namespace EMStudio // Get the row indices from the selected items. AZStd::vector rowIndices; GetRowIndices(selectedItems, rowIndices); - const size_t numRowIndices = rowIndices.size(); // remove motion from motion window, too? bool removeMotion = false; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.h index 8c1fe04662..a1cab4e89f 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.h @@ -187,7 +187,6 @@ namespace EMStudio size_t CalcNumMotionEntriesUsingMotionExcluding(const AZStd::string& motionFilename, EMotionFX::MotionSet* excludedMotionSet); private: - QVBoxLayout* m_vLayout = nullptr; MotionSetTableWidget* m_tableWidget = nullptr; QAction* m_addAction = nullptr; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionExtractionWindow.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionExtractionWindow.h index 5e314df323..2f0bf63685 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionExtractionWindow.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionExtractionWindow.h @@ -68,7 +68,6 @@ namespace EMStudio // general MotionWindowPlugin* m_motionWindowPlugin; - QCheckBox* m_autoMode; // flags widget QWidget* m_flagsWidget; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionRetargetingWindow.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionRetargetingWindow.h index a846982eca..3090a1f8bd 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionRetargetingWindow.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionRetargetingWindow.h @@ -49,8 +49,6 @@ namespace EMStudio private: MotionWindowPlugin* m_motionWindowPlugin; QCheckBox* m_motionRetargetingButton; - EMotionFX::ActorInstance* m_selectedActorInstance; - EMotionFX::Actor* m_actor; CommandSystem::SelectionList m_selectionList; }; } // namespace EMStudio diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/NodeGroups/NodeGroupWidget.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/NodeGroups/NodeGroupWidget.h index c96b972085..e1530ebd3b 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/NodeGroups/NodeGroupWidget.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/NodeGroups/NodeGroupWidget.h @@ -58,7 +58,6 @@ namespace EMStudio NodeSelectionWindow* m_nodeSelectionWindow; CommandSystem::SelectionList m_nodeSelectionList; EMotionFX::NodeGroup* m_nodeGroup; - uint16 m_nodeGroupIndex; CommandSystem::CommandAdjustNodeGroup::NodeAction m_nodeAction; // widgets diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/TimeView/TimeViewToolBar.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/TimeView/TimeViewToolBar.cpp index d95b606b3f..14a27eec49 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/TimeView/TimeViewToolBar.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/TimeView/TimeViewToolBar.cpp @@ -441,7 +441,7 @@ namespace EMStudio const bool playbackOptionsVisible = m_playbackOptions->UpdateInterface(mode, /*showRightSeparator=*/false); const bool playbackControlsVisible = m_playbackControls->UpdateInterface(mode, /*showRightSeparator=*/playbackOptionsVisible); - const bool recorderGroupVisible = m_recorderGroup->UpdateInterface(mode, /*showRightSeparator=*/playbackControlsVisible); + m_recorderGroup->UpdateInterface(mode, /*showRightSeparator=*/playbackControlsVisible); } void TimeViewToolBar::OnDetailedNodes() diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/TimeView/TrackDataHeaderWidget.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/TimeView/TrackDataHeaderWidget.cpp index 0d1f55c172..9524d6f57d 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/TimeView/TrackDataHeaderWidget.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/TimeView/TrackDataHeaderWidget.cpp @@ -284,8 +284,6 @@ namespace EMStudio { m_plugin->SetRedrawFlag(); - const bool ctrlPressed = event->modifiers() & Qt::ControlModifier; - const bool shiftPressed = event->modifiers() & Qt::ShiftModifier; const bool altPressed = event->modifiers() & Qt::AltModifier; // store the last clicked position @@ -370,8 +368,6 @@ namespace EMStudio m_plugin->GetTimeInfoWidget()->SetIsOverwriteMode(false); } - const bool ctrlPressed = event->modifiers() & Qt::ControlModifier; - if (event->button() == Qt::RightButton) { m_mouseRightClicked = false; diff --git a/Gems/EMotionFX/Code/Source/Editor/Plugins/SimulatedObject/SimulatedObjectWidget.cpp b/Gems/EMotionFX/Code/Source/Editor/Plugins/SimulatedObject/SimulatedObjectWidget.cpp index a2b23e3268..48104707de 100644 --- a/Gems/EMotionFX/Code/Source/Editor/Plugins/SimulatedObject/SimulatedObjectWidget.cpp +++ b/Gems/EMotionFX/Code/Source/Editor/Plugins/SimulatedObject/SimulatedObjectWidget.cpp @@ -495,7 +495,6 @@ namespace EMotionFX if (renderSimulatedJoints && !selectedJointIndices.empty()) { // Render the joint radius. - const MCore::RGBAColor defaultColor = renderPlugin->GetRenderOptions()->GetSelectedSimulatedObjectColliderColor(); const size_t actorInstanceCount = GetActorManager().GetNumActorInstances(); for (size_t actorInstanceIndex = 0; actorInstanceIndex < actorInstanceCount; ++actorInstanceIndex) { diff --git a/Gems/EMotionFX/Code/Source/Editor/PropertyWidgets/AnimGraphTransitionHandler.cpp b/Gems/EMotionFX/Code/Source/Editor/PropertyWidgets/AnimGraphTransitionHandler.cpp index 4bc4da1030..ce114a498e 100644 --- a/Gems/EMotionFX/Code/Source/Editor/PropertyWidgets/AnimGraphTransitionHandler.cpp +++ b/Gems/EMotionFX/Code/Source/Editor/PropertyWidgets/AnimGraphTransitionHandler.cpp @@ -206,7 +206,7 @@ namespace EMotionFX QPushButton* removeTransitionButton = new QPushButton(); EMStudio::EMStudioManager::MakeTransparentButton(removeTransitionButton, "Images/Icons/Trash.svg", "Remove transition from list"); - connect(removeTransitionButton, &QPushButton::clicked, this, [this, removeTransitionButton, id]() + connect(removeTransitionButton, &QPushButton::clicked, this, [this, id]() { m_transitionIds.erase(AZStd::remove(m_transitionIds.begin(), m_transitionIds.end(), id), m_transitionIds.end()); Reinit(); diff --git a/Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp b/Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp index 485b56c077..ed4edda891 100644 --- a/Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp +++ b/Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp @@ -683,7 +683,6 @@ namespace EMotionFX const size_t lodLevel = m_actorInstance->GetLODLevel(); Actor* actor = m_actorAsset.Get()->GetActor(); const size_t numNodes = actor->GetNumNodes(); - const size_t numLods = actor->GetNumLODLevels(); for (size_t nodeIndex = 0; nodeIndex < numNodes; ++nodeIndex) { Mesh* mesh = actor->GetMesh(lodLevel, nodeIndex); diff --git a/Gems/EMotionFX/Code/Tests/ProvidesUI/AnimGraph/Transitions/RemoveTransition.cpp b/Gems/EMotionFX/Code/Tests/ProvidesUI/AnimGraph/Transitions/RemoveTransition.cpp index c4d4504335..db4ca21fe5 100644 --- a/Gems/EMotionFX/Code/Tests/ProvidesUI/AnimGraph/Transitions/RemoveTransition.cpp +++ b/Gems/EMotionFX/Code/Tests/ProvidesUI/AnimGraph/Transitions/RemoveTransition.cpp @@ -73,7 +73,6 @@ namespace EMotionFX // Select the transition in the anim graph model. const QModelIndex& modelIndex = animGraphModel.FindFirstModelIndex(transition); - const EMStudio::AnimGraphModel::ModelItemType itemType = modelIndex.data(EMStudio::AnimGraphModel::ROLE_MODEL_ITEM_TYPE).value(); ASSERT_TRUE(modelIndex.isValid()) << "Anim graph transition has an invalid model index."; animGraphModel.GetSelectionModel().select(QItemSelection(modelIndex, modelIndex), QItemSelectionModel::Current | QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows); diff --git a/Gems/EMotionFX/Code/Tests/ProvidesUI/AnimGraph/Transitions/RemoveTransitionCondition.cpp b/Gems/EMotionFX/Code/Tests/ProvidesUI/AnimGraph/Transitions/RemoveTransitionCondition.cpp index 5dbe52c2c4..c07a2f9611 100644 --- a/Gems/EMotionFX/Code/Tests/ProvidesUI/AnimGraph/Transitions/RemoveTransitionCondition.cpp +++ b/Gems/EMotionFX/Code/Tests/ProvidesUI/AnimGraph/Transitions/RemoveTransitionCondition.cpp @@ -76,7 +76,6 @@ namespace EMotionFX // Select the transition in the anim graph model. const QModelIndex& modelIndex = animGraphModel.FindFirstModelIndex(transition); - const EMStudio::AnimGraphModel::ModelItemType itemType = modelIndex.data(EMStudio::AnimGraphModel::ROLE_MODEL_ITEM_TYPE).value(); ASSERT_TRUE(modelIndex.isValid()) << "Anim graph transition has an invalid model index."; animGraphModel.GetSelectionModel().select(QItemSelection(modelIndex, modelIndex), QItemSelectionModel::Current | QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows); From 3c56faceb4bc8425d83a849b2d6b188ddfdba3bc Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:59:06 -0700 Subject: [PATCH 25/49] Gems/LyShine Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Code/Editor/Animation/Controls/UiSplineCtrlEx.cpp | 2 -- .../Code/Editor/Animation/Controls/UiTimelineCtrl.h | 1 - Gems/LyShine/Code/Editor/Animation/UiAnimViewAnimNode.cpp | 7 +------ .../Code/Editor/Animation/UiAnimViewDopeSheetBase.cpp | 6 ------ Gems/LyShine/Code/Editor/Animation/UiAnimViewNode.h | 7 ++----- Gems/LyShine/Code/Editor/Animation/UiAnimViewNodes.cpp | 3 --- Gems/LyShine/Code/Editor/Animation/UiAnimViewNodes.h | 1 - Gems/LyShine/Code/Editor/Animation/UiAnimViewSequence.cpp | 3 ++- .../LyShine/Code/Editor/Animation/UiAnimViewSplineCtrl.cpp | 1 - Gems/LyShine/Code/Editor/EditorMenu.cpp | 2 +- Gems/LyShine/Code/Editor/HierarchyMenu.cpp | 2 +- Gems/LyShine/Code/Editor/MainToolbar.cpp | 2 +- Gems/LyShine/Code/Editor/PropertiesContainer.h | 1 - Gems/LyShine/Code/Editor/PropertyHandlerAnchor.cpp | 4 +--- Gems/LyShine/Code/Editor/PropertyHandlerChar.cpp | 7 ++----- Gems/LyShine/Code/Editor/PropertyHandlerDirectory.cpp | 2 +- Gems/LyShine/Code/Editor/PropertyHandlerOffset.cpp | 4 +--- Gems/LyShine/Code/Editor/PropertyHandlerPivot.cpp | 4 +--- Gems/LyShine/Code/Editor/SpriteBorderEditor.cpp | 1 - Gems/LyShine/Code/Editor/ViewportInteraction.h | 1 - 20 files changed, 14 insertions(+), 47 deletions(-) diff --git a/Gems/LyShine/Code/Editor/Animation/Controls/UiSplineCtrlEx.cpp b/Gems/LyShine/Code/Editor/Animation/Controls/UiSplineCtrlEx.cpp index cf5c1b2d8f..94a4c77593 100644 --- a/Gems/LyShine/Code/Editor/Animation/Controls/UiSplineCtrlEx.cpp +++ b/Gems/LyShine/Code/Editor/Animation/Controls/UiSplineCtrlEx.cpp @@ -824,8 +824,6 @@ void SplineWidget::DrawSpline(QPainter* painter, SSplineInfo& splineInfo, float { const QPen pOldPen = painter->pen(); - const QRect rcClip = painter->clipBoundingRect().intersected(m_rcSpline).toRect(); - ////////////////////////////////////////////////////////////////////////// ISplineInterpolator* pSpline = splineInfo.pSpline; ISplineInterpolator* pDetailSpline = splineInfo.pDetailSpline; diff --git a/Gems/LyShine/Code/Editor/Animation/Controls/UiTimelineCtrl.h b/Gems/LyShine/Code/Editor/Animation/Controls/UiTimelineCtrl.h index d1aeaacb00..701d187ddc 100644 --- a/Gems/LyShine/Code/Editor/Animation/Controls/UiTimelineCtrl.h +++ b/Gems/LyShine/Code/Editor/Animation/Controls/UiTimelineCtrl.h @@ -134,7 +134,6 @@ protected: void DrawFrameTicks(QPainter* dc); private: - bool m_bAutoDelete; QRect m_rcClient; QRect m_rcTimeline; float m_fTimeMarker; diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewAnimNode.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimViewAnimNode.cpp index 3646e5a413..54ea410349 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewAnimNode.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewAnimNode.cpp @@ -149,8 +149,6 @@ void CUiAnimViewAnimNode::UiElementPropertyChanged() bool valueChanged = false; - const float time = GetSequence()->GetTime(); - if (m_nodeEntityId.IsValid() && !m_azEntityDataCache.empty()) { AZ::Entity* pNodeEntity = nullptr; @@ -537,9 +535,6 @@ void CUiAnimViewAnimNode::BindToEditorObjects() CUiAnimViewSequenceNotificationContext context(GetSequence()); - CUiAnimViewAnimNode* pDirector = GetDirector(); - const bool bBelongsToActiveDirector = pDirector ? pDirector->IsActiveDirector() : true; - // if this node represents an AZ entity then register for updates if (m_nodeEntityId.IsValid()) { @@ -1632,7 +1627,7 @@ void CUiAnimViewAnimNode::OnSelectionChanged(const bool bSelected) { if (m_pAnimNode) { - const EUiAnimNodeType animNodeType = GetType(); + [[maybe_unused]] const EUiAnimNodeType animNodeType = GetType(); assert(animNodeType == eUiAnimNodeType_Camera || animNodeType == eUiAnimNodeType_Entity || animNodeType == eUiAnimNodeType_GeomCache); const EUiAnimNodeFlags flags = (EUiAnimNodeFlags)m_pAnimNode->GetFlags(); diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewDopeSheetBase.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimViewDopeSheetBase.cpp index 4e67fb520e..443480ab0d 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewDopeSheetBase.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewDopeSheetBase.cpp @@ -192,7 +192,6 @@ void CUiAnimViewDopeSheetBase::SetTimeRange(float start, float end) void CUiAnimViewDopeSheetBase::SetTimeScale(float timeScale, float fAnchorTime) { const double fOldOffset = -fAnchorTime * m_timeScale; - const double fOldScale = m_timeScale; timeScale = std::max(timeScale, 0.001f); timeScale = std::min(timeScale, 100000.0f); @@ -1308,8 +1307,6 @@ void CUiAnimViewDopeSheetBase::OnCaptureChanged() ////////////////////////////////////////////////////////////////////////// bool CUiAnimViewDopeSheetBase::IsOkToAddKeyHere(const CUiAnimViewTrack* pTrack, float time) const { - const float timeEpsilon = 0.05f; - for (unsigned int i = 0; i < pTrack->GetKeyCount(); ++i) { CUiAnimViewKeyHandle keyHandle = const_cast(pTrack)->GetKey(i); @@ -1795,8 +1792,6 @@ void CUiAnimViewDopeSheetBase::AcceptUndo() { if (UiAnimUndo::IsRecording()) { - const QPoint mousePos = mapFromGlobal(QCursor::pos()); - if (m_mouseMode == eUiAVMouseMode_Paste) { UiAnimUndoManager::Get()->Cancel(); @@ -2242,7 +2237,6 @@ void CUiAnimViewDopeSheetBase::DrawBoolTrack(const Range& timeRange, QPainter* p { int x0 = TimeToClient(timeRange.start); float t0 = timeRange.start; - QRect trackRect; const QBrush prevBrush = painter->brush(); painter->setBrush(m_visibilityBrush); diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewNode.h b/Gems/LyShine/Code/Editor/Animation/UiAnimViewNode.h index 5a82d1be7f..0213cbb410 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewNode.h +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewNode.h @@ -19,13 +19,11 @@ class CUiAnimViewKeyConstHandle { public: CUiAnimViewKeyConstHandle() - : m_bIsValid(false) - , m_keyIndex(0) + : m_keyIndex(0) , m_pTrack(nullptr) {} CUiAnimViewKeyConstHandle(const CUiAnimViewTrack* pTrack, unsigned int keyIndex) - : m_bIsValid(true) - , m_keyIndex(keyIndex) + : m_keyIndex(keyIndex) , m_pTrack(pTrack) {} void GetKey(IKey* pKey) const; @@ -33,7 +31,6 @@ public: const CUiAnimViewTrack* GetTrack() const { return m_pTrack; } private: - bool m_bIsValid; unsigned int m_keyIndex; const CUiAnimViewTrack* m_pTrack; }; diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewNodes.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimViewNodes.cpp index 74d2c7d4fb..a6c4e2424b 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewNodes.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewNodes.cpp @@ -1096,9 +1096,6 @@ void CUiAnimViewNodesCtrl::AddGroupNodeAddItems(UiAnimContextMenu& contextMenu, contextMenu.main.addAction("Add Event Node")->setData(eMI_AddEvent); } - const bool bIsDirectorOrSequence = (pAnimNode->GetType() == eUiAnimNodeType_Director || pAnimNode->GetNodeType() == eUiAVNT_Sequence); - - #if UI_ANIMATION_REMOVED contextMenu.main.addAction("Add Comment Node")->setData(eMI_AddCommentNode); contextMenu.main.addAction("Add Console Variable")->setData(eMI_AddConsoleVariable); diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewNodes.h b/Gems/LyShine/Code/Editor/Animation/UiAnimViewNodes.h index a5cce764e3..c7226da23f 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewNodes.h +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewNodes.h @@ -182,7 +182,6 @@ private: // Drag and drop CUiAnimViewAnimNodeBundle m_draggedNodes; - CUiAnimViewAnimNode* m_pDragTarget; std::unordered_map m_nodeToRecordMap; diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequence.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequence.cpp index d8888124a4..9c26100bad 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequence.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequence.cpp @@ -488,11 +488,12 @@ void CUiAnimViewSequence::SelectSelectedNodesInViewport() assert(UiAnimUndo::IsRecording()); CUiAnimViewAnimNodeBundle selectedNodes = GetSelectedAnimNodes(); - const unsigned int numSelectedNodes = selectedNodes.GetCount(); std::vector entitiesToBeSelected; #if UI_ANIMATION_REMOVED // lights + const unsigned int numSelectedNodes = selectedNodes.GetCount(); + // Also select objects that refer to light animation const bool bLightAnimationSetActive = GetFlags() & IUiAnimSequence::eSeqFlags_LightAnimationSet; if (bLightAnimationSetActive) diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewSplineCtrl.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimViewSplineCtrl.cpp index 8edd13f8cc..382b589ac3 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewSplineCtrl.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewSplineCtrl.cpp @@ -589,7 +589,6 @@ void CUiAnimViewSplineCtrl::mouseMoveEvent(QMouseEvent* event) CUiAnimViewSequenceNotificationContext context(pSequence); - QPoint cMousePosPrev = m_cMousePos; m_cMousePos = point; if (m_editMode == SelectMode) diff --git a/Gems/LyShine/Code/Editor/EditorMenu.cpp b/Gems/LyShine/Code/Editor/EditorMenu.cpp index 840bd206ab..8a6c93de6b 100644 --- a/Gems/LyShine/Code/Editor/EditorMenu.cpp +++ b/Gems/LyShine/Code/Editor/EditorMenu.cpp @@ -704,7 +704,7 @@ void EditorWindow::AddMenu_View() action->setEnabled(canvasLoaded); QObject::connect(action, &QAction::triggered, - [this]([[maybe_unused]] bool checked) + []([[maybe_unused]] bool checked) { gEnv->pCryFont->ReloadAllFonts(); }); diff --git a/Gems/LyShine/Code/Editor/HierarchyMenu.cpp b/Gems/LyShine/Code/Editor/HierarchyMenu.cpp index ab0c250434..31c5255538 100644 --- a/Gems/LyShine/Code/Editor/HierarchyMenu.cpp +++ b/Gems/LyShine/Code/Editor/HierarchyMenu.cpp @@ -330,7 +330,7 @@ void HierarchyMenu::SliceMenuItems(HierarchyWidget* hierarchy, slicesAddedToMenu.push_back(sliceAsset.GetId()); QAction* action = menu->addAction(assetPath.c_str()); - QObject::connect(action, &QAction::triggered, [this, hierarchy, sliceAsset] + QObject::connect(action, &QAction::triggered, [hierarchy, sliceAsset] { hierarchy->GetEditorWindow()->EditSliceInNewTab(sliceAsset.GetId()); } diff --git a/Gems/LyShine/Code/Editor/MainToolbar.cpp b/Gems/LyShine/Code/Editor/MainToolbar.cpp index ee2d3db7b5..dd0ab39f89 100644 --- a/Gems/LyShine/Code/Editor/MainToolbar.cpp +++ b/Gems/LyShine/Code/Editor/MainToolbar.cpp @@ -32,7 +32,7 @@ MainToolbar::MainToolbar(EditorWindow* parent) QObject::connect(m_zoomFactorSpinBox, QOverload::of(&AzQtComponents::DoubleSpinBox::valueChanged), - [this, parent](double value) + [parent](double value) { parent->GetViewport()->GetViewportInteraction()->SetCanvasZoomPercent(static_cast(value)); }); diff --git a/Gems/LyShine/Code/Editor/PropertiesContainer.h b/Gems/LyShine/Code/Editor/PropertiesContainer.h index 0d47444281..209a2354ad 100644 --- a/Gems/LyShine/Code/Editor/PropertiesContainer.h +++ b/Gems/LyShine/Code/Editor/PropertiesContainer.h @@ -119,7 +119,6 @@ private: PropertiesWidget* m_propertiesWidget; EditorWindow* m_editorWindow; - QWidget* m_containerWidget; QWidget* m_componentListContents; QVBoxLayout* m_rowLayout; QLineEdit* m_selectedEntityDisplayNameWidget; diff --git a/Gems/LyShine/Code/Editor/PropertyHandlerAnchor.cpp b/Gems/LyShine/Code/Editor/PropertyHandlerAnchor.cpp index 8e00b6f277..5ffba22df6 100644 --- a/Gems/LyShine/Code/Editor/PropertyHandlerAnchor.cpp +++ b/Gems/LyShine/Code/Editor/PropertyHandlerAnchor.cpp @@ -350,10 +350,8 @@ void PropertyHandlerAnchor::WriteGUIValuesIntoProperty(size_t index, PropertyAnc } } -bool PropertyHandlerAnchor::ReadValuesIntoGUI(size_t index, PropertyAnchorCtrl* GUI, const property_t& instance, [[maybe_unused]] AzToolsFramework::InstanceDataNode* node) +bool PropertyHandlerAnchor::ReadValuesIntoGUI([[maybe_unused]] size_t index, PropertyAnchorCtrl* GUI, const property_t& instance, [[maybe_unused]] AzToolsFramework::InstanceDataNode* node) { - (int)index; - AzQtComponents::VectorInput* ctrl = GUI->GetPropertyVectorCtrl(); ctrl->blockSignals(true); diff --git a/Gems/LyShine/Code/Editor/PropertyHandlerChar.cpp b/Gems/LyShine/Code/Editor/PropertyHandlerChar.cpp index b3cacec065..d99cd9bf20 100644 --- a/Gems/LyShine/Code/Editor/PropertyHandlerChar.cpp +++ b/Gems/LyShine/Code/Editor/PropertyHandlerChar.cpp @@ -27,19 +27,16 @@ void PropertyHandlerChar::ConsumeAttribute(AzToolsFramework::PropertyStringLineE { } -void PropertyHandlerChar::WriteGUIValuesIntoProperty(size_t index, AzToolsFramework::PropertyStringLineEditCtrl* GUI, property_t& instance, [[maybe_unused]] AzToolsFramework::InstanceDataNode* node) +void PropertyHandlerChar::WriteGUIValuesIntoProperty([[maybe_unused]] size_t index, AzToolsFramework::PropertyStringLineEditCtrl* GUI, property_t& instance, [[maybe_unused]] AzToolsFramework::InstanceDataNode* node) { - (int)index; AZStd::string str = GUI->value(); wchar_t character = '\0'; AZStd::to_wstring(&character, 1, str.c_str()); instance = character; } -bool PropertyHandlerChar::ReadValuesIntoGUI(size_t index, AzToolsFramework::PropertyStringLineEditCtrl* GUI, const property_t& instance, [[maybe_unused]] AzToolsFramework::InstanceDataNode* node) +bool PropertyHandlerChar::ReadValuesIntoGUI([[maybe_unused]] size_t index, AzToolsFramework::PropertyStringLineEditCtrl* GUI, const property_t& instance, [[maybe_unused]] AzToolsFramework::InstanceDataNode* node) { - (int)index; - GUI->blockSignals(true); { // NOTE: this assumes the uint32_t can be interpreted as a wchar_t, it seems to diff --git a/Gems/LyShine/Code/Editor/PropertyHandlerDirectory.cpp b/Gems/LyShine/Code/Editor/PropertyHandlerDirectory.cpp index 1f3e28b077..5a464b2210 100644 --- a/Gems/LyShine/Code/Editor/PropertyHandlerDirectory.cpp +++ b/Gems/LyShine/Code/Editor/PropertyHandlerDirectory.cpp @@ -53,7 +53,7 @@ PropertyDirectoryCtrl::PropertyDirectoryCtrl(QWidget* parent) QObject::connect(refreshButton, &QPushButton::clicked, - [this]([[maybe_unused]] bool checked) + []([[maybe_unused]] bool checked) { UiEditorRefreshDirectoryNotificationBus::Broadcast(&UiEditorRefreshDirectoryNotificationInterface::OnRefreshDirectory); }); diff --git a/Gems/LyShine/Code/Editor/PropertyHandlerOffset.cpp b/Gems/LyShine/Code/Editor/PropertyHandlerOffset.cpp index 22f87b5b53..b8a34ae314 100644 --- a/Gems/LyShine/Code/Editor/PropertyHandlerOffset.cpp +++ b/Gems/LyShine/Code/Editor/PropertyHandlerOffset.cpp @@ -106,10 +106,8 @@ void PropertyHandlerOffset::WriteGUIValuesIntoProperty(size_t index, AzQtCompone EBUS_EVENT_ID(id, UiTransform2dBus, SetOffsets, newInternalOffset); } -bool PropertyHandlerOffset::ReadValuesIntoGUI(size_t index, AzQtComponents::VectorInput* GUI, const UiTransform2dInterface::Offsets& instance, AzToolsFramework::InstanceDataNode* node) +bool PropertyHandlerOffset::ReadValuesIntoGUI([[maybe_unused]] size_t index, AzQtComponents::VectorInput* GUI, const UiTransform2dInterface::Offsets& instance, AzToolsFramework::InstanceDataNode* node) { - (int)index; - // IMPORTANT: We DON'T need to do validation of data here because that's // done for us BEFORE we get here. We DO need to set the labels here. diff --git a/Gems/LyShine/Code/Editor/PropertyHandlerPivot.cpp b/Gems/LyShine/Code/Editor/PropertyHandlerPivot.cpp index 47d98cf68a..3f89b2fe74 100644 --- a/Gems/LyShine/Code/Editor/PropertyHandlerPivot.cpp +++ b/Gems/LyShine/Code/Editor/PropertyHandlerPivot.cpp @@ -143,10 +143,8 @@ void PropertyHandlerPivot::WriteGUIValuesIntoProperty(size_t index, PropertyPivo } } -bool PropertyHandlerPivot::ReadValuesIntoGUI(size_t index, PropertyPivotCtrl* GUI, const property_t& instance, [[maybe_unused]] AzToolsFramework::InstanceDataNode* node) +bool PropertyHandlerPivot::ReadValuesIntoGUI([[maybe_unused]] size_t index, PropertyPivotCtrl* GUI, const property_t& instance, [[maybe_unused]] AzToolsFramework::InstanceDataNode* node) { - (int)index; - AzQtComponents::VectorInput* ctrl = GUI->GetPropertyVectorCtrl(); ctrl->blockSignals(true); diff --git a/Gems/LyShine/Code/Editor/SpriteBorderEditor.cpp b/Gems/LyShine/Code/Editor/SpriteBorderEditor.cpp index 04f655123c..93d77bd174 100644 --- a/Gems/LyShine/Code/Editor/SpriteBorderEditor.cpp +++ b/Gems/LyShine/Code/Editor/SpriteBorderEditor.cpp @@ -227,7 +227,6 @@ void SpriteBorderEditor::DisplaySelectedCell(AZ::u32 cellIndex) // Determine how much we need to scale the view to fit the cell // contents to the displayed properties image. const AZ::Vector2 cellSize = m_sprite->GetCellSize(cellIndex); - const AZ::Vector2 cellScale = AZ::Vector2(m_unscaledSpriteSheet.size().width() / cellSize.GetX(), m_unscaledSpriteSheet.size().height() / cellSize.GetY()); // Scale-to-fit, while preserving aspect ratio. QRect croppedRect = m_unscaledSpriteSheet.rect(); diff --git a/Gems/LyShine/Code/Editor/ViewportInteraction.h b/Gems/LyShine/Code/Editor/ViewportInteraction.h index 100d1fdb1e..a104d87634 100644 --- a/Gems/LyShine/Code/Editor/ViewportInteraction.h +++ b/Gems/LyShine/Code/Editor/ViewportInteraction.h @@ -261,7 +261,6 @@ private: // data AZStd::string m_cursorStr; QCursor m_cursorRotate; - bool m_inObjectPickMode = false; ViewportInteraction::InteractionMode m_interactionModeBeforePickMode; AZ::EntityId m_hoverElement; bool m_entityPickedOnMousePress; // used to ignore mouse move/release events if element was picked on the mouse press From 52569adedabf2e56ee7308ade60a7076c939c2cb Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:59:22 -0700 Subject: [PATCH 26/49] Gems/MultiplayerCompression Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Code/Tests/MultiplayerCompressionTest.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Gems/MultiplayerCompression/Code/Tests/MultiplayerCompressionTest.cpp b/Gems/MultiplayerCompression/Code/Tests/MultiplayerCompressionTest.cpp index 1c3eda6709..572dffbe60 100644 --- a/Gems/MultiplayerCompression/Code/Tests/MultiplayerCompressionTest.cpp +++ b/Gems/MultiplayerCompression/Code/Tests/MultiplayerCompressionTest.cpp @@ -67,8 +67,6 @@ TEST_F(MultiplayerCompressionTest, MultiplayerCompression_CompressTest) EXPECT_TRUE(uncompressedSize = buffer.GetSize()); EXPECT_TRUE(memcmp(pDecompressedBuffer, buffer.GetBuffer(), uncompressedSize) == 0); - const AZ::u64 unmarshalTime = (AZStd::chrono::system_clock::now() - startTime).count(); - delete [] pCompressedBuffer; delete [] pDecompressedBuffer; From 4ae74c913f63e6c9e9868aed6b4483bfec1762a4 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:59:49 -0700 Subject: [PATCH 27/49] Gems/PhysX Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Gems/PhysX/Code/Editor/ConfigStringLineEditCtrl.cpp | 8 ++++---- Gems/PhysX/Code/Editor/EditorClassConverters.cpp | 1 - .../PhysX/Code/Editor/EditorSubComponentModeAngleCone.cpp | 4 +--- Gems/PhysX/Code/Editor/EditorSubComponentModeSnap.cpp | 1 - Gems/PhysX/Code/Source/EditorBallJointComponent.cpp | 1 - Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp | 4 ++-- .../Code/Tests/Benchmarks/PhysXRigidBodyBenchmarks.cpp | 3 +-- Gems/PhysX/Code/Tests/ShapeColliderComponentTests.cpp | 1 - Gems/PhysX/Code/Tests/SystemComponentTest.cpp | 2 -- 9 files changed, 8 insertions(+), 17 deletions(-) diff --git a/Gems/PhysX/Code/Editor/ConfigStringLineEditCtrl.cpp b/Gems/PhysX/Code/Editor/ConfigStringLineEditCtrl.cpp index 1e506263be..4cf5204917 100644 --- a/Gems/PhysX/Code/Editor/ConfigStringLineEditCtrl.cpp +++ b/Gems/PhysX/Code/Editor/ConfigStringLineEditCtrl.cpp @@ -257,16 +257,16 @@ namespace PhysX void ConfigStringLineEditHandler::WriteGUIValuesIntoProperty(size_t index, ConfigStringLineEditCtrl* GUI, property_t& instance, AzToolsFramework::InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); AZStd::string val = GUI->Value(); instance = static_cast(val); } bool ConfigStringLineEditHandler::ReadValuesIntoGUI(size_t index, ConfigStringLineEditCtrl* GUI, const property_t& instance, AzToolsFramework::InstanceDataNode* node) { - (int)index; - (void)node; + AZ_UNUSED(index); + AZ_UNUSED(node); AZStd::string val = instance; GUI->setValue(val); return false; diff --git a/Gems/PhysX/Code/Editor/EditorClassConverters.cpp b/Gems/PhysX/Code/Editor/EditorClassConverters.cpp index dfa30dc0b4..e55ac6bbda 100644 --- a/Gems/PhysX/Code/Editor/EditorClassConverters.cpp +++ b/Gems/PhysX/Code/Editor/EditorClassConverters.cpp @@ -65,7 +65,6 @@ namespace PhysX { // collision group id AzPhysics::CollisionGroups::Id collisionGroupId; - const int baseColliderComponentIndex = classElement.FindElement(AZ_CRC("BaseClass1", 0xd4925735)); FindElementRecursiveAndGetData(classElement, AZ_CRC("CollisionGroupId", 0x84fe4bbe), collisionGroupId); // collider config diff --git a/Gems/PhysX/Code/Editor/EditorSubComponentModeAngleCone.cpp b/Gems/PhysX/Code/Editor/EditorSubComponentModeAngleCone.cpp index 7e9a59093f..778fce1546 100644 --- a/Gems/PhysX/Code/Editor/EditorSubComponentModeAngleCone.cpp +++ b/Gems/PhysX/Code/Editor/EditorSubComponentModeAngleCone.cpp @@ -334,15 +334,13 @@ namespace PhysX } void EditorSubComponentModeAngleCone::ConfigureLinearView( - float axisLength, const AZ::Color& axis1Color, const AZ::Color& axis2Color, + float axisLength, [[maybe_unused]] const AZ::Color& axis1Color, const AZ::Color& axis2Color, const AZ::Color& axis3Color) { const float coneLength = 0.28f; const float coneRadius = 0.07f; const float lineWidth = 0.05f; - const AZ::Color axesColor[] = { axis1Color, axis2Color, axis3Color }; - const auto configureLinearView = [lineWidth, coneLength, axisLength, coneRadius]( AzToolsFramework::LinearManipulator* linearManipulator, const AZ::Color& color) { diff --git a/Gems/PhysX/Code/Editor/EditorSubComponentModeSnap.cpp b/Gems/PhysX/Code/Editor/EditorSubComponentModeSnap.cpp index cef48a7cf5..5220b2e274 100644 --- a/Gems/PhysX/Code/Editor/EditorSubComponentModeSnap.cpp +++ b/Gems/PhysX/Code/Editor/EditorSubComponentModeSnap.cpp @@ -99,7 +99,6 @@ namespace PhysX debugDisplay.PushMatrix(localTransform); const float xAxisLineLength = 15.0f; - const float yzAxisArrowLength = 1.0f; debugDisplay.SetColor(AZ::Color(1.0f, 0.0f, 0.0f, 1.0f)); debugDisplay.DrawLine(AZ::Vector3(0.0f, 0.0f, 0.0f), AZ::Vector3(xAxisLineLength, 0.0f, 0.0f)); diff --git a/Gems/PhysX/Code/Source/EditorBallJointComponent.cpp b/Gems/PhysX/Code/Source/EditorBallJointComponent.cpp index d196b4644d..da000baeed 100644 --- a/Gems/PhysX/Code/Source/EditorBallJointComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorBallJointComponent.cpp @@ -237,7 +237,6 @@ namespace PhysX debugDisplay.PushMatrix(localTransform); const float xAxisArrowLength = 2.0f; - const float yzAxisArrowLength = 1.0f; debugDisplay.SetColor(AZ::Color(1.0f, 0.0f, 0.0f, 1.0f)); debugDisplay.DrawArrow(AZ::Vector3(0.0f, 0.0f, 0.0f), AZ::Vector3(xAxisArrowLength, 0.0f, 0.0f)); diff --git a/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp b/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp index 7ff62e0fc6..57bfe17a30 100644 --- a/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp @@ -58,10 +58,10 @@ namespace PhysX { if (m_shapeType == ShapeType::Cylinder) { - return AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::Show; + return AZ::Edit::PropertyVisibility::Show; } - return AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::Hide; + return AZ::Edit::PropertyVisibility::Hide; } void EditorShapeColliderComponent::Reflect(AZ::ReflectContext* context) diff --git a/Gems/PhysX/Code/Tests/Benchmarks/PhysXRigidBodyBenchmarks.cpp b/Gems/PhysX/Code/Tests/Benchmarks/PhysXRigidBodyBenchmarks.cpp index b02a3962cc..0117e9737b 100644 --- a/Gems/PhysX/Code/Tests/Benchmarks/PhysXRigidBodyBenchmarks.cpp +++ b/Gems/PhysX/Code/Tests/Benchmarks/PhysXRigidBodyBenchmarks.cpp @@ -175,7 +175,6 @@ namespace PhysX::Benchmarks const int numRigidBodies = static_cast(state.range(0)); //common settings for each rigid body - const float boxSize = 5.0f; const float boxSizeWithSpacing = RigidBodyConstants::RigidBodys::BoxSize + 2.0f; const int boxesPerCol = static_cast(RigidBodyConstants::TerrainSize / boxSizeWithSpacing) - 1; int spawnColIdx = 0; @@ -399,7 +398,7 @@ namespace PhysX::Benchmarks return rand.GetRandomFloat() * 25.0f + 5.0f; }; - Utils::GenerateEntityIdFuncPtr entityIdGenerator = [&rand](int idx) -> AZ::EntityId { + Utils::GenerateEntityIdFuncPtr entityIdGenerator = [](int idx) -> AZ::EntityId { return AZ::EntityId(static_cast(idx) + RigidBodyConstants::RigidBodys::RigidBodyEntityIdStart); }; auto boxShapeConfiguration = AZStd::make_shared(AZ::Vector3(RigidBodyConstants::RigidBodys::BoxSize)); diff --git a/Gems/PhysX/Code/Tests/ShapeColliderComponentTests.cpp b/Gems/PhysX/Code/Tests/ShapeColliderComponentTests.cpp index e3c7d9acfb..cbaf4b4625 100644 --- a/Gems/PhysX/Code/Tests/ShapeColliderComponentTests.cpp +++ b/Gems/PhysX/Code/Tests/ShapeColliderComponentTests.cpp @@ -299,7 +299,6 @@ namespace PhysXEditorTests // the bounding box of the rigid body should reflect the dimensions of the cylinder set above AZ::Aabb aabb = staticBody->GetAabb(); - const float validDiameter = validRadius * 2.0f; // Check that the z positions of the bounding box match that of the cylinder EXPECT_NEAR(aabb.GetMin().GetZ(), -0.5f * validHeight, AZ::Constants::Tolerance); diff --git a/Gems/PhysX/Code/Tests/SystemComponentTest.cpp b/Gems/PhysX/Code/Tests/SystemComponentTest.cpp index cf9bbe3567..11c5e0a115 100644 --- a/Gems/PhysX/Code/Tests/SystemComponentTest.cpp +++ b/Gems/PhysX/Code/Tests/SystemComponentTest.cpp @@ -21,8 +21,6 @@ namespace PhysXEditorTests // Initialize new configs with some non-default values. const AZ::Vector3 newGravity(2.f, 5.f, 7.f); - const float newFixedTimeStep = 0.008f; - const float newMaxTimeStep = 0.034f; AzPhysics::SceneConfiguration newConfiguration; From 3ebf045cb57b025c74540d991aee11670da090e4 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 18:01:03 -0700 Subject: [PATCH 28/49] Gems/GradientSignal Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Source/Editor/EditorImageProcessingSystemComponent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorImageProcessingSystemComponent.cpp b/Gems/GradientSignal/Code/Source/Editor/EditorImageProcessingSystemComponent.cpp index 52c96c143c..e665d46468 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorImageProcessingSystemComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Editor/EditorImageProcessingSystemComponent.cpp @@ -108,7 +108,7 @@ namespace GradientSignal if(settingsExist) { - menu->addAction("Edit Gradient Image Settings...", [this, source, settingsPath]() + menu->addAction("Edit Gradient Image Settings...", [settingsPath]() { bool result = false; AZ::Data::AssetInfo assetInfo; @@ -123,7 +123,7 @@ namespace GradientSignal } else { - menu->addAction("Enable Gradient Image Settings", [this, source, settingsPath]() + menu->addAction("Enable Gradient Image Settings", [settingsPath]() { GradientSignal::ImageSettings imageSettings; AZ::Utils::SaveObjectToFile(settingsPath, AZ::DataStream::ST_XML, &imageSettings); From 2f5a39176d46448438460bbd2cfbd64a9d615f04 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 18:01:28 -0700 Subject: [PATCH 29/49] Gems/GraphCanvas Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Nodes/Group/NodeGroupFrameComponent.cpp | 2 - .../Code/Source/Components/SceneComponent.cpp | 4 -- .../Translation/TranslationDatabase.cpp | 4 +- .../GraphicsItems/ParticleGraphicsItem.cpp | 1 - .../StaticLib/GraphCanvas/Styling/Parser.cpp | 40 ------------------- .../GraphCanvas/Utils/GraphUtils.cpp | 11 ----- .../GraphCanvas/Utils/QtVectorMath.h | 10 ----- .../ConstructPresetDialog.cpp | 1 - .../GraphCanvasGraphicsView.cpp | 1 - .../Model/NodePaletteSortFilterProxyModel.cpp | 2 - 10 files changed, 2 insertions(+), 74 deletions(-) diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/NodeGroupFrameComponent.cpp b/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/NodeGroupFrameComponent.cpp index c317e8044a..f6a7efd7fb 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/NodeGroupFrameComponent.cpp +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/NodeGroupFrameComponent.cpp @@ -2295,8 +2295,6 @@ namespace GraphCanvas { QScopedValueRollback allowMovement(m_allowMovement, false); - QRectF rect = boundingRect(); - qreal originalHeight = boundingRect().height(); qreal newHeight = boundingRect().height() + (newSize.height() - oldSize.height()); diff --git a/Gems/GraphCanvas/Code/Source/Components/SceneComponent.cpp b/Gems/GraphCanvas/Code/Source/Components/SceneComponent.cpp index eefde088bb..f236b6b1e1 100644 --- a/Gems/GraphCanvas/Code/Source/Components/SceneComponent.cpp +++ b/Gems/GraphCanvas/Code/Source/Components/SceneComponent.cpp @@ -3262,8 +3262,6 @@ namespace GraphCanvas { for (const auto& sceneMember : sceneMemberList) { - QRectF boundingArea; - QGraphicsItem* sceneItem = nullptr; VisualRequestBus::EventResult(sceneItem, sceneMember->GetId(), &VisualRequests::AsGraphicsItem); @@ -3292,8 +3290,6 @@ namespace GraphCanvas { for (const auto& sceneMember : sceneMemberList) { - QRectF boundingArea; - QGraphicsItem* sceneItem = nullptr; VisualRequestBus::EventResult(sceneItem, sceneMember->GetId(), &VisualRequests::AsGraphicsItem); diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationDatabase.cpp b/Gems/GraphCanvas/Code/Source/Translation/TranslationDatabase.cpp index 158b310d7c..17c59d17bc 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationDatabase.cpp +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationDatabase.cpp @@ -33,10 +33,10 @@ namespace GraphCanvas m_database.clear(); - AZStd::function reloadFn = [this]() + AZStd::function reloadFn = []() { // Collects all script assets for reloading - AZ::Data::AssetCatalogRequests::AssetEnumerationCB collectAssetsCb = [this](const AZ::Data::AssetId, const AZ::Data::AssetInfo& info) + AZ::Data::AssetCatalogRequests::AssetEnumerationCB collectAssetsCb = [](const AZ::Data::AssetId, const AZ::Data::AssetInfo& info) { // Check asset type if (info.m_assetType == azrtti_typeid()) diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/GraphicsItems/ParticleGraphicsItem.cpp b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/GraphicsItems/ParticleGraphicsItem.cpp index 26ee857cd8..a6ec4484cf 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/GraphicsItems/ParticleGraphicsItem.cpp +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/GraphicsItems/ParticleGraphicsItem.cpp @@ -117,7 +117,6 @@ namespace GraphCanvas void ParticleGraphicsItem::paint([[maybe_unused]] QPainter* painter, [[maybe_unused]] const QStyleOptionGraphicsItem* option, [[maybe_unused]] QWidget* widget) { - static const float k_pulseWidth = 60.0f; painter->save(); float alpha = m_configuration.m_alphaStart; diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Styling/Parser.cpp b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Styling/Parser.cpp index d391ecf418..5d15c9fcd0 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Styling/Parser.cpp +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Styling/Parser.cpp @@ -291,8 +291,6 @@ namespace QColor ParseColor(const QString& color) { - QColor result; - QRegularExpressionMatch match; if ((match = hexColor.match(color)).hasMatch()) { @@ -520,34 +518,6 @@ namespace } } - QFont::Capitalization ParseFontVariant(const QString& value) - { - if (QString::compare(value, QLatin1String("normal"), Qt::CaseInsensitive) == 0) - { - return QFont::MixedCase; - } - else if (QString::compare(value, QLatin1String("all-uppercase"), Qt::CaseInsensitive) == 0) - { - return QFont::AllUppercase; - } - else if (QString::compare(value, QLatin1String("all-lowercase"), Qt::CaseInsensitive) == 0) - { - return QFont::AllLowercase; - } - else if (QString::compare(value, QLatin1String("small-caps"), Qt::CaseInsensitive) == 0) - { - return QFont::SmallCaps; - } - else if (QString::compare(value, QLatin1String("capitalize"), Qt::CaseInsensitive) == 0) - { - return QFont::Capitalize; - } - else - { - return{}; - } - } - bool IsFontStyleValid(const QString& value) { if (QString::compare(value, QLatin1String("normal"), Qt::CaseInsensitive) == 0 || @@ -640,16 +610,6 @@ namespace return{}; } - AZStd::string CreateStyleName(const Styling::Style& style) - { - const Styling::SelectorVector selectors = style.GetSelectors(); - return std::accumulate(selectors.cbegin(), selectors.cend(), AZStd::string(), [](const AZStd::string& a, const Styling::Selector& s) { - return a + (a.empty() ? "" : ", ") + s.ToString(); - }); - } - - - } // namespace diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Utils/GraphUtils.cpp b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Utils/GraphUtils.cpp index 93ee795ec6..40284efcdf 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Utils/GraphUtils.cpp +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Utils/GraphUtils.cpp @@ -1898,8 +1898,6 @@ namespace GraphCanvas targetConnectionType = ConnectionType::CT_Invalid; } - NodeId nodeId = initializingEndpoint.GetNodeId(); - AZStd::vector< SlotId > slotIds; NodeRequestBus::EventResult(slotIds, initializingEndpoint.GetNodeId(), &NodeRequests::GetSlotIds); @@ -2307,7 +2305,6 @@ namespace GraphCanvas AZ::EntityId anchorEntity; float minDistance = -1; - QPointF offset; AZStd::vector nearbyEntities; FloatingElementAnchor floatingAnchor; @@ -2425,10 +2422,6 @@ namespace GraphCanvas // - Overall Alignment is a bit...non-deterministic right now, and can change for some reason. AZStd::queue< OrganizationHelper* > termimnalOrganizationHelpers; - QPointF minTerminalPointSpot(0,0); - - AZ::Vector2 anchorPoint = CalculateAlignmentAnchorPoint(alignConfig); - // Tail recursed loop. while (!nextLayer.empty()) { @@ -2487,10 +2480,6 @@ namespace GraphCanvas OrganizationHelper* helper = termimnalOrganizationHelpers.front(); termimnalOrganizationHelpers.pop(); - NodeId nodeId = helper->m_nodeId; - - QRectF totalBoundingRect = helper->m_boundingArea; - OrganizationSpaceAllocationHelper leftAllocation; OrganizationSpaceAllocationHelper rightAllocation; diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Utils/QtVectorMath.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Utils/QtVectorMath.h index 8361d57e9a..5b572714f2 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Utils/QtVectorMath.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Utils/QtVectorMath.h @@ -58,18 +58,8 @@ namespace GraphCanvas } // Find the line between the two rectangles. - QPointF direction = rectA.center() - rectB.center(); QLineF directionLine(rectA.center(), rectB.center()); - QLineF aLine1; - QLineF aLine2; - QLineF aFinalLine; - - QLineF bLine1; - QLineF bLine2; - QLineF bFinalLine; - - // Not strictly correct, but correct enough. // // Finds the two points on the line from center to center, and returns the distance between them. diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/ConstructPresetDialog/ConstructPresetDialog.cpp b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/ConstructPresetDialog/ConstructPresetDialog.cpp index 73655cf41d..bde2135b9e 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/ConstructPresetDialog/ConstructPresetDialog.cpp +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/ConstructPresetDialog/ConstructPresetDialog.cpp @@ -445,7 +445,6 @@ namespace GraphCanvas if (newIndex >= 0) { - QModelIndex index = m_presetsModel->index(newIndex, 0); m_ui->constructTypes->setCurrentIndex(newIndex); } } diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/GraphCanvasGraphicsView/GraphCanvasGraphicsView.cpp b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/GraphCanvasGraphicsView/GraphCanvasGraphicsView.cpp index f0b4d264ca..fa7e051035 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/GraphCanvasGraphicsView/GraphCanvasGraphicsView.cpp +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/GraphCanvasGraphicsView/GraphCanvasGraphicsView.cpp @@ -1488,7 +1488,6 @@ namespace GraphCanvas void GraphCanvasGraphicsView::SaveViewParams() { - QPointF centerPoint = mapToScene(rect().center()); QPointF anchorPoint = mapToScene(rect().topLeft()); m_viewParams.m_anchorPointX = aznumeric_cast(anchorPoint.x()); diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/Model/NodePaletteSortFilterProxyModel.cpp b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/Model/NodePaletteSortFilterProxyModel.cpp index 89e0ef3aac..33d11f998e 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/Model/NodePaletteSortFilterProxyModel.cpp +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/Model/NodePaletteSortFilterProxyModel.cpp @@ -202,8 +202,6 @@ namespace GraphCanvas AZStd::list exploreItems; exploreItems.push_back(treeItem); - const QModelIndex k_flagIndex; - while (!exploreItems.empty()) { const GraphCanvas::GraphCanvasTreeItem* currentItem = exploreItems.front(); From 323d642e658b4d431929befed4884677d4c65304 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 18:01:54 -0700 Subject: [PATCH 30/49] Gems/ScriptCanvas Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../ScriptCanvasBuilderWorkerUtility.cpp | 6 ------ .../Assets/ScriptCanvasAssetHelpers.cpp | 1 - .../Editor/Assets/ScriptCanvasAssetHolder.cpp | 2 +- .../Editor/Assets/ScriptCanvasMemoryAsset.cpp | 4 +--- .../Code/Editor/Components/EditorGraph.cpp | 9 -------- .../Code/Editor/Nodes/NodeDisplayUtils.cpp | 1 - .../Code/Editor/Nodes/NodeUtils.cpp | 21 ------------------- .../Code/Editor/SystemComponent.cpp | 2 +- .../Widgets/NodePalette/NodePaletteModel.cpp | 10 --------- .../StatisticsDialog/NodeUsageTreeItem.cpp | 2 -- .../GraphValidationDockWidget.cpp | 1 - .../VariablePanel/VariableDockWidget.cpp | 2 +- .../Code/Editor/View/Windows/MainWindow.cpp | 8 +++---- .../Windows/Tools/UpgradeTool/UpgradeTool.cpp | 2 +- .../Tools/UpgradeTool/VersionExplorer.cpp | 3 +-- .../Code/Include/ScriptCanvas/Core/Core.cpp | 2 -- .../Code/Include/ScriptCanvas/Core/Node.cpp | 2 -- .../ScriptCanvas/Grammar/ParsingUtilities.cpp | 2 -- .../ScriptCanvas/Grammar/Primitives.cpp | 1 - .../Libraries/Core/FunctionDefinitionNode.cpp | 2 +- .../Libraries/Core/ReceiveScriptEvent.cpp | 1 - .../Operators/Containers/OperatorAt.cpp | 2 +- .../Operators/Containers/OperatorBack.cpp | 2 +- .../ScriptCanvas/Variable/VariableData.cpp | 1 - .../Code/Source/PerformanceStatistician.cpp | 1 - .../EditorAutomationStates/UtilityStates.h | 1 - .../NodePaletteFullCreation.cpp | 2 -- .../EditorMouseActions.cpp | 2 +- .../ScriptCanvasActions/VariableActions.cpp | 1 - .../EditorAutomationStates/UtilityStates.cpp | 1 - .../Source/EditorAutomationTestDialog.h | 2 -- .../EditorAutomationTests/VariableTests.cpp | 1 - .../EditorAutomationTests/VariableTests.h | 3 --- .../Code/Editor/Source/WrapperMock.cpp | 1 - .../Code/Tests/ScriptCanvasPhysicsTest.cpp | 3 --- .../Code/Tests/ScriptCanvas_Core.cpp | 6 +++--- .../Code/Tests/ScriptCanvas_Variables.cpp | 4 ---- 37 files changed, 16 insertions(+), 101 deletions(-) diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp index af5e49bdeb..0853789b19 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp @@ -486,7 +486,6 @@ namespace ScriptCanvasBuilder AZ::Outcome ProcessTranslationJob(ProcessTranslationJobInput& input) { - const bool saveRawLua{ true }; auto sourceGraph = PrepareSourceGraph(input.buildEntity); auto version = sourceGraph->GetVersion(); @@ -651,11 +650,6 @@ namespace ScriptCanvasBuilder for (const auto& assetDependency : runtimeData.m_requiredAssets) { - auto filterScripts = [](const AZ::Data::Asset& asset) - { - return asset.GetType() != azrtti_typeid(); - }; - if (AZ::Data::AssetManager::Instance().GetAsset(assetDependency.GetId(), assetDependency.GetType(), AZ::Data::AssetLoadBehavior::PreLoad)) { jobProduct.m_dependencies.push_back({ assetDependency.GetId(), {} }); diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp index 554bb31b25..884fa2d5c9 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp @@ -41,7 +41,6 @@ namespace ScriptCanvasEditor bool sourceInfoFound{}; AzToolsFramework::AssetSystemRequestBus::BroadcastResult(sourceInfoFound, &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourcePath, fullPath.data(), catalogAssetInfo, watchFolder); - auto saveAssetId = sourceInfoFound ? catalogAssetInfo.m_assetId : AZ::Data::AssetId(AZ::Uuid::CreateRandom()); if (sourceInfoFound) { outAssetInfo = catalogAssetInfo; diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHolder.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHolder.cpp index 5c62844e9f..a42a9bad48 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHolder.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHolder.cpp @@ -67,7 +67,7 @@ namespace ScriptCanvasEditor { AssetTrackerNotificationBus::Handler::BusConnect(m_scriptCanvasAsset.GetId()); - Callbacks::OnAssetReadyCallback onAssetReady = [this](ScriptCanvasMemoryAsset& asset) + Callbacks::OnAssetReadyCallback onAssetReady = [](ScriptCanvasMemoryAsset& asset) { AssetHelpers::DumpAssetInfo(asset.GetFileAssetId(), "ScriptCanvasAssetHolder::Init"); }; diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp index e7dc2343f2..dbb95828f7 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp @@ -374,7 +374,6 @@ namespace ScriptCanvasEditor } else { - AZ::Data::AssetId assetId = asset.GetId(); Internal::MemoryAssetSystemNotificationBus::Broadcast(&Internal::MemoryAssetSystemNotifications::OnAssetReloaded, this); } } @@ -392,7 +391,6 @@ namespace ScriptCanvasEditor } else { - AZ::Data::AssetId assetId = asset.GetId(); Internal::MemoryAssetSystemNotificationBus::Broadcast(&Internal::MemoryAssetSystemNotifications::OnAssetError, this); } } @@ -505,7 +503,7 @@ namespace ScriptCanvasEditor m_pendingSave.emplace_back(normPath); m_assetSaveFinalizer.Reset(); - m_assetSaveFinalizer.Start(this, fileInfo, saveInfo, onSaveCallback, AssetSaveFinalizer::OnCompleteHandler([this, saveInfo](AZ::Data::AssetId /*assetId*/) + m_assetSaveFinalizer.Start(this, fileInfo, saveInfo, onSaveCallback, AssetSaveFinalizer::OnCompleteHandler([saveInfo](AZ::Data::AssetId /*assetId*/) { })); } diff --git a/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp b/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp index 325c348d9c..1899951638 100644 --- a/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp @@ -1034,16 +1034,9 @@ namespace ScriptCanvasEditor if (connection) { - ScriptCanvas::Endpoint scSourceEndpoint = connection->GetSourceEndpoint(); - GraphCanvas::Endpoint sourceEndpoint = ConvertToGraphCanvasEndpoint(scSourceEndpoint); - - ScriptCanvas::Endpoint scTargetEndpoint = connection->GetTargetEndpoint(); - GraphCanvas::Endpoint targetEndpoint = ConvertToGraphCanvasEndpoint(scTargetEndpoint); - ScriptCanvas::GraphNotificationBus::Event(GetScriptCanvasId(), &ScriptCanvas::GraphNotifications::OnDisonnectionComplete, connectionId); DisconnectById(scConnectionId); - } } @@ -2666,8 +2659,6 @@ namespace ScriptCanvasEditor AZStd::vector< GraphCanvas::SlotId > slotIds; GraphCanvas::NodeRequestBus::EventResult(slotIds, nodeId, &GraphCanvas::NodeRequests::GetSlotIds); - GraphCanvas::GraphId graphCanvasGraphId = GetGraphCanvasGraphId(); - for (const GraphCanvas::SlotId& slotId : slotIds) { GraphCanvas::SlotType slotType = GraphCanvas::SlotTypes::Invalid; diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp index b9e96938af..8d616f0a68 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp @@ -744,7 +744,6 @@ namespace ScriptCanvasEditor::Nodes return graphCanvasNodeId; } - auto busId = senderNode->GetBusSlotId(); for (const auto& slot : senderNode->GetSlots()) { if (slot.IsVisible()) diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp index 000dafed88..3c5e74cbeb 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp @@ -14,27 +14,6 @@ #include -namespace -{ - ScriptCanvas::ConnectionType ToScriptCanvasConnectionType(GraphCanvas::ConnectionType connectionType) - { - ScriptCanvas::ConnectionType scriptCanvasConnectionType = ScriptCanvas::ConnectionType::Unknown; - switch (connectionType) - { - case GraphCanvas::CT_Input: - scriptCanvasConnectionType = ScriptCanvas::ConnectionType::Input; - break; - case GraphCanvas::CT_Output: - scriptCanvasConnectionType = ScriptCanvas::ConnectionType::Output; - break; - default: - break; - } - - return scriptCanvasConnectionType; - } -} - namespace ScriptCanvasEditor::Nodes { void CopyTranslationKeyedNameToDatumLabel(const AZ::EntityId& graphCanvasNodeId, diff --git a/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp b/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp index b80bba75c2..4b60fd357c 100644 --- a/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp @@ -332,7 +332,7 @@ namespace ScriptCanvasEditor if (isScriptCanvasAsset) { - auto scriptCanvasEditorCallback = [this]([[maybe_unused]] const char* fullSourceFileNameInCall, const AZ::Uuid& sourceUUIDInCall) + auto scriptCanvasEditorCallback = []([[maybe_unused]] const char* fullSourceFileNameInCall, const AZ::Uuid& sourceUUIDInCall) { AZ::Outcome openOutcome = AZ::Failure(AZStd::string()); const SourceAssetBrowserEntry* fullDetails = SourceAssetBrowserEntry::GetSourceByUuid(sourceUUIDInCall); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp index 0949daa458..38def487e6 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp @@ -87,16 +87,6 @@ namespace return AZ::FindAttribute(attribute, method->m_attributes) != nullptr; // warning C4800: 'AZ::Attribute *': forcing value to bool 'true' or 'false' (performance warning) } - bool HasAttribute(const AZ::BehaviorClass* behaviorClass, AZ::Crc32 attributeCrc) - { - AZ::Attribute* attribute = AZ::FindAttribute(attributeCrc, behaviorClass->m_attributes); - if (attribute) - { - return true; - } - return false; - } - // Checks for and returns the Category attribute from an AZ::AttributeArray AZStd::string GetCategoryPath(const AZ::AttributeArray& attributes, const AZ::BehaviorContext& behaviorContext) { diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/NodeUsageTreeItem.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/NodeUsageTreeItem.cpp index ddcdaad161..4dce7ce384 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/NodeUsageTreeItem.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/NodeUsageTreeItem.cpp @@ -152,8 +152,6 @@ namespace ScriptCanvasEditor m_assetType = assetType; - const bool loadBlocking = false; - auto onAssetReady = [](ScriptCanvasMemoryAsset&) {}; AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::Load, m_assetId, m_assetType, onAssetReady); } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/ValidationPanel/GraphValidationDockWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/ValidationPanel/GraphValidationDockWidget.cpp index 6d29c01ff4..da7fab5405 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/ValidationPanel/GraphValidationDockWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/ValidationPanel/GraphValidationDockWidget.cpp @@ -810,7 +810,6 @@ namespace ScriptCanvasEditor const ScriptCanvas::ValidationEvent* validationEvent = model->FindItemForIndex(m_proxyModel->mapToSource(modelIndex)); AZ::EntityId graphCanvasMemberId; - QRectF focusArea; if (const ScriptCanvas::FocusOnEntityEffect* focusOnEntityEffect = azrtti_cast(validationEvent)) { diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp index 60bc7ba0d2..eb2f92f42c 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp @@ -258,7 +258,7 @@ namespace ScriptCanvasEditor QObject::connect(pasteAction, &QAction::triggered, - [dockWidget, varId](bool) + [dockWidget](bool) { GraphVariablesTableView::HandleVariablePaste(dockWidget->GetActiveScriptCanvasId()); }); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp index 87bf4cf23c..f4241e3545 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp @@ -323,14 +323,13 @@ namespace ScriptCanvasEditor m_mainWindow->OnWorkspaceRestoreStart(); } - AZ::Data::AssetId focusedAsset = workspace->GetFocusedAssetId(); m_queuedAssetFocus = workspace->GetFocusedAssetId(); for (const auto& assetSaveData : workspace->GetActiveAssetData()) { AssetTrackerNotificationBus::MultiHandler::BusConnect(assetSaveData.m_assetId); - Callbacks::OnAssetReadyCallback onAssetReady = [this, focusedAsset, assetSaveData](ScriptCanvasMemoryAsset& asset) + Callbacks::OnAssetReadyCallback onAssetReady = [this, assetSaveData](ScriptCanvasMemoryAsset& asset) { // If we get an error callback. Just remove it from out active lists. if (asset.IsSourceInError()) @@ -1020,7 +1019,7 @@ namespace ScriptCanvasEditor if (shouldSaveResults == UnsavedChangesOptions::SAVE) { - Callbacks::OnSave saveCB = [this, assetId](bool isSuccessful, AZ::Data::AssetPtr, AZ::Data::AssetId) + Callbacks::OnSave saveCB = [this](bool isSuccessful, AZ::Data::AssetPtr, AZ::Data::AssetId) { if (isSuccessful) { @@ -1610,7 +1609,7 @@ namespace ScriptCanvasEditor return; } - Callbacks::OnAssetReadyCallback onAssetReady = [this, fullPath, assetInfo](ScriptCanvasMemoryAsset&) + Callbacks::OnAssetReadyCallback onAssetReady = [this, assetInfo](ScriptCanvasMemoryAsset&) { ScriptCanvasMemoryAsset::pointer memoryAsset; AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetInfo.m_assetId); @@ -2527,7 +2526,6 @@ namespace ScriptCanvasEditor void MainWindow::UpdateWorkspaceStatus(const ScriptCanvasMemoryAsset& memoryAsset) { AZ::Data::AssetId fileAssetId = memoryAsset.GetFileAssetId(); - AZ::Data::AssetId memoryAssetId = memoryAsset.GetId(); size_t eraseCount = m_loadingAssets.erase(fileAssetId); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeTool.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeTool.cpp index e069c509ce..3d42fdad42 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeTool.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeTool.cpp @@ -437,7 +437,7 @@ namespace ScriptCanvasEditor auto streamer = AZ::Interface::Get(); AZ::IO::FileRequestPtr flushRequest = streamer->FlushCache(assetToUpgrade.m_relativePath); - streamer->SetRequestCompleteCallback(flushRequest, [this]([[maybe_unused]] AZ::IO::FileRequestHandle request) + streamer->SetRequestCompleteCallback(flushRequest, []([[maybe_unused]] AZ::IO::FileRequestHandle request) { }); streamer->QueueRequest(flushRequest); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/VersionExplorer.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/VersionExplorer.cpp index b9aff660f2..c04bea9698 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/VersionExplorer.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/VersionExplorer.cpp @@ -725,7 +725,7 @@ namespace ScriptCanvasEditor spinner->SetIsBusy(true); rowGoToButton->setEnabled(false); - m_inProgressAsset = AZStd::find_if(m_assetsToUpgrade.begin(), m_assetsToUpgrade.end(), [this, asset](const UpgradeAssets::value_type& assetToUpgrade) + m_inProgressAsset = AZStd::find_if(m_assetsToUpgrade.begin(), m_assetsToUpgrade.end(), [asset](const UpgradeAssets::value_type& assetToUpgrade) { return assetToUpgrade.GetId() == asset.GetId(); }); @@ -807,7 +807,6 @@ namespace ScriptCanvasEditor const QTextCursor oldCursor = m_ui->textEdit->textCursor(); QScrollBar* scrollBar = m_ui->textEdit->verticalScrollBar(); - const int oldScrollValue = scrollBar->value(); m_ui->textEdit->moveCursor(QTextCursor::End); QTextCursor textCursor = m_ui->textEdit->textCursor(); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.cpp index a5e73005c1..c45dc01c35 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.cpp @@ -54,8 +54,6 @@ namespace ScriptCanvas auto lhsIter = lhs.begin(); auto rhsIter = rhs.begin(); - const bool isCaseSensitive = false; - for (; lhsIter != lhs.end(); ++lhsIter, ++rhsIter) { if (!AZ::StringFunc::Equal(lhsIter->c_str(), rhsIter->c_str())) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp index 28f0519552..7dda4d4609 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp @@ -1461,8 +1461,6 @@ namespace ScriptCanvas return slot.GetDataType(); } - Endpoint endpoint = slot.GetEndpoint(); - auto connectedNodes = GetConnectedNodes(slot); for (auto endpointPair : connectedNodes) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingUtilities.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingUtilities.cpp index caae465964..dc33e6bae6 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingUtilities.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingUtilities.cpp @@ -707,8 +707,6 @@ namespace ScriptCanvas return false; } - auto id = execution->GetId(); - if (ActivatesSelf(execution)) { return true; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/Primitives.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/Primitives.cpp index ee7c1ee2d2..59f12481e7 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/Primitives.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/Primitives.cpp @@ -55,7 +55,6 @@ namespace ScriptCanvas AZStd::vector tokens; AzFramework::StringFunc::Tokenize(name, tokens, Grammar::k_luaSpecialCharacters); AZStd::string joinResult; - const size_t length = tokens.size(); for (auto& token : tokens) { joinResult.append(token); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/FunctionDefinitionNode.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/FunctionDefinitionNode.cpp index 071528d5b4..6cda0b75dd 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/FunctionDefinitionNode.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/FunctionDefinitionNode.cpp @@ -166,7 +166,7 @@ namespace ScriptCanvas } }, { - [this]() + []() { DisallowReentrantExecutionContract* reentrantContract = aznew DisallowReentrantExecutionContract(); return reentrantContract; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp index 8a86347aa3..b874077834 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp @@ -86,7 +86,6 @@ namespace ScriptCanvas if (!wasConfigured) { - AZ::Uuid addressTypeId = m_definition.GetAddressType(); AZ::Uuid addressId = m_definition.GetAddressTypeProperty().GetId(); if (m_definition.IsAddressRequired()) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.cpp index 868ad34650..e44fd0b1f1 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.cpp @@ -23,7 +23,7 @@ namespace ScriptCanvas if (sourceType == SourceType::SourceInput) { ContractDescriptor supportsMethodContract; - supportsMethodContract.m_createFunc = [this]() -> SupportsMethodContract* { return aznew SupportsMethodContract("At"); }; + supportsMethodContract.m_createFunc = []() -> SupportsMethodContract* { return aznew SupportsMethodContract("At"); }; contractDescs.push_back(AZStd::move(supportsMethodContract)); } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.cpp index e665d145e9..66d33d4c8f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.cpp @@ -23,7 +23,7 @@ namespace ScriptCanvas if (sourceType == SourceType::SourceInput) { ContractDescriptor supportsMethodContract; - supportsMethodContract.m_createFunc = [this]() -> SupportsMethodContract* { return aznew SupportsMethodContract("Back"); }; + supportsMethodContract.m_createFunc = []() -> SupportsMethodContract* { return aznew SupportsMethodContract("Back"); }; contractDescs.push_back(AZStd::move(supportsMethodContract)); } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/VariableData.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/VariableData.cpp index 7474ebbf35..9869602c84 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/VariableData.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/VariableData.cpp @@ -144,7 +144,6 @@ namespace ScriptCanvas GraphVariable* VariableData::FindVariable(VariableId variableId) { - AZStd::pair resultPair; auto foundIt = m_variableMap.find(variableId); return foundIt != m_variableMap.end() ? &foundIt->second : nullptr; } diff --git a/Gems/ScriptCanvas/Code/Source/PerformanceStatistician.cpp b/Gems/ScriptCanvas/Code/Source/PerformanceStatistician.cpp index e5a5b3cd19..826490e487 100644 --- a/Gems/ScriptCanvas/Code/Source/PerformanceStatistician.cpp +++ b/Gems/ScriptCanvas/Code/Source/PerformanceStatistician.cpp @@ -104,7 +104,6 @@ namespace ScriptCanvas void PerformanceStatistician::OnStartTrackingRequested() { m_accumulatedStats.tickCount = 0; - m_accumulatedTickCountRemaining; m_accumulatedStartTime = AZStd::chrono::system_clock::now(); } diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationStates/UtilityStates.h b/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationStates/UtilityStates.h index e6cdf0e390..429331e054 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationStates/UtilityStates.h +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationStates/UtilityStates.h @@ -139,7 +139,6 @@ namespace ScriptCanvasDeveloper void OnStateActionsComplete() override; private: - int m_row = 0; int m_rowCount = 0; MoveMouseToViewRowAction* m_mouseToRow = nullptr; diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/AutomationActions/NodePaletteFullCreation.cpp b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/AutomationActions/NodePaletteFullCreation.cpp index 35dc250a33..3a66aefe6b 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/AutomationActions/NodePaletteFullCreation.cpp +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/AutomationActions/NodePaletteFullCreation.cpp @@ -92,8 +92,6 @@ namespace ScriptCanvasDeveloperEditor int m_heightOffset = 0; int m_maxRowHeight = 0; - - int creationCounter = 100; }; void NodePaletteFullCreationAction() diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/EditorMouseActions.cpp b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/EditorMouseActions.cpp index cf757af1ec..0ef306f638 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/EditorMouseActions.cpp +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/EditorMouseActions.cpp @@ -155,7 +155,6 @@ namespace ScriptCanvasDeveloper m_startPosition = QCursor::pos(); } - QPointF currentPosition = QCursor::pos(); QPointF targetPoint = m_targetPosition; float percentage = aznumeric_cast(m_tickCount)/aznumeric_cast(m_tickDuration); @@ -170,6 +169,7 @@ namespace ScriptCanvasDeveloper #if defined(AZ_COMPILER_MSVC) INPUT osInput = { 0 }; + QPointF currentPosition = QCursor::pos(); osInput.type = INPUT_MOUSE; osInput.mi.mouseData = 0; diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/VariableActions.cpp b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/VariableActions.cpp index d46f52bfdf..72203f6710 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/VariableActions.cpp +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/VariableActions.cpp @@ -275,7 +275,6 @@ namespace ScriptCanvasDeveloper } QRegion region = m_graphPalette->visibleRegion(); - QRect boundingRegion = region.boundingRect(); m_indexIsVisible = region.contains(m_graphPalette->visualRect(m_displayIndex).center()); } diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationStates/UtilityStates.cpp b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationStates/UtilityStates.cpp index 459dc82542..6b0636fbdd 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationStates/UtilityStates.cpp +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationStates/UtilityStates.cpp @@ -187,7 +187,6 @@ namespace ScriptCanvasDeveloper DeleteVariableRowFromPaletteState::DeleteVariableRowFromPaletteState(int row) : NamedAutomationState("DeleteVariableRowFromPaletteState") - , m_row(row) , m_clickAction(Qt::MouseButton::LeftButton) , m_deleteAction(VK_DELETE) { diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTestDialog.h b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTestDialog.h index 0284e2588e..84597a991c 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTestDialog.h +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTestDialog.h @@ -133,7 +133,5 @@ namespace ScriptCanvasDeveloper QLabel* m_errorTestLabel = nullptr; QLabel* m_runLabel = nullptr; QMainWindow* m_scriptCanvasWindow = nullptr; - - QWindow* m_canvasWindow = nullptr; }; } diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/VariableTests.cpp b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/VariableTests.cpp index 860d9af27a..c259a626ee 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/VariableTests.cpp +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/VariableTests.cpp @@ -669,7 +669,6 @@ namespace ScriptCanvasDeveloper VariableLifeCycleTest::VariableLifeCycleTest(AZStd::string name, AZStd::vector dataTypes, CreateVariableAction::CreationType creationType) : EditorAutomationTest(name.c_str()) - , m_creationType(creationType) , m_typesToMake(dataTypes) { m_variableTypeId = "ActiveVariableTypeId"; diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/VariableTests.h b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/VariableTests.h index d4438d222a..252227cf17 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/VariableTests.h +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/VariableTests.h @@ -256,14 +256,11 @@ namespace ScriptCanvasDeveloper int SetupNextVariable(); - CreateVariableAction::CreationType m_creationType = CreateVariableAction::CreationType::AutoComplete; - ScriptCanvas::VariableId m_activeVariableId; AZStd::vector m_createVariables; AZStd::vector m_typesToMake; bool m_createVariablesNodesViaContextMenu = true; - bool m_closedGraph = false; int m_activeIndex = 0; GraphCanvas::ViewId m_viewId; diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/WrapperMock.cpp b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/WrapperMock.cpp index f26c36573c..6663a7a5cd 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/WrapperMock.cpp +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/WrapperMock.cpp @@ -67,7 +67,6 @@ namespace ScriptCanvasDeveloper ScriptCanvasEditor::NodeIdPair nodePair; - const AZ::Vector2 scenePointVec2 = AZ::Vector2(aznumeric_cast(scenePoint.x()), aznumeric_cast(scenePoint.y())); if (result == addMock) { ScriptCanvasEditor::EditorGraphRequestBus::EventResult(nodePair, scriptCanvasId, &ScriptCanvasEditor::EditorGraphRequests::CreateCustomNode, azrtti_typeid(), AZ::Vector2(aznumeric_cast(scenePoint.x()), aznumeric_cast(scenePoint.y()))); diff --git a/Gems/ScriptCanvasPhysics/Code/Tests/ScriptCanvasPhysicsTest.cpp b/Gems/ScriptCanvasPhysics/Code/Tests/ScriptCanvasPhysicsTest.cpp index 14eb69d669..ac6109ce30 100644 --- a/Gems/ScriptCanvasPhysics/Code/Tests/ScriptCanvasPhysicsTest.cpp +++ b/Gems/ScriptCanvasPhysics/Code/Tests/ScriptCanvasPhysicsTest.cpp @@ -313,7 +313,6 @@ namespace ScriptCanvasPhysicsTests .WillByDefault(Return(m_hitResult)); // given raycast data - const AZ::Vector3 start = AZ::Vector3::CreateZero(); const AZ::Vector3 direction = AZ::Vector3(0.f,1.f,0.f); const float distance = 1.f; const AZStd::string collisionGroup = "default"; @@ -346,7 +345,6 @@ namespace ScriptCanvasPhysicsTests .WillByDefault(Return(m_hitResult)); // given raycast data - const AZ::Vector3 start = AZ::Vector3::CreateZero(); const AZ::Vector3 direction = AZ::Vector3(0.f,1.f,0.f); const float distance = 1.f; const AZStd::string collisionGroup = "default"; @@ -385,7 +383,6 @@ namespace ScriptCanvasPhysicsTests .WillByDefault(Return(m_hitResult)); // given shapecast data - const AZ::Vector3 start = AZ::Vector3::CreateZero(); const AZ::Vector3 direction = AZ::Vector3(0.f,1.f,0.f); const float distance = 1.f; const AZStd::string collisionGroup = "default"; diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp index 406163108d..f6fce5ddb5 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp @@ -360,16 +360,16 @@ TEST_F(ScriptCanvasTestFixture, ValueTypes) double numberDoubleValue = *numberDouble.GetAs(); Datum numberHex(Datum(0xff)); - /*int numberHexValue =*/ *numberHex.GetAs(); + [[maybe_unused]] int numberHexValue = *numberHex.GetAs(); Datum numberPi(Datum(3.14f)); float numberPiValue = *numberPi.GetAs(); Datum numberSigned(Datum(-100)); - /*int numberSignedValue =*/ *numberSigned.GetAs(); + [[maybe_unused]] int numberSignedValue = *numberSigned.GetAs(); Datum numberUnsigned(Datum(100u)); - /*unsigned int numberUnsignedValue =*/ *numberUnsigned.GetAs(); + [[maybe_unused]] unsigned int numberUnsignedValue = *numberUnsigned.GetAs(); Datum numberDoublePi(Datum(6.28)); double numberDoublePiValue = *numberDoublePi.GetAs(); diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Variables.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Variables.cpp index 7b91768d84..01472f2e88 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Variables.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Variables.cpp @@ -207,28 +207,24 @@ TEST_F(ScriptCanvasTestFixture, RemoveVariableTest) GraphVariableManagerRequestBus::EventResult(addPropertyOutcome, scriptCanvasId, &GraphVariableManagerRequests::AddVariable, "FirstVector3", vector3Datum1, false); EXPECT_TRUE(addPropertyOutcome); EXPECT_TRUE(addPropertyOutcome.GetValue().IsValid()); - const VariableId firstVector3Id = addPropertyOutcome.GetValue(); ++numVariablesAdded; addPropertyOutcome = AZ::Failure(AZStd::string("Uninitialized")); GraphVariableManagerRequestBus::EventResult(addPropertyOutcome, scriptCanvasId, &GraphVariableManagerRequests::AddVariable, "SecondVector3", vector3Datum2, false); EXPECT_TRUE(addPropertyOutcome); EXPECT_TRUE(addPropertyOutcome.GetValue().IsValid()); - const VariableId secondVector3Id = addPropertyOutcome.GetValue(); ++numVariablesAdded; addPropertyOutcome = AZ::Failure(AZStd::string("Uninitialized")); GraphVariableManagerRequestBus::EventResult(addPropertyOutcome, scriptCanvasId, &GraphVariableManagerRequests::AddVariable, "FirstVector4", vector4Datum, false); EXPECT_TRUE(addPropertyOutcome); EXPECT_TRUE(addPropertyOutcome.GetValue().IsValid()); - const VariableId firstVector4Id = addPropertyOutcome.GetValue(); ++numVariablesAdded; addPropertyOutcome = AZ::Failure(AZStd::string("Uninitialized")); GraphVariableManagerRequestBus::EventResult(addPropertyOutcome, scriptCanvasId, &GraphVariableManagerRequests::AddVariable, "ProjectionMatrix", behaviorMatrix4x4Datum, false); EXPECT_TRUE(addPropertyOutcome); EXPECT_TRUE(addPropertyOutcome.GetValue().IsValid()); - const VariableId projectionMatrixId = addPropertyOutcome.GetValue(); ++numVariablesAdded; addPropertyOutcome = AZ::Failure(AZStd::string("Uninitialized")); From 5e9872f7ce9a122f447ba9b6c3bf0986666436ac Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 18:02:08 -0700 Subject: [PATCH 31/49] other gems Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp | 8 ++++---- .../DependencyBuilder/DependencyBuilderWorker.cpp | 3 +-- .../Builders/DependencyBuilder/DependencyBuilderWorker.h | 1 - Gems/LyShine/Code/Editor/ComponentHelpers.cpp | 2 +- Gems/SliceFavorites/Code/Source/FavoriteDataModel.cpp | 2 +- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp index 2204034185..836eec682e 100644 --- a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp +++ b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp @@ -955,14 +955,14 @@ namespace LandscapeCanvasEditor auto redoAction = new QAction(QObject::tr("&Redo"), this); redoAction->setShortcut(AzQtComponents::RedoKeySequence); - QObject::connect(redoAction, &QAction::triggered, [this] { + QObject::connect(redoAction, &QAction::triggered, [] { GetLegacyEditor()->Redo(); }); menu->insertAction(separatorAction, redoAction); auto undoAction = new QAction(QObject::tr("&Undo"), this); undoAction->setShortcut(QKeySequence::Undo); - QObject::connect(undoAction, &QAction::triggered, [this] { + QObject::connect(undoAction, &QAction::triggered, [] { GetLegacyEditor()->Undo(); }); menu->insertAction(redoAction, undoAction); @@ -2852,7 +2852,7 @@ namespace LandscapeCanvasEditor // For any node with an Entity Name slot, we need to replace the string property display with a read-only version // instead until we have support for listening for GraphModel slot value changes. We need to delay this because // when the node is added, the slots haven't been added to the element map yet. - QTimer::singleShot(0, [this, node, graphId]() { + QTimer::singleShot(0, [node, graphId]() { GraphModel::SlotPtr slot = node->GetSlot(LandscapeCanvas::ENTITY_NAME_SLOT_ID); if (slot) { @@ -2976,7 +2976,7 @@ namespace LandscapeCanvasEditor AzToolsFramework::EntityIdList vegetationAreaIds; m_serializeContext->EnumerateObject(component, // beginElemCB - [this, &previewEntityId, &inboundShapeEntityId, &gradientSamplerIds, &vegetationAreaIds](void *instance, [[maybe_unused]] const AZ::SerializeContext::ClassData *classData, const AZ::SerializeContext::ClassElement *classElement) -> bool + [&previewEntityId, &inboundShapeEntityId, &gradientSamplerIds, &vegetationAreaIds](void *instance, [[maybe_unused]] const AZ::SerializeContext::ClassData *classData, const AZ::SerializeContext::ClassElement *classElement) -> bool { if (classElement && (classElement->m_typeId == azrtti_typeid())) { diff --git a/Gems/LmbrCentral/Code/Source/Builders/DependencyBuilder/DependencyBuilderWorker.cpp b/Gems/LmbrCentral/Code/Source/Builders/DependencyBuilder/DependencyBuilderWorker.cpp index c67dad89b3..dc060ee7cf 100644 --- a/Gems/LmbrCentral/Code/Source/Builders/DependencyBuilder/DependencyBuilderWorker.cpp +++ b/Gems/LmbrCentral/Code/Source/Builders/DependencyBuilder/DependencyBuilderWorker.cpp @@ -12,9 +12,8 @@ namespace DependencyBuilder { - DependencyBuilderWorker::DependencyBuilderWorker(AZStd::string jobKey, bool critical) + DependencyBuilderWorker::DependencyBuilderWorker(AZStd::string jobKey, [[maybe_unused]] bool critical) : m_jobKey(jobKey) - , m_critical(critical) { } diff --git a/Gems/LmbrCentral/Code/Source/Builders/DependencyBuilder/DependencyBuilderWorker.h b/Gems/LmbrCentral/Code/Source/Builders/DependencyBuilder/DependencyBuilderWorker.h index 91e657dc2d..76c46fde35 100644 --- a/Gems/LmbrCentral/Code/Source/Builders/DependencyBuilder/DependencyBuilderWorker.h +++ b/Gems/LmbrCentral/Code/Source/Builders/DependencyBuilder/DependencyBuilderWorker.h @@ -38,7 +38,6 @@ namespace DependencyBuilder private: AZStd::string m_jobKey; - bool m_critical = false; bool m_isShuttingDown = false; }; } diff --git a/Gems/LyShine/Code/Editor/ComponentHelpers.cpp b/Gems/LyShine/Code/Editor/ComponentHelpers.cpp index b2c3d20025..d7ba13cb7c 100644 --- a/Gems/LyShine/Code/Editor/ComponentHelpers.cpp +++ b/Gems/LyShine/Code/Editor/ComponentHelpers.cpp @@ -764,7 +764,7 @@ namespace ComponentHelpers QObject::connect(action, &QAction::triggered, hierarchy, - [serializeContext, hierarchy, componentClass, items]([[maybe_unused]] bool checked) + [hierarchy, componentClass, items]([[maybe_unused]] bool checked) { EBUS_EVENT(UiEditorInternalNotificationBus, OnBeginUndoableEntitiesChange); diff --git a/Gems/SliceFavorites/Code/Source/FavoriteDataModel.cpp b/Gems/SliceFavorites/Code/Source/FavoriteDataModel.cpp index 94b9d78247..6ef49f4a1b 100644 --- a/Gems/SliceFavorites/Code/Source/FavoriteDataModel.cpp +++ b/Gems/SliceFavorites/Code/Source/FavoriteDataModel.cpp @@ -562,7 +562,7 @@ namespace SliceFavorites // Rebuild the menu from the current tree m_favoritesMenu->clear(); - m_favoritesMenu->addAction(QIcon(":/Icons/SliceFavorite_Icon_Manage"), "Manage favorites...", m_favoritesMenu.get(), [this]() + m_favoritesMenu->addAction(QIcon(":/Icons/SliceFavorite_Icon_Manage"), "Manage favorites...", m_favoritesMenu.get(), []() { AzToolsFramework::OpenViewPane(SliceFavorites::ManageSliceFavorites); }); From c07b9d31bf1c1aca107823b5ad91c3fb1b0641af Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 19:21:50 -0700 Subject: [PATCH 32/49] PR comments/improvements Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Framework/AzCore/AzCore/Math/Guid.h | 2 +- Code/Framework/AzNetworking/AzNetworking/Utilities/Endian.h | 4 ++-- Code/Legacy/CryCommon/CryLibrary.h | 6 +++--- Code/Legacy/CrySystem/XML/xml.cpp | 4 ++-- Gems/AtomLyIntegration/AtomFont/Code/Source/AtomFont.cpp | 1 - 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Math/Guid.h b/Code/Framework/AzCore/AzCore/Math/Guid.h index e2a56f86d8..9889092743 100644 --- a/Code/Framework/AzCore/AzCore/Math/Guid.h +++ b/Code/Framework/AzCore/AzCore/Math/Guid.h @@ -66,7 +66,7 @@ typedef const GUID& REFIID; const GUID name \ = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } -inline static REFGUID GUID_NULL() +inline REFGUID GUID_NULL() { static GUID guid = { 0x00000000L, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; return guid; diff --git a/Code/Framework/AzNetworking/AzNetworking/Utilities/Endian.h b/Code/Framework/AzNetworking/AzNetworking/Utilities/Endian.h index df6dd87494..74bcd53877 100644 --- a/Code/Framework/AzNetworking/AzNetworking/Utilities/Endian.h +++ b/Code/Framework/AzNetworking/AzNetworking/Utilities/Endian.h @@ -14,14 +14,14 @@ #include #if AZ_TRAIT_NEEDS_HTONLL -inline static const uint64_t htonll(uint64_t value) +inline const uint64_t htonll(uint64_t value) { const uint32_t hiValue = htonl(static_cast(value >> 32)); const uint32_t loValue = htonl(static_cast(value & 0x00000000FFFFFFFF)); return static_cast(hiValue) << 32 | static_cast(loValue); } -inline static const uint64_t ntohll(uint64_t value) +inline const uint64_t ntohll(uint64_t value) { return htonll(value); } diff --git a/Code/Legacy/CryCommon/CryLibrary.h b/Code/Legacy/CryCommon/CryLibrary.h index b7e1c0f359..e12e7c6c36 100644 --- a/Code/Legacy/CryCommon/CryLibrary.h +++ b/Code/Legacy/CryCommon/CryLibrary.h @@ -97,14 +97,14 @@ static const char* GetModulePath() return getenv(gEnvName); } -inline static void SetModulePath(const char* pModulePath) +inline void SetModulePath(const char* pModulePath) { setenv(gEnvName, pModulePath ? pModulePath : "", true); } // bInModulePath is only ever set to false in RC, because rc needs to load dlls from a $PATH that // it has modified to include .. -inline static HMODULE CryLoadLibrary(const char* libName, bool bLazy = false, bool bInModulePath = true) +inline HMODULE CryLoadLibrary(const char* libName, bool bLazy = false, bool bInModulePath = true) { const char* libPath = nullptr; char pathBuffer[MAX_PATH] = {0}; @@ -161,7 +161,7 @@ inline static HMODULE CryLoadLibrary(const char* libName, bool bLazy = false, bo return module; } -inline static bool CryFreeLibrary(void* lib) +inline bool CryFreeLibrary(void* lib) { if (lib) { diff --git a/Code/Legacy/CrySystem/XML/xml.cpp b/Code/Legacy/CrySystem/XML/xml.cpp index ccc878b8f1..a6f3d5b564 100644 --- a/Code/Legacy/CrySystem/XML/xml.cpp +++ b/Code/Legacy/CrySystem/XML/xml.cpp @@ -1756,9 +1756,9 @@ XmlNodeRef XmlParserImp::ParseFile(const char* filename, XmlString& errorString, { // not binary XML - refuse to load if in scripts dir and not in bin xml to help reduce hacking // wish we could compile the text xml parser out, but too much work to get everything moved over - AZStd::fixed_string<32> strScripts = {"Scripts/"}; + constexpr AZStd::fixed_string<32> strScripts{"Scripts/"}; // exclude files and PAKs from Mods folder - AZStd::fixed_string<8> modsStr = {"Mods/"}; + constexpr AZStd::fixed_string<8> modsStr{"Mods/"}; if (_strnicmp(filename, strScripts.c_str(), strScripts.length()) == 0 && _strnicmp(adjustedFilename.c_str(), modsStr.c_str(), modsStr.length()) != 0 && _strnicmp(pakPath.c_str(), modsStr.c_str(), modsStr.length()) != 0) diff --git a/Gems/AtomLyIntegration/AtomFont/Code/Source/AtomFont.cpp b/Gems/AtomLyIntegration/AtomFont/Code/Source/AtomFont.cpp index 769c6fd51d..8c88a49b12 100644 --- a/Gems/AtomLyIntegration/AtomFont/Code/Source/AtomFont.cpp +++ b/Gems/AtomLyIntegration/AtomFont/Code/Source/AtomFont.cpp @@ -328,7 +328,6 @@ namespace } AZ::AtomFont::AtomFont([[maybe_unused]] ISystem* system) - : m_fonts() { CryLogAlways("Using FreeType %d.%d.%d", FREETYPE_MAJOR, FREETYPE_MINOR, FREETYPE_PATCH); From 7558a3d233f2eb37e9f10c3942c268542f5dbf9c Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 19:40:13 -0700 Subject: [PATCH 33/49] fixes for Android Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../AtomCore/Serialization/Json/JsonUtils.cpp | 1 - .../Math/Internal/SimdMathVec4_scalar.inl | 1 - .../AzFramework/Application/Application.cpp | 6 +-- Code/Legacy/CryCommon/CryLibrary.h | 5 +- Code/Legacy/CryCommon/WinBase.cpp | 2 +- Code/Legacy/CrySystem/System.cpp | 54 ------------------- 6 files changed, 6 insertions(+), 63 deletions(-) diff --git a/Code/Framework/AtomCore/AtomCore/Serialization/Json/JsonUtils.cpp b/Code/Framework/AtomCore/AtomCore/Serialization/Json/JsonUtils.cpp index 1d3a9674a0..157a6c6074 100644 --- a/Code/Framework/AtomCore/AtomCore/Serialization/Json/JsonUtils.cpp +++ b/Code/Framework/AtomCore/AtomCore/Serialization/Json/JsonUtils.cpp @@ -31,7 +31,6 @@ namespace AZ static const char* FileType = "JsonSerialization"; static const char* VersionTag = "Version"; static const char* ClassNameTag = "ClassName"; - static const char* ClassIdTag = "ClassId"; static const char* ClassDataTag = "ClassData"; AZ::Outcome WriteJsonString(const rapidjson::Document& document, AZStd::string& jsonText, WriteJsonSettings settings) diff --git a/Code/Framework/AzCore/AzCore/Math/Internal/SimdMathVec4_scalar.inl b/Code/Framework/AzCore/AzCore/Math/Internal/SimdMathVec4_scalar.inl index 484351c799..68d4f103fe 100644 --- a/Code/Framework/AzCore/AzCore/Math/Internal/SimdMathVec4_scalar.inl +++ b/Code/Framework/AzCore/AzCore/Math/Internal/SimdMathVec4_scalar.inl @@ -867,7 +867,6 @@ namespace AZ const FloatType cols0 = {{ rows[0].v[0], rows[1].v[0], rows[2].v[0], 0.0f }}; const FloatType cols1 = {{ rows[0].v[1], rows[1].v[1], rows[2].v[1], 0.0f }}; const FloatType cols2 = {{ rows[0].v[2], rows[1].v[2], rows[2].v[2], 0.0f }}; - const FloatType cols3 = {{ rows[0].v[3], rows[1].v[3], rows[2].v[3], 1.0f }}; out[0] = cols0; out[1] = cols1; out[2] = cols2; diff --git a/Code/Framework/AzFramework/AzFramework/Application/Application.cpp b/Code/Framework/AzFramework/AzFramework/Application/Application.cpp index abd97aee0d..24c9d6045c 100644 --- a/Code/Framework/AzFramework/AzFramework/Application/Application.cpp +++ b/Code/Framework/AzFramework/AzFramework/Application/Application.cpp @@ -632,6 +632,9 @@ namespace AzFramework static void CreateUserCache(const AZ::IO::FixedMaxPath& cacheUserPath, AZ::IO::FileIOBase& fileIoBase) { + constexpr const char* userCachePathFilename{ "Cache" }; + AZ::IO::FixedMaxPath userCachePath = cacheUserPath / userCachePathFilename; +#if AZ_TRAIT_OS_IS_HOST_OS_PLATFORM // The number of max attempts ultimately dictates the number of Lumberyard instances that can run // simultaneously. This should be a reasonably high number so that it doesn't artificially limit // the number of instances (ex: parallel level exports via multiple Editor runs). It also shouldn't @@ -640,9 +643,6 @@ namespace AzFramework // 128 seems like a reasonable compromise. constexpr int maxAttempts = 128; - constexpr const char* userCachePathFilename{ "Cache" }; - AZ::IO::FixedMaxPath userCachePath = cacheUserPath / userCachePathFilename; -#if AZ_TRAIT_OS_IS_HOST_OS_PLATFORM int attemptNumber; for (attemptNumber = 0; attemptNumber < maxAttempts; ++attemptNumber) { diff --git a/Code/Legacy/CryCommon/CryLibrary.h b/Code/Legacy/CryCommon/CryLibrary.h index e12e7c6c36..995ba0abc5 100644 --- a/Code/Legacy/CryCommon/CryLibrary.h +++ b/Code/Legacy/CryCommon/CryLibrary.h @@ -92,7 +92,7 @@ using DetachEnvironmentFunction = void(*)(); #define HMODULE void* static const char* gEnvName("MODULE_PATH"); -static const char* GetModulePath() +inline const char* GetModulePath() { return getenv(gEnvName); } @@ -107,8 +107,6 @@ inline void SetModulePath(const char* pModulePath) inline HMODULE CryLoadLibrary(const char* libName, bool bLazy = false, bool bInModulePath = true) { const char* libPath = nullptr; - char pathBuffer[MAX_PATH] = {0}; - libPath = libName; #if !defined(AZ_PLATFORM_ANDROID) @@ -135,6 +133,7 @@ inline HMODULE CryLoadLibrary(const char* libName, bool bLazy = false, bool bInM } #endif } + char pathBuffer[MAX_PATH] = {0}; sprintf_s(pathBuffer, "%s/%s", modulePath, libName); libPath = pathBuffer; } diff --git a/Code/Legacy/CryCommon/WinBase.cpp b/Code/Legacy/CryCommon/WinBase.cpp index 99e01f7194..595e9091d6 100644 --- a/Code/Legacy/CryCommon/WinBase.cpp +++ b/Code/Legacy/CryCommon/WinBase.cpp @@ -829,7 +829,7 @@ const int comparePathNames(const char* cpFirst, const char* cpSecond, unsigned i return memicmp(first.c_str(), second.c_str(), length); } -#if defined(LINUX) || defined(APPLE) || defined(DEFINE_FIX_ONE_PATH_ELEMENT) +#if (defined(LINUX) || defined(APPLE)) && defined(DEFINE_FIX_ONE_PATH_ELEMENT) static bool FixOnePathElement(char* path) { if (*path == '\0') diff --git a/Code/Legacy/CrySystem/System.cpp b/Code/Legacy/CrySystem/System.cpp index 28940e32ac..97a2d07b3c 100644 --- a/Code/Legacy/CrySystem/System.cpp +++ b/Code/Legacy/CrySystem/System.cpp @@ -164,60 +164,6 @@ SSystemCVars g_cvars; #include #include "AZCoreLogSink.h" -#if defined(ANDROID) -namespace -{ - struct Callstack - { - Callstack() - : addrs(NULL) - , ignore(0) - , count(0) - { - } - Callstack(void** addrs, size_t ignore, size_t count) - { - this->addrs = addrs; - this->ignore = ignore; - this->count = count; - } - void** addrs; - size_t ignore; - size_t count; - }; - - static _Unwind_Reason_Code trace_func(struct _Unwind_Context* context, void* arg) - { - Callstack* cs = static_cast(arg); - if (cs->count) - { - void* ip = (void*) _Unwind_GetIP(context); - if (ip) - { - if (cs->ignore) - { - cs->ignore--; - } - else - { - cs->addrs[0] = ip; - cs->addrs++; - cs->count--; - } - } - } - return _URC_NO_REASON; - } - - static int Backtrace(void** addrs, size_t ignore, size_t size) - { - Callstack cs(addrs, ignore, size); - _Unwind_Backtrace(trace_func, (void*) &cs); - return size - cs.count; - } -} -#endif - ///////////////////////////////////////////////////////////////////////////////// // System Implementation. ////////////////////////////////////////////////////////////////////////// From 25284fb3a7e83616a0fa2c04d3eb3fc23dee3e9c Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 20 Aug 2021 19:40:25 -0700 Subject: [PATCH 34/49] fixes for Android Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../MicrophoneSystemComponent_Android.cpp | 66 +++++++++---------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/Gems/Microphone/Code/Source/Platform/Android/MicrophoneSystemComponent_Android.cpp b/Gems/Microphone/Code/Source/Platform/Android/MicrophoneSystemComponent_Android.cpp index f30bef03ae..1e696f7978 100644 --- a/Gems/Microphone/Code/Source/Platform/Android/MicrophoneSystemComponent_Android.cpp +++ b/Gems/Microphone/Code/Source/Platform/Android/MicrophoneSystemComponent_Android.cpp @@ -121,53 +121,51 @@ namespace Audio AZStd::size_t GetData(void** outputData, AZStd::size_t numFrames, const SAudioInputConfig& targetConfig, bool shouldDeinterleave) { - - bool changeSampleType = (targetConfig.m_sampleType != m_config.m_sampleType); - bool changeSampleRate = (targetConfig.m_sampleRate != m_config.m_sampleRate); - bool changeNumChannels = (targetConfig.m_numChannels != m_config.m_numChannels); - #if defined(USE_LIBSAMPLERATE) return {}; #else - if (changeSampleType || changeNumChannels) - { - // Without the SRC library, any change is unsupported! - return {}; - } - else if (changeSampleRate) - { - if(targetConfig.m_sampleRate > m_config.m_sampleRate) + bool changeSampleType = (targetConfig.m_sampleType != m_config.m_sampleType); + bool changeSampleRate = (targetConfig.m_sampleRate != m_config.m_sampleRate); + bool changeNumChannels = (targetConfig.m_numChannels != m_config.m_numChannels); + if (changeSampleType || changeNumChannels) { - AZ_Error("MacOSMicrophone", false, "Target sample rate is larger than source sample rate, this is not supported"); + // Without the SRC library, any change is unsupported! return {}; } + else if (changeSampleRate) + { + if(targetConfig.m_sampleRate > m_config.m_sampleRate) + { + AZ_Error("MacOSMicrophone", false, "Target sample rate is larger than source sample rate, this is not supported"); + return {}; + } - auto sourceBuffer = new AZ::s16[numFrames]; - AZStd::size_t targetSize = GetDownsampleSize(numFrames, m_config.m_sampleRate, targetConfig.m_sampleRate); - auto targetBuffer = new AZ::s16[targetSize]; + auto sourceBuffer = new AZ::s16[numFrames]; + AZStd::size_t targetSize = GetDownsampleSize(numFrames, m_config.m_sampleRate, targetConfig.m_sampleRate); + auto targetBuffer = new AZ::s16[targetSize]; - numFrames = m_captureData->ConsumeData(reinterpret_cast(&sourceBuffer), numFrames, m_config.m_numChannels, false); + numFrames = m_captureData->ConsumeData(reinterpret_cast(&sourceBuffer), numFrames, m_config.m_numChannels, false); - if(numFrames > 0) - { - Downsample(sourceBuffer, numFrames, m_config.m_sampleRate, targetBuffer, targetSize, targetConfig.m_sampleRate); + if(numFrames > 0) + { + Downsample(sourceBuffer, numFrames, m_config.m_sampleRate, targetBuffer, targetSize, targetConfig.m_sampleRate); - numFrames = targetSize; - // swap target data to output - ::memcpy(*outputData, targetBuffer, targetSize * 2); //*2 as two bytes per frame - } + numFrames = targetSize; + // swap target data to output + ::memcpy(*outputData, targetBuffer, targetSize * 2); //*2 as two bytes per frame + } - delete [] sourceBuffer; - delete [] targetBuffer; + delete [] sourceBuffer; + delete [] targetBuffer; - return numFrames; - } - else - { - // No change to the data from Input to Output - return m_captureData->ConsumeData(outputData, numFrames, m_config.m_numChannels, shouldDeinterleave); - } + return numFrames; + } + else + { + // No change to the data from Input to Output + return m_captureData->ConsumeData(outputData, numFrames, m_config.m_numChannels, shouldDeinterleave); + } #endif } From 7d71e3dc07d7515630cc3d62aa30847de09f4995 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 23 Aug 2021 13:00:27 -0700 Subject: [PATCH 35/49] Code/Editor Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Editor/Controls/ImageHistogramCtrl.cpp | 6 ------ Code/Editor/Controls/TimelineCtrl.cpp | 5 ----- Code/Editor/FBXExporterDialog.cpp | 6 ------ Code/Editor/IconManager.cpp | 13 ------------ Code/Editor/LevelFileDialog.cpp | 16 -------------- Code/Editor/MainWindow.cpp | 6 ------ .../Objects/ComponentEntityObject.cpp | 5 ----- Code/Editor/ToolsConfigPage.cpp | 2 -- Code/Editor/TopRendererWnd.cpp | 21 ------------------- .../TrackView/TVCustomizeTrackColorsDlg.cpp | 1 - Code/Editor/TrackView/TVEventsDialog.cpp | 6 ------ Code/Editor/TrackView/TrackViewDialog.cpp | 3 --- 12 files changed, 90 deletions(-) diff --git a/Code/Editor/Controls/ImageHistogramCtrl.cpp b/Code/Editor/Controls/ImageHistogramCtrl.cpp index 252bf4f09b..48bc7a70d2 100644 --- a/Code/Editor/Controls/ImageHistogramCtrl.cpp +++ b/Code/Editor/Controls/ImageHistogramCtrl.cpp @@ -30,12 +30,6 @@ namespace ImageHistogram const QColor kGreenSectionColor = QColor(220, 255, 220); const QColor kBlueSectionColor = QColor(220, 220, 255); const QColor kSplitSeparatorColor = QColor(100, 100, 0); - const QColor kButtonBackColor = QColor(20, 20, 20); - const QColor kBtnLightColor(200, 200, 200); - const QColor kBtnShadowColor(50, 50, 50); - const int kButtonWidth = 40; - const QColor kButtonTextColor(255, 255, 0); - const int kTextLeftSpacing = 4; const int kTextFontSize = 70; const char* kTextFontFace = "Arial"; const QColor kTextColor(255, 255, 255); diff --git a/Code/Editor/Controls/TimelineCtrl.cpp b/Code/Editor/Controls/TimelineCtrl.cpp index 8159084784..aa30c326ac 100644 --- a/Code/Editor/Controls/TimelineCtrl.cpp +++ b/Code/Editor/Controls/TimelineCtrl.cpp @@ -18,11 +18,6 @@ #include "ScopedVariableSetter.h" #include "GridUtils.h" - -static const QColor timeMarkerCol = QColor(255, 0, 255); -static const QColor textCol = QColor(0, 0, 0); -static const QColor ltgrayCol = QColor(110, 110, 110); - QColor InterpolateColor(const QColor& c1, const QColor& c2, float fraction) { const int r = static_cast(static_cast(c2.red() - c1.red()) * fraction + c1.red()); diff --git a/Code/Editor/FBXExporterDialog.cpp b/Code/Editor/FBXExporterDialog.cpp index bae4b9bf7e..b080362b97 100644 --- a/Code/Editor/FBXExporterDialog.cpp +++ b/Code/Editor/FBXExporterDialog.cpp @@ -17,12 +17,6 @@ AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING #include AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING - -namespace -{ - const uint kDefaultFPS = 30u; -} - CFBXExporterDialog::CFBXExporterDialog(bool bDisplayOnlyFPSSetting, QWidget* pParent) : QDialog(pParent) , m_ui(new Ui::FBXExporterDialog) diff --git a/Code/Editor/IconManager.cpp b/Code/Editor/IconManager.cpp index dc9eb56b88..7732ae8155 100644 --- a/Code/Editor/IconManager.cpp +++ b/Code/Editor/IconManager.cpp @@ -27,19 +27,6 @@ namespace { - // Object names in this array must correspond to EObject enumeration. - const char* g_ObjectNames[eStatObject_COUNT] = - { - "Objects/Arrow.cgf", - "Objects/Axis.cgf", - "Objects/Sphere.cgf", - "Objects/Anchor.cgf", - "Objects/entrypoint.cgf", - "Objects/hidepoint.cgf", - "Objects/hidepoint_sec.cgf", - "Objects/reinforcement_point.cgf", - }; - const char* g_IconNames[eIcon_COUNT] = { "Icons/ScaleWarning.png", diff --git a/Code/Editor/LevelFileDialog.cpp b/Code/Editor/LevelFileDialog.cpp index c0c2b96c59..3f3077a2c4 100644 --- a/Code/Editor/LevelFileDialog.cpp +++ b/Code/Editor/LevelFileDialog.cpp @@ -32,22 +32,6 @@ static const char lastLoadPathFilename[] = "lastLoadPath.preset"; // Folder in which levels are stored static const char kLevelsFolder[] = "Levels"; -// List of folder names that are used to detect a level folder -static const char* kLevelFolderNames[] = -{ - "Layers", - "Minimap", - "LevelData" -}; - -// List of files that are used to detect a level folder -static const char* kLevelFileNames[] = -{ - "level.pak", - "filelist.xml", - "levelshadercache.pak", -}; - CLevelFileDialog::CLevelFileDialog(bool openDialog, QWidget* parent) : QDialog(parent) , m_bOpenDialog(openDialog) diff --git a/Code/Editor/MainWindow.cpp b/Code/Editor/MainWindow.cpp index fa2e792cc8..bec61df984 100644 --- a/Code/Editor/MainWindow.cpp +++ b/Code/Editor/MainWindow.cpp @@ -108,12 +108,6 @@ using namespace AzToolsFramework; #define LAYOUTS_WILDCARD "*.layout" #define DUMMY_LAYOUT_NAME "Dummy_Layout" -static const char* g_openViewPaneEventName = "OpenViewPaneEvent"; //Sent when users open view panes; -static const char* g_viewPaneAttributeName = "ViewPaneName"; //Name of the current view pane -static const char* g_openLocationAttributeName = "OpenLocation"; //Indicates where the current view pane is opened from - -static const char* g_assetImporterName = "AssetImporter"; - class CEditorOpenViewCommand : public _i_reference_target_t { diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.cpp b/Code/Editor/Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.cpp index c91bf58074..36bdcf3a73 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.cpp +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.cpp @@ -49,11 +49,6 @@ * Scalars for icon drawing behavior. */ static const int s_kIconSize = 36; /// Icon display size (in pixels) -static const float s_kIconMaxWorldDist = 200.f; /// Icons are culled past this range -static const float s_kIconMinScale = 0.1f; /// Minimum scale for icons in the distance -static const float s_kIconMaxScale = 1.0f; /// Maximum scale for icons near the camera -static const float s_kIconCloseDist = 3.f; /// Distance at which icons are at maximum scale -static const float s_kIconFarDist = 40.f; /// Distance at which icons are at minimum scale CComponentEntityObject::CComponentEntityObject() : m_hasIcon(false) diff --git a/Code/Editor/ToolsConfigPage.cpp b/Code/Editor/ToolsConfigPage.cpp index 1871dc763f..50001dc2f0 100644 --- a/Code/Editor/ToolsConfigPage.cpp +++ b/Code/Editor/ToolsConfigPage.cpp @@ -39,8 +39,6 @@ namespace QColor COLOR_FOR_CONSOLE_COMMAND = QColor(0, 0, 255); QColor COLOR_FOR_TOGGLE_COMMAND = QColor(128, 0, 255); QColor COLOR_FOR_INVALID_COMMAND = QColor(255, 0, 0); - - UINT CONSOLE_CMD_DROP_LIST_HEIGHT = 300; }; class IconListModel diff --git a/Code/Editor/TopRendererWnd.cpp b/Code/Editor/TopRendererWnd.cpp index 7bbefdd63f..3159301267 100644 --- a/Code/Editor/TopRendererWnd.cpp +++ b/Code/Editor/TopRendererWnd.cpp @@ -26,27 +26,6 @@ #define GL_RGBA 0x1908 #define GL_BGRA 0x80E1 -// Used to give each static object type a different color -static uint32 sVegetationColors[16] = -{ - 0xFFFF0000, - 0xFF00FF00, - 0xFF0000FF, - 0xFFFFFFFF, - 0xFFFF00FF, - 0xFFFFFF00, - 0xFF00FFFF, - 0xFF7F00FF, - 0xFF7FFF7F, - 0xFFFF7F00, - 0xFF00FF7F, - 0xFF7F7F7F, - 0xFFFF0000, - 0xFF00FF00, - 0xFF0000FF, - 0xFFFFFFFF, -}; - ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/Code/Editor/TrackView/TVCustomizeTrackColorsDlg.cpp b/Code/Editor/TrackView/TVCustomizeTrackColorsDlg.cpp index ae1080a9c1..b30f655b0b 100644 --- a/Code/Editor/TrackView/TVCustomizeTrackColorsDlg.cpp +++ b/Code/Editor/TrackView/TVCustomizeTrackColorsDlg.cpp @@ -106,7 +106,6 @@ namespace { AnimParamType::User, "Muted", QColor(255, 224, 224) }, }; - const int kButtonsIdBase = 0x7fff; const int kMaxRows = 20; const int kColumnWidth = 300; const int kRowHeight = 24; diff --git a/Code/Editor/TrackView/TVEventsDialog.cpp b/Code/Editor/TrackView/TVEventsDialog.cpp index 86b4c1f6bc..dbaaf4b530 100644 --- a/Code/Editor/TrackView/TVEventsDialog.cpp +++ b/Code/Editor/TrackView/TVEventsDialog.cpp @@ -29,12 +29,6 @@ AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING // CTVEventsDialog dialog -namespace -{ - const int kCountSubItemIndex = 1; - const int kTimeSubItemIndex = 2; -} - class TVEventsModel : public QAbstractTableModel { diff --git a/Code/Editor/TrackView/TrackViewDialog.cpp b/Code/Editor/TrackView/TrackViewDialog.cpp index f1701f9e20..d44d8535de 100644 --- a/Code/Editor/TrackView/TrackViewDialog.cpp +++ b/Code/Editor/TrackView/TrackViewDialog.cpp @@ -77,9 +77,6 @@ inline namespace TrackViewInternal const int s_kMinimumFrameSnappingFPS = 1; const int s_kMaximumFrameSnappingFPS = 120; - const int TRACKVIEW_LAYOUT_VERSION = 0x0001; // Bump this up on every substantial pane layout change - const int TRACKVIEW_REBAR_VERSION = 0x0002; // Bump this up on every substantial rebar change - CTrackViewSequence* GetSequenceByEntityIdOrName(const CTrackViewSequenceManager* pSequenceManager, const char* entityIdOrName) { // the "name" string will be an AZ::EntityId in string form if this was called from From 6bdef504446f39e73bbe558ebb4e086752271320 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 23 Aug 2021 13:00:45 -0700 Subject: [PATCH 36/49] Code/Framework Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.cpp | 1 - Code/Framework/AzCore/AzCore/Debug/Trace.cpp | 1 - Code/Framework/AzCore/Tests/AZStd/Pair.cpp | 1 - .../Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp | 2 +- .../Tests/Serialization/Json/MathMatrixSerializerTests.cpp | 2 +- Code/Framework/AzCore/Tests/TaskTests.cpp | 1 + .../AzFramework/AzFramework/Archive/ArchiveFileIO.cpp | 1 - Code/Framework/AzFramework/AzFramework/FileTag/FileTag.cpp | 2 +- Code/Framework/AzFramework/AzFramework/IO/RemoteFileIO.cpp | 2 ++ .../AzQtComponents/AzQtComponents/Components/DockTabBar.cpp | 2 -- .../AzQtComponents/Components/Widgets/Card.cpp | 5 ----- .../AzToolsFramework/Manipulators/EditorVertexSelection.cpp | 2 +- 12 files changed, 7 insertions(+), 15 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.cpp b/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.cpp index 1fdd249138..658021b018 100644 --- a/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.cpp +++ b/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.cpp @@ -26,7 +26,6 @@ namespace AZ const u32 Timestamp = AZ_CRC("Timestamp", 0xa5d6e63e); const u32 Duration = AZ_CRC("Duration", 0x865f80c0); const u32 Instant = AZ_CRC("Instant", 0x0e9047ad); - const u32 InstantScope = AZ_CRC("InstantScope", 0xed4bfb0e); } EventTraceDriller::EventTraceDriller() diff --git a/Code/Framework/AzCore/AzCore/Debug/Trace.cpp b/Code/Framework/AzCore/AzCore/Debug/Trace.cpp index bd3b12a3b8..74ecee40e5 100644 --- a/Code/Framework/AzCore/AzCore/Debug/Trace.cpp +++ b/Code/Framework/AzCore/AzCore/Debug/Trace.cpp @@ -66,7 +66,6 @@ namespace AZ static const int assertLevel_log = 1; static const int assertLevel_nativeUI = 2; static const int assertLevel_crash = 3; - static const int logLevel_errorWarning = 1; static const int logLevel_full = 2; static AZ::EnvironmentVariable> g_ignoredAsserts; static AZ::EnvironmentVariable g_assertVerbosityLevel; diff --git a/Code/Framework/AzCore/Tests/AZStd/Pair.cpp b/Code/Framework/AzCore/Tests/AZStd/Pair.cpp index 53786d20da..213cb8b17d 100644 --- a/Code/Framework/AzCore/Tests/AZStd/Pair.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/Pair.cpp @@ -68,7 +68,6 @@ namespace UnitTest static constexpr size_t max_expected_size = MaxExpectedSize; }; - constexpr size_t pairSize = sizeof(AZStd::compressed_pair); using CompressedPairTestConfigs = ::testing::Types< CompressedPairTestConfig , CompressedPairTestConfig diff --git a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp index a842626e18..6d572a02a3 100644 --- a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp +++ b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp @@ -639,7 +639,7 @@ namespace AZ::IO path.InitFromAbsolutePath(m_dummyFilepath); request->CreateRead(nullptr, buffer, unalignedSize + 4, path, unalignedOffset, unalignedSize); - auto callback = [&fileSize, unalignedOffset, unalignedSize, this](const FileRequest& request) + auto callback = [unalignedOffset, unalignedSize, this](const FileRequest& request) { EXPECT_EQ(request.GetStatus(), AZ::IO::IStreamerTypes::RequestStatus::Completed); auto& readRequest = AZStd::get(request.GetCommand()); diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/MathMatrixSerializerTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/MathMatrixSerializerTests.cpp index be51b3bf74..3cb316f472 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/MathMatrixSerializerTests.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/MathMatrixSerializerTests.cpp @@ -469,7 +469,7 @@ namespace JsonSerializationTests *this->m_jsonDocument, *this->m_jsonDeserializationContext); - ASSERT_EQ(Outcomes::Success, result.GetOutcome()); + ASSERT_EQ(Outcomes::DefaultsUsed, result.GetOutcome()); EXPECT_TRUE(defaultValue == output); } diff --git a/Code/Framework/AzCore/Tests/TaskTests.cpp b/Code/Framework/AzCore/Tests/TaskTests.cpp index f2ca484df3..f65dffcd99 100644 --- a/Code/Framework/AzCore/Tests/TaskTests.cpp +++ b/Code/Framework/AzCore/Tests/TaskTests.cpp @@ -225,6 +225,7 @@ namespace UnitTest defaultTD, [td = AZStd::move(td)] { + AZ_UNUSED(td); }); task.Invoke(); // Destructor should not have run yet (except on moved-from instances) diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFileIO.cpp b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFileIO.cpp index c5e3bc9315..55f7640785 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFileIO.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFileIO.cpp @@ -16,7 +16,6 @@ namespace AZ::IO { - constexpr size_t ArchiveFileiOMaxBuffersize = 16 * 1024; ArchiveFileIO::ArchiveFileIO(IArchive* archive) : m_archive(archive) { diff --git a/Code/Framework/AzFramework/AzFramework/FileTag/FileTag.cpp b/Code/Framework/AzFramework/AzFramework/FileTag/FileTag.cpp index c402e6c5bc..f820ee56ed 100644 --- a/Code/Framework/AzFramework/AzFramework/FileTag/FileTag.cpp +++ b/Code/Framework/AzFramework/AzFramework/FileTag/FileTag.cpp @@ -366,7 +366,7 @@ namespace AzFramework AZStd::set tags; AZStd::string resolvedFilePath = ResolveFilePath(filePath); - auto found = AZStd::find_if(m_fileTagsMap.begin(), m_fileTagsMap.end(), [filePath, resolvedFilePath](auto& entry) -> bool + auto found = AZStd::find_if(m_fileTagsMap.begin(), m_fileTagsMap.end(), [resolvedFilePath](auto& entry) -> bool { return resolvedFilePath == ResolveFilePath(entry.first); }); diff --git a/Code/Framework/AzFramework/AzFramework/IO/RemoteFileIO.cpp b/Code/Framework/AzFramework/AzFramework/IO/RemoteFileIO.cpp index 25bc31b760..3ac1b91144 100644 --- a/Code/Framework/AzFramework/AzFramework/IO/RemoteFileIO.cpp +++ b/Code/Framework/AzFramework/AzFramework/IO/RemoteFileIO.cpp @@ -27,7 +27,9 @@ namespace AZ const char* const NetworkFileIOChannel = "NetworkFileIO"; #ifndef REMOTEFILEIO_IS_NETWORKFILEIO const char* const RemoteFileIOChannel = "RemoteFileIO"; + #ifdef REMOTEFILEIO_SYNC_CHECK const char* const RemoteFileCacheChannel = "RemoteFileCache"; + #endif #endif const size_t READ_CHUNK_SIZE = 1024 * 256; diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/DockTabBar.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/DockTabBar.cpp index 2574e1b05a..127163f056 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/DockTabBar.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/DockTabBar.cpp @@ -31,8 +31,6 @@ static const int g_closeButtonOffset = g_closeButtonWidth + AzQtComponents::Dock static const QColor g_tabIndicatorUnderlayColor(Qt::black); // Constant for the opacity of our tab indicator underlay static const qreal g_tabIndicatorUnderlayOpacity = 0.75; -// Constant for the duration of our tab animations (in milliseconds) -static const int g_tabAnimationDurationMS = 250; namespace AzQtComponents diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Card.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Card.cpp index a4ab3c5e5d..40c0a1d55a 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Card.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Card.cpp @@ -25,11 +25,6 @@ namespace AzQtComponents { - namespace CardConstants - { - static const char* kPropertySelected = "selected"; - } - static QPixmap ApplyAlphaToPixmap(const QPixmap& pixmap, float alpha) { QImage image = pixmap.toImage().convertToFormat(QImage::Format_ARGB32); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.cpp index 9bb452eb71..81f573672b 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.cpp @@ -1306,7 +1306,7 @@ namespace AzToolsFramework void EditorVertexSelectionVariable::PrepareActions() { ActionOverride deleteAction = CreateDeleteAction( - s_deleteVerticesTitle, s_duplicateVerticesDesc, + s_deleteVerticesTitle, s_deleteVerticesDesc, [this]() { DestroySelected(); From cb7b084e6bda3ef2c6e069730858657c187eb248 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 23 Aug 2021 13:01:03 -0700 Subject: [PATCH 37/49] Code/Legacy Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Legacy/CryCommon/WinBase.cpp | 8 +------- Code/Legacy/CrySystem/Log.cpp | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Code/Legacy/CryCommon/WinBase.cpp b/Code/Legacy/CryCommon/WinBase.cpp index 595e9091d6..f9b1978e74 100644 --- a/Code/Legacy/CryCommon/WinBase.cpp +++ b/Code/Legacy/CryCommon/WinBase.cpp @@ -86,10 +86,6 @@ typedef struct stat FS_STAT_TYPE; #else typedef struct stat64 FS_STAT_TYPE; #endif -static const int FS_O_RDWR = O_RDWR; -static const int FS_O_RDONLY = O_RDONLY; -static const int FS_O_WRONLY = O_WRONLY; -static const FS_ERRNO_TYPE FS_EISDIR = EISDIR; #include @@ -829,7 +825,7 @@ const int comparePathNames(const char* cpFirst, const char* cpSecond, unsigned i return memicmp(first.c_str(), second.c_str(), length); } -#if (defined(LINUX) || defined(APPLE)) && defined(DEFINE_FIX_ONE_PATH_ELEMENT) +#if defined(FIX_FILENAME_CASE) static bool FixOnePathElement(char* path) { if (*path == '\0') @@ -1193,9 +1189,7 @@ DLL_EXPORT void OutputDebugString(const char* outputString) typedef DIR* FS_DIR_TYPE; typedef dirent FS_DIRENT_TYPE; static const FS_ERRNO_TYPE FS_ENOENT = ENOENT; -static const FS_ERRNO_TYPE FS_EINVAL = EINVAL; static const FS_DIR_TYPE FS_DIR_NULL = NULL; -static const unsigned char FS_TYPE_DIRECTORY = DT_DIR; typedef int FS_ERRNO_TYPE; diff --git a/Code/Legacy/CrySystem/Log.cpp b/Code/Legacy/CrySystem/Log.cpp index 27612bf786..193b53151c 100644 --- a/Code/Legacy/CrySystem/Log.cpp +++ b/Code/Legacy/CrySystem/Log.cpp @@ -44,7 +44,7 @@ namespace LogCVars int max_backup_directory_size_mb = 200; //200MB default }; -#ifndef _RELEASE +#if defined(SUPPORT_LOG_IDENTER) static CLog::LogStringType indentString (" "); #endif From 1f44b7a32827dfa3dd267dc34805e0067bdf00a4 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 23 Aug 2021 13:01:17 -0700 Subject: [PATCH 38/49] Code/Tools Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Tools/AssetBundler/source/utils/utils.cpp | 1 - .../native/AssetDatabase/AssetDatabase.cpp | 14 -------------- .../native/resourcecompiler/rcjob.cpp | 1 - .../native/unittests/UtilitiesUnitTests.cpp | 9 --------- .../native/utilities/PlatformConfiguration.cpp | 1 - .../Driller/Annotations/AnnotationHeaderView.cpp | 1 - .../Standalone/Source/Driller/ChannelDataView.cpp | 4 ---- 7 files changed, 31 deletions(-) diff --git a/Code/Tools/AssetBundler/source/utils/utils.cpp b/Code/Tools/AssetBundler/source/utils/utils.cpp index 12830166b7..6daf3c571b 100644 --- a/Code/Tools/AssetBundler/source/utils/utils.cpp +++ b/Code/Tools/AssetBundler/source/utils/utils.cpp @@ -110,7 +110,6 @@ namespace AssetBundler const char RestrictedDirectoryName[] = "restricted"; const char PlatformsDirectoryName[] = "Platforms"; const char GemsDirectoryName[] = "Gems"; - const char GemsAssetsDirectoryName[] = "Assets"; const char GemsSeedFileName[] = "seedList"; const char EngineSeedFileName[] = "SeedAssetList"; diff --git a/Code/Tools/AssetProcessor/native/AssetDatabase/AssetDatabase.cpp b/Code/Tools/AssetProcessor/native/AssetDatabase/AssetDatabase.cpp index 8c334c4468..4d2053c6d1 100644 --- a/Code/Tools/AssetProcessor/native/AssetDatabase/AssetDatabase.cpp +++ b/Code/Tools/AssetProcessor/native/AssetDatabase/AssetDatabase.cpp @@ -174,12 +174,6 @@ namespace AssetProcessor static const char* CREATEINDEX_TYPEOFDEPENDENCY_SOURCEDEPENDENCY = "AssetProcessor::CreateIndexTypeOfDependency_SourceDependency"; static const char* CREATEINDEX_TYPEOFDEPENDENCY_SOURCEDEPENDENCY_STATEMENT = "CREATE INDEX IF NOT EXISTS TypeOfDependency_SourceDependency ON SourceDependency (TypeOfDependency);"; - - static const char* CREATEINDEX_SCANFOLDERS_SOURCES = "AssetProcesser::CreateIndexScanFoldersSources"; - static const char* CREATEINDEX_SCANFOLDERS_SOURCES_STATEMENT = - "CREATE INDEX IF NOT EXISTS ScanFolders_Sources ON Sources (ScanFolderPK);"; - static const char* DROPINDEX_SCANFOLDERS_SOURCES_STATEMENT = - "DROP INDEX IF EXISTS ScanFolders_Sources_idx;"; static const char* CREATEINDEX_SCANFOLDERS_SOURCES_SCANFOLDER = "AssetProcesser::CreateIndexScanFoldersSourcesScanFolder"; static const char* CREATEINDEX_SCANFOLDERS_SOURCES_SCANFOLDER_STATEMENT = @@ -188,20 +182,14 @@ namespace AssetProcessor static const char* CREATEINDEX_SOURCES_JOBS = "AssetProcesser::CreateIndexSourcesJobs"; static const char* CREATEINDEX_SOURCES_JOBS_STATEMENT = "CREATE INDEX IF NOT EXISTS Sources_Jobs ON Jobs (SourcePK);"; - static const char* DROPINDEX_SOURCES_JOBS_STATEMENT = - "DROP INDEX IF EXISTS Sources_Jobs_idx;"; static const char* CREATEINDEX_JOBS_PRODUCTS = "AssetProcesser::CreateIndexJobsProducts"; static const char* CREATEINDEX_JOBS_PRODUCTS_STATEMENT = "CREATE INDEX IF NOT EXISTS Jobs_Products ON Products (JobPK);"; - static const char* DROPINDEX_JOBS_PRODUCTS_STATEMENT = - "DROP INDEX IF EXISTS Jobs_Products_idx;"; static const char* CREATEINDEX_SOURCE_NAME = "AssetProcessor::CreateIndexSourceName"; static const char* CREATEINDEX_SOURCE_NAME_STATEMENT = "CREATE INDEX IF NOT EXISTS Sources_SourceName ON Sources (SourceName);"; - static const char* DROPINDEX_SOURCE_NAME_STATEMENT = - "DROP INDEX IF EXISTS Sources_SourceName_idx;"; static const char* CREATEINDEX_SOURCE_GUID = "AssetProcessor::CreateIndexSourceGuid"; static const char* CREATEINDEX_SOURCE_GUID_STATEMENT = @@ -210,8 +198,6 @@ namespace AssetProcessor static const char* CREATEINDEX_PRODUCT_NAME = "AssetProcessor::CreateIndexProductName"; static const char* CREATEINDEX_PRODUCT_NAME_STATEMENT = "CREATE INDEX IF NOT EXISTS Products_ProductName ON Products (ProductName);"; - static const char* DROPINDEX_PRODUCT_NAME_STATEMENT = - "DROP INDEX IF EXISTS Products_ProductName_idx;"; static const char* CREATEINDEX_PRODUCT_SUBID = "AssetProcessor::CreateIndexProductSubID"; static const char* CREATEINDEX_PRODUCT_SUBID_STATEMENT = diff --git a/Code/Tools/AssetProcessor/native/resourcecompiler/rcjob.cpp b/Code/Tools/AssetProcessor/native/resourcecompiler/rcjob.cpp index eacff14180..aaf6496f7b 100644 --- a/Code/Tools/AssetProcessor/native/resourcecompiler/rcjob.cpp +++ b/Code/Tools/AssetProcessor/native/resourcecompiler/rcjob.cpp @@ -22,7 +22,6 @@ namespace { - unsigned long s_jobSerial = 1; bool s_typesRegistered = false; // You have up to 60 minutes to finish processing an asset. // This was increased from 10 to account for PVRTC compression diff --git a/Code/Tools/AssetProcessor/native/unittests/UtilitiesUnitTests.cpp b/Code/Tools/AssetProcessor/native/unittests/UtilitiesUnitTests.cpp index b34f79142c..bbeafda342 100644 --- a/Code/Tools/AssetProcessor/native/unittests/UtilitiesUnitTests.cpp +++ b/Code/Tools/AssetProcessor/native/unittests/UtilitiesUnitTests.cpp @@ -30,15 +30,6 @@ using namespace AssetProcessor; namespace AssetProcessor { - const char* const TEST_BOOTSTRAP_DATA = - "project_path = TestProject \r\n\ - assets = pc \r\n\ - -- ip and port of the asset processor.Only if you need to change defaults \r\n\ - -- remote_ip = 127.0.0.1 \r\n\ - windows_remote_ip = 127.0.0.7 \r\n\ - remote_port = 45645 \r\n\ - assetProcessor_branch_token = 0xDD814240"; - // simple utility class to make sure threads join and don't cause asserts // if the unit test exits early. class AutoThreadJoiner final diff --git a/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp b/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp index 07106614cf..a1bc508899 100644 --- a/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp @@ -681,7 +681,6 @@ namespace AssetProcessor const char AssetConfigPlatformDir[] = "AssetProcessorConfig/"; const char AssetProcessorPlatformConfigFileName[] = "AssetProcessorPlatformConfig.ini"; - const char RestrictedPlatformDir[] = "restricted"; PlatformConfiguration::PlatformConfiguration(QObject* pParent) : QObject(pParent) diff --git a/Code/Tools/Standalone/Source/Driller/Annotations/AnnotationHeaderView.cpp b/Code/Tools/Standalone/Source/Driller/Annotations/AnnotationHeaderView.cpp index 3152862d80..fa1598a224 100644 --- a/Code/Tools/Standalone/Source/Driller/Annotations/AnnotationHeaderView.cpp +++ b/Code/Tools/Standalone/Source/Driller/Annotations/AnnotationHeaderView.cpp @@ -14,7 +14,6 @@ namespace Driller { static const int k_contractedSize = 20; - static const int k_textWidth = 153; AnnotationHeaderView::AnnotationHeaderView(AnnotationsProvider* ptrAnnotations, QWidget* parent, Qt::WindowFlags flags) : QWidget(parent, flags) diff --git a/Code/Tools/Standalone/Source/Driller/ChannelDataView.cpp b/Code/Tools/Standalone/Source/Driller/ChannelDataView.cpp index 0fd94476e3..d5c845b438 100644 --- a/Code/Tools/Standalone/Source/Driller/ChannelDataView.cpp +++ b/Code/Tools/Standalone/Source/Driller/ChannelDataView.cpp @@ -24,10 +24,6 @@ namespace Driller { - static const int k_contractedSize = 28; - static const int k_expandedSize = 64; - static const int k_textWidth = 128; - static const int k_barHeight = 5; //////////////////////// From 804d833bb92fc3cc731720a84f4365cafe0c919a Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 23 Aug 2021 13:01:33 -0700 Subject: [PATCH 39/49] Gems/Atom Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Code/Source/Editor/SrgLayoutUtility.cpp | 2 -- .../AuxGeom/DynamicPrimitiveProcessor.cpp | 3 --- .../OcclusionCullingPlane.cpp | 2 -- .../ReflectionProbe/ReflectionProbe.cpp | 2 -- .../Vulkan/Code/Source/RHI/PhysicalDevice.cpp | 2 -- .../Model/ModelAssetBuilderComponent.cpp | 6 ------ .../DynamicDraw/DynamicDrawContext.cpp | 3 +-- .../Source/RPI.Public/Shader/ShaderSystem.cpp | 2 -- Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp | 2 ++ .../AtomFont/Code/Source/FFont.cpp | 1 - .../EMotionFXAtom/Code/Source/ActorAsset.cpp | 19 ------------------- 11 files changed, 3 insertions(+), 41 deletions(-) diff --git a/Gems/Atom/Asset/Shader/Code/Source/Editor/SrgLayoutUtility.cpp b/Gems/Atom/Asset/Shader/Code/Source/Editor/SrgLayoutUtility.cpp index dba95741ad..cb3318128e 100644 --- a/Gems/Atom/Asset/Shader/Code/Source/Editor/SrgLayoutUtility.cpp +++ b/Gems/Atom/Asset/Shader/Code/Source/Editor/SrgLayoutUtility.cpp @@ -15,8 +15,6 @@ namespace AZ { namespace SrgLayoutUtility { - static constexpr char SrgLayoutUtilityName[] = "SrgLayoutUtility"; - RHI::ShaderInputImageType ToShaderInputImageType(TextureType textureType) { switch (textureType) diff --git a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/DynamicPrimitiveProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/DynamicPrimitiveProcessor.cpp index 10d1bdc2c6..f35809f148 100644 --- a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/DynamicPrimitiveProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/DynamicPrimitiveProcessor.cpp @@ -27,9 +27,6 @@ namespace AZ { namespace { - // the max size of a vertex buffer - static const size_t MaxUploadBufferSize = MaxDynamicVertexCount * sizeof(AuxGeomDynamicVertex); - static const RHI::PrimitiveTopology PrimitiveTypeToTopology[PrimitiveType_Count] = { RHI::PrimitiveTopology::PointList, diff --git a/Gems/Atom/Feature/Common/Code/Source/OcclusionCullingPlane/OcclusionCullingPlane.cpp b/Gems/Atom/Feature/Common/Code/Source/OcclusionCullingPlane/OcclusionCullingPlane.cpp index 5ea5a496d6..0e644b9555 100644 --- a/Gems/Atom/Feature/Common/Code/Source/OcclusionCullingPlane/OcclusionCullingPlane.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/OcclusionCullingPlane/OcclusionCullingPlane.cpp @@ -16,8 +16,6 @@ namespace AZ { namespace Render { - static const char* OcclusionCullingPlaneDrawListTag("occlusioncullingplanevisualization"); - OcclusionCullingPlane::~OcclusionCullingPlane() { Data::AssetBus::MultiHandler::BusDisconnect(); diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp index 276ea7683f..66c326e6e7 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp @@ -22,8 +22,6 @@ namespace AZ { namespace Render { - static const char* ReflectionProbeDrawListTag("reflectionprobevisualization"); - ReflectionProbe::~ReflectionProbe() { Data::AssetBus::MultiHandler::BusDisconnect(); diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/PhysicalDevice.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/PhysicalDevice.cpp index c00c1804b9..cdb9bbc7bd 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/PhysicalDevice.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/PhysicalDevice.cpp @@ -17,8 +17,6 @@ namespace AZ { namespace Vulkan { - static constexpr size_t MinGPUMemSize = AZ_TRAIT_ATOM_VULKAN_MIN_GPU_MEM; - RHI::PhysicalDeviceList PhysicalDevice::Enumerate() { RHI::PhysicalDeviceList physicalDeviceList; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelAssetBuilderComponent.cpp b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelAssetBuilderComponent.cpp index 5fcbcd7180..9fc99e3ea4 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelAssetBuilderComponent.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelAssetBuilderComponent.cpp @@ -60,7 +60,6 @@ namespace { - const uint32_t IndicesPerFace = 3; const AZ::RHI::Format IndicesFormat = AZ::RHI::Format::R32_UINT; const uint32_t PositionFloatsPerVert = 3; @@ -84,11 +83,6 @@ namespace // Morph targets const char* ShaderSemanticName_MorphTargetDeltas = "MORPHTARGET_VERTEXDELTAS"; - const AZ::RHI::Format MorphTargetVertexIndexFormat = AZ::RHI::Format::R32_UINT; // Single-component, 32-bit integer as vertex index - const char* ShaderSemanticName_MorphTargetPositionDeltas = "MORPHTARGET_POSITIONDELTAS"; - const AZ::RHI::Format MorphTargetPositionDeltaFormat = AZ::RHI::Format::R16_UINT; // 16-bit integer per compressed position delta component - const char* ShaderSemanticName_MorphTargetNormalDeltas = "MORPHTARGET_NORMALDELTAS"; - const AZ::RHI::Format MorphTargetNormalDeltaFormat = AZ::RHI::Format::R8_UINT; // 8-bit integer per compressed normal delta component // Cloth data const char* const ShaderSemanticName_ClothData = "CLOTH_DATA"; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/DynamicDraw/DynamicDrawContext.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/DynamicDraw/DynamicDrawContext.cpp index 29f57d6e0f..4da85823b3 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/DynamicDraw/DynamicDrawContext.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/DynamicDraw/DynamicDrawContext.cpp @@ -25,8 +25,7 @@ namespace AZ namespace { constexpr const char* PerContextSrgName = "PerContextSrg"; - constexpr const char* PerDrawSrgName = "PerDrawSrg"; - }; + } void DynamicDrawContext::MultiStates::UpdateHash(const DrawStateOptions& drawStateOptions) { diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderSystem.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderSystem.cpp index c1ae1f0be9..ec6aeb3771 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderSystem.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderSystem.cpp @@ -25,8 +25,6 @@ namespace AZ { namespace RPI { - static constexpr char ShaderSystemLog[] = "ShaderSystem"; - void ShaderSystem::Reflect(ReflectContext* context) { ShaderOptionDescriptor::Reflect(context); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp index f1f25e3303..c7d49e3dc7 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp @@ -30,8 +30,10 @@ namespace AZ namespace RPI { // fixed-size software occlusion culling buffer +#if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED const uint32_t MaskedSoftwareOcclusionCullingWidth = 1920; const uint32_t MaskedSoftwareOcclusionCullingHeight = 1080; +#endif ViewPtr View::CreateView(const AZ::Name& name, UsageFlags usage) { diff --git a/Gems/AtomLyIntegration/AtomFont/Code/Source/FFont.cpp b/Gems/AtomLyIntegration/AtomFont/Code/Source/FFont.cpp index b10edfae2e..5e96af0b1b 100644 --- a/Gems/AtomLyIntegration/AtomFont/Code/Source/FFont.cpp +++ b/Gems/AtomLyIntegration/AtomFont/Code/Source/FFont.cpp @@ -54,7 +54,6 @@ static const int TabCharCount = 4; // set buffer sizes to hold max characters that can be drawn in 1 DrawString call static const size_t MaxVerts = 8 * 1024; // 2048 quads static const size_t MaxIndices = (MaxVerts * 6) / 4; // 6 indices per quad, 6/4 * MaxVerts -static const char DrawList2DPassName[] = "2dpass"; AZ::FFont::FFont(AZ::AtomFont* atomFont, const char* fontName) : m_name(fontName) diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/ActorAsset.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/ActorAsset.cpp index 8d247eaf45..284e1ed35d 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/ActorAsset.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/ActorAsset.cpp @@ -39,25 +39,6 @@ // Copied from ModelAssetBuilderComponent.cpp namespace { - const AZ::u32 IndicesPerFace = 3; - const AZ::RHI::Format IndicesFormat = AZ::RHI::Format::R32_UINT; - - const AZ::u32 PositionFloatsPerVert = 3; - const AZ::u32 NormalFloatsPerVert = 3; - const AZ::u32 UVFloatsPerVert = 2; - const AZ::u32 ColorFloatsPerVert = 4; - const AZ::u32 TangentFloatsPerVert = 4; - const AZ::u32 BitangentFloatsPerVert = 3; - - const AZ::RHI::Format PositionFormat = AZ::RHI::Format::R32G32B32_FLOAT; - const AZ::RHI::Format NormalFormat = AZ::RHI::Format::R32G32B32_FLOAT; - const AZ::RHI::Format UVFormat = AZ::RHI::Format::R32G32_FLOAT; - const AZ::RHI::Format ColorFormat = AZ::RHI::Format::R32G32B32A32_FLOAT; - const AZ::RHI::Format TangentFormat = AZ::RHI::Format::R32G32B32A32_FLOAT; - const AZ::RHI::Format BitangentFormat = AZ::RHI::Format::R32G32B32_FLOAT; - const AZ::RHI::Format BoneIndexFormat = AZ::RHI::Format::R32G32B32A32_UINT; - const AZ::RHI::Format BoneWeightFormat = AZ::RHI::Format::R32G32B32A32_FLOAT; - const uint32_t LinearSkinningFloatsPerBone = 12; const uint32_t DualQuaternionSkinningFloatsPerBone = 8; const uint32_t MaxSupportedSkinInfluences = 4; From 23f99aeb945bdb6e3a8308bb2f29f1703b2ca980 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 23 Aug 2021 13:03:37 -0700 Subject: [PATCH 40/49] more gems changes Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../AWSResourceMappingManagerTest.cpp | 2 -- .../Source/Editor/AudioControlsLoader.cpp | 1 - .../EMotionFX/Source/BlendSpace2DNode.cpp | 13 --------- .../AssetIdNodePropertyDisplay.cpp | 2 -- .../AssetIdNodePropertyDisplay.h | 2 -- .../ComboBoxNodePropertyDisplay.cpp | 2 -- .../ComboBoxNodePropertyDisplay.h | 2 -- .../EntityIdNodePropertyDisplay.cpp | 2 -- .../EntityIdNodePropertyDisplay.h | 2 -- .../Code/Source/Components/SceneComponent.cpp | 2 -- .../Source/Translation/TranslationBuilder.cpp | 2 -- .../Translation/TranslationSerializer.cpp | 8 ------ .../Animation/UiAVCustomizeTrackColorsDlg.cpp | 1 - .../Editor/Animation/UiAVEventsDialog.cpp | 6 ---- .../Editor/Animation/UiAnimViewDialog.cpp | 12 -------- Gems/LyShine/Code/Editor/EditorWindow.cpp | 18 ------------ .../Code/Source/Animation/AnimNode.cpp | 9 ------ .../Code/Source/Animation/AzEntityNode.cpp | 12 -------- Gems/LyShine/Code/Source/RenderGraph.cpp | 3 -- .../Code/Source/Cinematics/SceneNode.cpp | 2 -- .../Cinematics/Tests/AssetBlendTrackTest.cpp | 1 - .../Cinematics/Tests/EntityNodeTest.cpp | 2 -- .../Tests/Benchmarks/PhysXJointBenchmarks.cpp | 6 ---- .../ScriptCanvas/Core/NodeFunctionGeneric.h | 4 +-- .../Core/SubgraphInterfaceUtility.cpp | 1 - .../Interpreted/ExecutionInterpretedAPI.cpp | 2 -- .../Libraries/Logic/Sequencer.cpp | 2 -- .../Code/Tests/ScriptCanvas_Core.cpp | 2 -- .../Code/Source/Editor/AtlasBuilderWorker.cpp | 28 +++++++++++++++++-- .../Code/Source/Editor/AtlasBuilderWorker.h | 24 ---------------- 30 files changed, 27 insertions(+), 148 deletions(-) diff --git a/Gems/AWSCore/Code/Tests/ResourceMapping/AWSResourceMappingManagerTest.cpp b/Gems/AWSCore/Code/Tests/ResourceMapping/AWSResourceMappingManagerTest.cpp index 557fbc820c..91d85c2f99 100644 --- a/Gems/AWSCore/Code/Tests/ResourceMapping/AWSResourceMappingManagerTest.cpp +++ b/Gems/AWSCore/Code/Tests/ResourceMapping/AWSResourceMappingManagerTest.cpp @@ -30,8 +30,6 @@ static constexpr const char TEST_EXPECTED_BUCKET_TYPE[] = "AWS::S3::Bucket"; static constexpr const char TEST_EXPECTED_BUCKET_NAMEID[] = "MyTestS3Bucket"; static constexpr const char TEST_EXPECTED_SERVICE_KEYNAME[] = "TestService"; -static constexpr const char TEST_EXPECTED_RESTAPI_ID_KEYNAME[] = "TestService.RESTApiId"; -static constexpr const char TEST_EXPECTED_RESTAPI_STAGE_KEYNAME[] = "TestService.RESTApiStage"; static constexpr const char TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE[] = R"({ diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControlsLoader.cpp b/Gems/AudioSystem/Code/Source/Editor/AudioControlsLoader.cpp index 30889e33f0..45f044be32 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControlsLoader.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControlsLoader.cpp @@ -31,7 +31,6 @@ namespace AudioControls namespace LoaderStrings { static constexpr const char* LevelsSubFolder = "levels"; - static constexpr const char* PathAttribute = "path"; } // namespace LoaderStrings diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendSpace2DNode.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/BlendSpace2DNode.cpp index b34a860b71..03a7552410 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendSpace2DNode.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendSpace2DNode.cpp @@ -24,19 +24,6 @@ namespace { - // Dimensions of the 2D grid into which we place the triangles for quick lookup - const uint32_t kGridCellCountX = 10; - const uint32_t kGridCellCountY = 10; - - AZ_FORCE_INLINE void GetBoundsOfTriangle(const AZ::Vector2 triVerts[3], - float& minX, float& minY, float& maxX, float& maxY) - { - minX = AZStd::min(triVerts[0].GetX(), AZStd::min(triVerts[1].GetX(), triVerts[2].GetX())); - minY = AZStd::min(triVerts[0].GetY(), AZStd::min(triVerts[1].GetY(), triVerts[2].GetY())); - maxX = AZStd::max(triVerts[0].GetX(), AZStd::max(triVerts[1].GetX(), triVerts[2].GetX())); - maxY = AZStd::max(triVerts[0].GetY(), AZStd::max(triVerts[1].GetY(), triVerts[2].GetY())); - } - AZ_FORCE_INLINE bool IsDegenerateTriangle(const AZ::Vector2& p0, const AZ::Vector2& p1, const AZ::Vector2& p2) { const AZ::Vector2 v01(p1 - p0); diff --git a/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/AssetIdNodePropertyDisplay.cpp b/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/AssetIdNodePropertyDisplay.cpp index afafa8350d..ce08f9b448 100644 --- a/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/AssetIdNodePropertyDisplay.cpp +++ b/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/AssetIdNodePropertyDisplay.cpp @@ -156,6 +156,4 @@ namespace GraphCanvas m_proxyWidget = nullptr; } } - -#include } diff --git a/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/AssetIdNodePropertyDisplay.h b/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/AssetIdNodePropertyDisplay.h index 0067d75bac..5b35386547 100644 --- a/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/AssetIdNodePropertyDisplay.h +++ b/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/AssetIdNodePropertyDisplay.h @@ -7,13 +7,11 @@ */ #pragma once -#if !defined(Q_MOC_RUN) #include #include #include #include -#endif class QGraphicsProxyWidget; diff --git a/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/ComboBoxNodePropertyDisplay.cpp b/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/ComboBoxNodePropertyDisplay.cpp index 9206d32d65..6d0590ed99 100644 --- a/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/ComboBoxNodePropertyDisplay.cpp +++ b/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/ComboBoxNodePropertyDisplay.cpp @@ -403,6 +403,4 @@ namespace GraphCanvas m_menuDisplayDirty = true; } } - -#include } diff --git a/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/ComboBoxNodePropertyDisplay.h b/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/ComboBoxNodePropertyDisplay.h index 8f0bb05421..3044456046 100644 --- a/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/ComboBoxNodePropertyDisplay.h +++ b/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/ComboBoxNodePropertyDisplay.h @@ -9,7 +9,6 @@ class QEvent; -#if !defined(Q_MOC_RUN) #include #include @@ -18,7 +17,6 @@ class QEvent; #include #include #include -#endif namespace GraphCanvas { diff --git a/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/EntityIdNodePropertyDisplay.cpp b/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/EntityIdNodePropertyDisplay.cpp index 01dab4c53b..21c5fffa86 100644 --- a/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/EntityIdNodePropertyDisplay.cpp +++ b/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/EntityIdNodePropertyDisplay.cpp @@ -208,6 +208,4 @@ namespace GraphCanvas m_proxyWidget = nullptr; } } - -#include } diff --git a/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/EntityIdNodePropertyDisplay.h b/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/EntityIdNodePropertyDisplay.h index 322ceef941..63b6d3d301 100644 --- a/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/EntityIdNodePropertyDisplay.h +++ b/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/EntityIdNodePropertyDisplay.h @@ -9,7 +9,6 @@ class QEvent; -#if !defined(Q_MOC_RUN) #include #include @@ -17,7 +16,6 @@ class QEvent; #include #include #include -#endif namespace GraphCanvas { diff --git a/Gems/GraphCanvas/Code/Source/Components/SceneComponent.cpp b/Gems/GraphCanvas/Code/Source/Components/SceneComponent.cpp index f236b6b1e1..52e7892364 100644 --- a/Gems/GraphCanvas/Code/Source/Components/SceneComponent.cpp +++ b/Gems/GraphCanvas/Code/Source/Components/SceneComponent.cpp @@ -1070,8 +1070,6 @@ namespace GraphCanvas // SceneComponent /////////////////// - static const char* k_copyPasteKey = "GraphCanvasScene"; - void SceneComponent::Reflect(AZ::ReflectContext* context) { GraphSerialization::Reflect(context); diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationBuilder.cpp b/Gems/GraphCanvas/Code/Source/Translation/TranslationBuilder.cpp index 9b8d67aa62..bac58c3ba1 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationBuilder.cpp +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationBuilder.cpp @@ -11,8 +11,6 @@ namespace GraphCanvas { - constexpr const char* s_graphCanvasTranslationBuilderName = "GraphCanvasTranslationBuilder"; - AZ::Uuid TranslationAssetWorker::GetUUID() { return AZ::Uuid::CreateString("{459EF910-CAAF-465A-BA19-C91979DA5729}"); diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp b/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp index dd6ee187c0..3875f76d92 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp @@ -20,14 +20,6 @@ namespace GraphCanvas static constexpr char variant[] = "variant"; static constexpr char entries[] = "entries"; } - - static const AZStd::string_view RequiredFields[] = - { - Field::key, - Field::context, - Field::variant, - Field::entries - }; } AZ_CLASS_ALLOCATOR_IMPL(TranslationFormatSerializer, AZ::SystemAllocator, 0); diff --git a/Gems/LyShine/Code/Editor/Animation/UiAVCustomizeTrackColorsDlg.cpp b/Gems/LyShine/Code/Editor/Animation/UiAVCustomizeTrackColorsDlg.cpp index 533625c762..b1412a2d7c 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAVCustomizeTrackColorsDlg.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAVCustomizeTrackColorsDlg.cpp @@ -63,7 +63,6 @@ namespace { eUiAnimParamType_User, "Muted", QColor(255, 224, 224) }, }; - const int kButtonsIdBase = 0x7fff; const int kMaxRows = 20; const int kColumnWidth = 300; const int kRowHeight = 24; diff --git a/Gems/LyShine/Code/Editor/Animation/UiAVEventsDialog.cpp b/Gems/LyShine/Code/Editor/Animation/UiAVEventsDialog.cpp index b45cee6948..910307c71a 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAVEventsDialog.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAVEventsDialog.cpp @@ -18,12 +18,6 @@ // CUiAVEventsDialog dialog -namespace -{ - const int kCountSubItemIndex = 1; - const int kTimeSubItemIndex = 2; -} - class UiAVEventsModel : public QAbstractTableModel { diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewDialog.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimViewDialog.cpp index 6a3afe2036..16d3b2b921 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewDialog.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewDialog.cpp @@ -70,24 +70,12 @@ ////////////////////////////////////////////////////////////////////////// namespace { - const char* s_kUiAnimViewLayoutSection = "UiAnimViewLayout"; - const char* s_kUiAnimViewSection = "DockingPaneLayouts\\UiAnimView"; - const char* s_kSplitterEntry = "Splitter"; - const char* s_kVersionEntry = "UiAnimViewLayoutVersion"; - const char* s_kUiAnimViewSettingsSection = "UiAnimView"; const char* s_kSnappingModeEntry = "SnappingMode"; const char* s_kFrameSnappingFPSEntry = "FrameSnappingFPS"; const char* s_kTickDisplayModeEntry = "TickDisplayMode"; - const char* s_kDefaultTracksEntry = "DefaultTracks"; - - const char* s_kRebarVersionEntry = "UiAnimViewReBarVersion"; - const char* s_kRebarBandEntryPrefix = "ReBarBand"; const char* s_kNoSequenceComboBoxEntry = "--- No Sequence ---"; - - const int TRACKVIEW_LAYOUT_VERSION = 0x0001; // Bump this up on every substantial pane layout change - const int TRACKVIEW_REBAR_VERSION = 0x0002; // Bump this up on every substantial rebar change } ////////////////////////////////////////////////////////////////////////// diff --git a/Gems/LyShine/Code/Editor/EditorWindow.cpp b/Gems/LyShine/Code/Editor/EditorWindow.cpp index 8d7e20492d..5ae1eb44b9 100644 --- a/Gems/LyShine/Code/Editor/EditorWindow.cpp +++ b/Gems/LyShine/Code/Editor/EditorWindow.cpp @@ -2103,24 +2103,6 @@ void EditorWindow::RestoreModeSettings(UiEditorMode mode) settings.endGroup(); // UI canvas editor } -static const char* UIEDITOR_UNLOAD_SAVED_CANVAS_METRIC_EVENT_NAME = "UiEditorUnloadSavedCanvas"; -static const char* UIEDITOR_CANVAS_ID_ATTRIBUTE_NAME = "CanvasId"; -static const char* UIEDITOR_CANVAS_WIDTH_METRIC_NAME = "CanvasWidth"; -static const char* UIEDITOR_CANVAS_HEIGHT_METRIC_NAME = "CanvasHeight"; -static const char* UIEDITOR_CANVAS_MAX_HIERARCHY_DEPTH_METRIC_NAME = "MaxHierarchyDepth"; -static const char* UIEDITOR_CANVAS_NUM_ELEMENT_METRIC_NAME = "NumElement"; -static const char* UIEDITOR_CANVAS_NUM_ELEMENTS_WITH_COMPONENT_PREFIX_METRIC_NAME = "Num"; -static const char* UIEDITOR_CANVAS_NUM_ELEMENTS_WITH_CUSTOM_COMPONENT_METRIC_NAME = "NumCustomElement"; -static const char* UIEDITOR_CANVAS_NUM_UNIQUE_CUSTOM_COMPONENT_NAME = "NumUniqueCustomComponent"; -static const char* UIEDITOR_CANVAS_NUM_AVAILABLE_CUSTOM_COMPONENT_NAME = "NumAvailableCustomComponent"; -static const char* UIEDITOR_CANVAS_NUM_ANCHOR_PRESETS_ATTRIBUTE_NAME = "NumAnchorPreset"; -static const char* UIEDITOR_CANVAS_NUM_ANCHOR_CUSTOM_ATTRIBUTE_NAME = "NumAnchorCustom"; -static const char* UIEDITOR_CANVAS_NUM_PIVOT_PRESETS_ATTRIBUTE_NAME = "NumPivotPreset"; -static const char* UIEDITOR_CANVAS_NUM_PIVOT_CUSTOM_ATTRIBUTE_NAME = "NumPivotCustom"; -static const char* UIEDITOR_CANVAS_NUM_ROTATED_ELEMENT_METRIC_NAME = "NumRotatedElement"; -static const char* UIEDITOR_CANVAS_NUM_SCALED_ELEMENT_METRIC_NAME = "NumScaledElement"; -static const char* UIEDITOR_CANVAS_NUM_SCALE_TO_DEVICE_ELEMENT_METRIC_NAME = "NumScaleToDeviceElement"; - int EditorWindow::GetCanvasMaxHierarchyDepth(const LyShine::EntityArray& rootChildElements) { int depth = 0; diff --git a/Gems/LyShine/Code/Source/Animation/AnimNode.cpp b/Gems/LyShine/Code/Source/Animation/AnimNode.cpp index a87dae6fbd..be7ce78c9a 100644 --- a/Gems/LyShine/Code/Source/Animation/AnimNode.cpp +++ b/Gems/LyShine/Code/Source/Animation/AnimNode.cpp @@ -41,15 +41,6 @@ ////////////////////////////////////////////////////////////////////////// static const EUiAnimCurveType DEFAULT_TRACK_TYPE = eUiAnimCurveType_BezierFloat; -// Old serialization values that are no longer -// defined in IUiAnimationSystem.h, but needed for conversion: -static const int OLD_ACURVE_GOTO = 21; -static const int OLD_APARAM_PARTICLE_COUNT_SCALE = 95; -static const int OLD_APARAM_PARTICLE_PULSE_PERIOD = 96; -static const int OLD_APARAM_PARTICLE_SCALE = 97; -static const int OLD_APARAM_PARTICLE_SPEED_SCALE = 98; -static const int OLD_APARAM_PARTICLE_STRENGTH = 99; - ////////////////////////////////////////////////////////////////////////// // CUiAnimNode. ////////////////////////////////////////////////////////////////////////// diff --git a/Gems/LyShine/Code/Source/Animation/AzEntityNode.cpp b/Gems/LyShine/Code/Source/Animation/AzEntityNode.cpp index 4d178e2f10..b93453129e 100644 --- a/Gems/LyShine/Code/Source/Animation/AzEntityNode.cpp +++ b/Gems/LyShine/Code/Source/Animation/AzEntityNode.cpp @@ -27,18 +27,6 @@ #define s_nodeParams s_nodeParamsEnt #define AddSupportedParam AddSupportedParamEnt -static const float TIMEJUMPED_TRANSITION_TIME = 1.0f; -static const float EPSILON = 0.01f; - -static const char* s_VariablePrefixes[] = -{ - "n", "i", "b", "f", "s", "ei", "es", - "shader", "clr", "color", "vector", - "snd", "sound", "dialog", "tex", "texture", - "obj", "object", "file", "text", "equip", "reverbpreset", "eaxpreset", - "aianchor", "customaction", "gametoken", "seq_", "mission_", "seqid_", "lightanimation_" -}; - ////////////////////////////////////////////////////////////////////////// namespace { diff --git a/Gems/LyShine/Code/Source/RenderGraph.cpp b/Gems/LyShine/Code/Source/RenderGraph.cpp index 51f62fc7ad..588413783d 100644 --- a/Gems/LyShine/Code/Source/RenderGraph.cpp +++ b/Gems/LyShine/Code/Source/RenderGraph.cpp @@ -21,9 +21,6 @@ namespace LyShine { - static const char* s_maskIncrProfileMarker = "UI_MASK_STENCIL_INCR"; - static const char* s_maskDecrProfileMarker = "UI_MASK_STENCIL_DECR"; - enum UiColorOp { ColorOp_Unused = 0, // reusing shader flag value, FixedPipelineEmu shader uses 0 to mean eCO_NOSET diff --git a/Gems/Maestro/Code/Source/Cinematics/SceneNode.cpp b/Gems/Maestro/Code/Source/Cinematics/SceneNode.cpp index 8f55c4ebad..10014a8700 100644 --- a/Gems/Maestro/Code/Source/Cinematics/SceneNode.cpp +++ b/Gems/Maestro/Code/Source/Cinematics/SceneNode.cpp @@ -42,8 +42,6 @@ #define s_nodeParams s_nodeParamsSene #define AddSupportedParam AddSupportedParamScene -float const kDefaultCameraFOV = 60.0f; - namespace { bool s_nodeParamsInitialized = false; StaticInstance> s_nodeParams; diff --git a/Gems/Maestro/Code/Source/Cinematics/Tests/AssetBlendTrackTest.cpp b/Gems/Maestro/Code/Source/Cinematics/Tests/AssetBlendTrackTest.cpp index e995795198..09bbe640d4 100644 --- a/Gems/Maestro/Code/Source/Cinematics/Tests/AssetBlendTrackTest.cpp +++ b/Gems/Maestro/Code/Source/Cinematics/Tests/AssetBlendTrackTest.cpp @@ -20,7 +20,6 @@ namespace AssetBlendTrackTest const AZ::Data::AssetId KEY1_ASSET_ID = AZ::Data::AssetId(AZ::Uuid("{86CE36B5-D996-4CEF-943E-3F12008694E1}"), 1); const AZ::Data::AssetId KEY2_ASSET_ID = AZ::Data::AssetId(AZ::Uuid("{94D54D20-BACC-4A60-8A03-0DC9B5033E03}"), 2); const AZ::Data::AssetId KEY3_ASSET_ID = AZ::Data::AssetId(AZ::Uuid("{94D54D20-BACC-4A60-8A03-0DC9B5033E03}"), 3); - const float KEY_TIME = 1.0f; ///////////////////////////////////////////////////////////////////////////////////// // Testing sub-class diff --git a/Gems/Maestro/Code/Source/Cinematics/Tests/EntityNodeTest.cpp b/Gems/Maestro/Code/Source/Cinematics/Tests/EntityNodeTest.cpp index 595a5aac3c..763fa67c78 100644 --- a/Gems/Maestro/Code/Source/Cinematics/Tests/EntityNodeTest.cpp +++ b/Gems/Maestro/Code/Source/Cinematics/Tests/EntityNodeTest.cpp @@ -15,8 +15,6 @@ namespace EntityNodeTest { - // dummy entity id - const int ENTITY_ID = 0; // consants to set up test key frame, at 1.0 seconds, lasting for 1.0 seconds const int KEY_IDX = 0; const float KEY_TIME = 1.0f; diff --git a/Gems/PhysX/Code/Tests/Benchmarks/PhysXJointBenchmarks.cpp b/Gems/PhysX/Code/Tests/Benchmarks/PhysXJointBenchmarks.cpp index 37f099ec1c..17468b5cc6 100644 --- a/Gems/PhysX/Code/Tests/Benchmarks/PhysXJointBenchmarks.cpp +++ b/Gems/PhysX/Code/Tests/Benchmarks/PhysXJointBenchmarks.cpp @@ -40,9 +40,6 @@ namespace PhysX::Benchmarks //! used in BM_Joints_Snake static const float SnakeSegmentLength = 2.5f; - //! The size of the test terrain - static const float TerrainSize = 1000.0f; - //! Constant seed to use with random number generation static const long long RandGenSeed = 74111105110116; //(Number generated by concatenating 'Joint' ascii character codes (74 111 105 110 116) @@ -82,9 +79,6 @@ namespace PhysX::Benchmarks static const float SwingingJointUpperLimit = 90.0f; static const float SwingingJointLowerLimit = -180.0f; - //newtons cradle positioning - static const float ParentNewtonsCradleSpacing = 1.05f; - static const float NewtonsCradleArmLength = 10.0f; } // namespace JointSettings } // namespace JointConstants diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h index 38b1e56f56..cb6c4bf942 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h @@ -80,9 +80,7 @@ namespace ScriptCanvas using ResultType = FunctionTraits::result_type;\ static const size_t s_numArgs = FunctionTraits::arity;\ static const size_t s_numNames = SCRIPT_CANVAS_FUNCTION_VAR_ARGS(__VA_ARGS__);\ - static const size_t s_argsSlotIndicesStart = 2;\ - static const size_t s_resultsSlotIndicesStart = s_argsSlotIndicesStart + s_numArgs;\ - static const size_t s_numResults = ScriptCanvas::Internal::extended_tuple_size::value;\ + /*static const size_t s_numResults = ScriptCanvas::Internal::extended_tuple_size::value;*/\ \ static const char* GetArgName(size_t i)\ {\ diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterfaceUtility.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterfaceUtility.cpp index d8cdbc7585..74a41eb2c6 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterfaceUtility.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterfaceUtility.cpp @@ -13,7 +13,6 @@ namespace SubgraphInterfaceUtilityCpp { - const constexpr size_t k_uniqueOutIndex = 0; const constexpr size_t k_signatureIndex = 1; const constexpr AZ::u64 k_defaultOutIdSignature = 0x3ACF20E73ACF20E7ull; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp index e01a3a0e7a..cc2058f249 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp @@ -34,8 +34,6 @@ namespace ExecutionInterpretedAPICpp constexpr size_t k_StringFastSize = 32; - constexpr size_t k_MaxNodeableOuts = 64; - constexpr size_t k_UuidSize = 16; constexpr unsigned char k_Bad = 77; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.cpp index 2033f92430..c889c6ca17 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.cpp @@ -16,8 +16,6 @@ namespace ScriptCanvas { namespace Logic { - static const int NUMBER_OF_OUTPUTS = 8; - Sequencer::Sequencer() : Node() , m_selectedIndex(0) diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp index f6fce5ddb5..2f51f47230 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp @@ -472,8 +472,6 @@ TEST_F(ScriptCanvasTestFixture, Contracts) delete graph->GetEntity(); } -const int k_executionCount = 998; - TEST_F(ScriptCanvasTestFixture, While) { RunUnitTestGraph("LY_SC_UnitTest_While", ScriptCanvas::ExecutionMode::Interpreted); diff --git a/Gems/TextureAtlas/Code/Source/Editor/AtlasBuilderWorker.cpp b/Gems/TextureAtlas/Code/Source/Editor/AtlasBuilderWorker.cpp index ed0d889299..abcdce99b9 100644 --- a/Gems/TextureAtlas/Code/Source/Editor/AtlasBuilderWorker.cpp +++ b/Gems/TextureAtlas/Code/Source/Editor/AtlasBuilderWorker.cpp @@ -33,6 +33,30 @@ namespace TextureAtlasBuilder { + //! Used for sorting ImageDimensions + bool operator<(ImageDimension a, ImageDimension b); + + //! Used to expose the ImageDimension in a pair to AZStd::Sort + bool operator<(IndexImageDimension a, IndexImageDimension b); + + //! Returns true if two coordinate sets overlap + bool Collides(AtlasCoordinates a, AtlasCoordinates b); + + //! Returns true if item collides with any object in list + bool Collides(AtlasCoordinates item, AZStd::vector list); + + //! Returns the portion of the second item that overlaps with the first + AtlasCoordinates GetOverlap(AtlasCoordinates a, AtlasCoordinates b); + + //! Performs an operation that copies a pixel to the output + void SetPixels(AZ::u8* dest, const AZ::u8* source, int destBytes); + + //! Checks if we can insert an image into a slot + bool CanInsert(AtlasCoordinates slot, ImageDimension image, int padding, int farRight, int farBot); + + //! Adds the necessary padding to an Atlas Coordinate + void AddPadding(AtlasCoordinates& slot, int padding, int farRight, int farBot); + //! Counts leading zeros uint32_t CountLeadingZeros32(uint32_t x) { @@ -1411,7 +1435,7 @@ namespace TextureAtlasBuilder // Defines priority so that sorting can be meaningful. It may seem odd that larger items are "less than" smaller // ones, but as this is a deduction of priority, not value, it is correct. - static bool operator<(ImageDimension a, ImageDimension b) + bool operator<(ImageDimension a, ImageDimension b) { // Prioritize first by longest size if ((a.m_width > a.m_height ? a.m_width : a.m_height) != (b.m_width > b.m_height ? b.m_width : b.m_height)) @@ -1431,7 +1455,7 @@ namespace TextureAtlasBuilder } // Exposes priority logic to the sorting algorithm - static bool operator<(IndexImageDimension a, IndexImageDimension b) { return a.second < b.second; } + bool operator<(IndexImageDimension a, IndexImageDimension b) { return a.second < b.second; } // Tests if two coordinate sets intersect bool Collides(AtlasCoordinates a, AtlasCoordinates b) diff --git a/Gems/TextureAtlas/Code/Source/Editor/AtlasBuilderWorker.h b/Gems/TextureAtlas/Code/Source/Editor/AtlasBuilderWorker.h index 7bff2be678..86faeac616 100644 --- a/Gems/TextureAtlas/Code/Source/Editor/AtlasBuilderWorker.h +++ b/Gems/TextureAtlas/Code/Source/Editor/AtlasBuilderWorker.h @@ -200,28 +200,4 @@ namespace TextureAtlasBuilder //! Returns the height of the tallest area static int GetTallest(const ImageDimensionData& imageList); }; - - //! Used for sorting ImageDimensions - static bool operator<(ImageDimension a, ImageDimension b); - - //! Used to expose the ImageDimension in a pair to AZStd::Sort - static bool operator<(IndexImageDimension a, IndexImageDimension b); - - //! Returns true if two coordinate sets overlap - static bool Collides(AtlasCoordinates a, AtlasCoordinates b); - - //! Returns true if item collides with any object in list - static bool Collides(AtlasCoordinates item, AZStd::vector list); - - //! Returns the portion of the second item that overlaps with the first - static AtlasCoordinates GetOverlap(AtlasCoordinates a, AtlasCoordinates b); - - //! Performs an operation that copies a pixel to the output - static void SetPixels(AZ::u8* dest, const AZ::u8* source, int destBytes); - - //! Checks if we can insert an image into a slot - static bool CanInsert(AtlasCoordinates slot, ImageDimension image, int padding, int farRight, int farBot); - - //! Adds the necessary padding to an Atlas Coordinate - static void AddPadding(AtlasCoordinates& slot, int padding, int farRight, int farBot); } From 31addc43dc742917e8feba1be32036d709d574be Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 23 Aug 2021 14:02:45 -0700 Subject: [PATCH 41/49] Windows and Linux compiling Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Editor/TrackView/DirectorNodeAnimator.cpp | 1 - Code/Editor/TrackView/TrackViewNode.cpp | 4 ---- .../Widgets/ColorPicker/PaletteCardCollection.cpp | 2 +- .../AssetBrowser/AssetBrowserFilterModel.cpp | 4 ++-- .../AzToolsFramework/Slice/SliceUtilities.cpp | 2 +- .../Tests/Prefab/PrefabInstantiateTests.cpp | 3 ++- Code/Tools/SerializeContextTools/Converter.cpp | 4 ++-- .../Artifact/Factory/TestImpactTestRunSuiteFactory.cpp | 4 ++-- .../TestImpactTestSelectorAndPrioritizer.cpp | 4 ++-- .../Process/JobRunner/TestImpactProcessJobRunner.h | 4 ++-- .../Enumeration/TestImpactTestEnumerator.cpp | 2 +- .../Run/TestImpactInstrumentedTestRunner.cpp | 2 +- .../Source/TestEngine/Run/TestImpactTestRunner.cpp | 2 +- .../Runtime/Code/Source/TestImpactRuntime.cpp | 2 +- Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListPool.cpp | 2 +- Gems/Atom/RHI/DX12/Code/Source/RHI/CommandQueue.cpp | 2 +- .../ShaderManagementConsoleBrowserInteractions.cpp | 4 ++-- .../Source/Window/ShaderManagementConsoleWindow.cpp | 10 +++++----- Gems/LyShine/Code/Editor/Animation/UiAnimViewNode.cpp | 4 ---- Gems/LyShine/Code/Editor/HierarchyMenu.cpp | 4 ++-- .../Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp | 2 +- .../Vegetation/Code/Source/InstanceSystemComponent.cpp | 2 +- .../Code/Source/EditorWhiteBoxComponentMode.cpp | 2 +- 23 files changed, 32 insertions(+), 40 deletions(-) diff --git a/Code/Editor/TrackView/DirectorNodeAnimator.cpp b/Code/Editor/TrackView/DirectorNodeAnimator.cpp index d9736075ce..01663fbf69 100644 --- a/Code/Editor/TrackView/DirectorNodeAnimator.cpp +++ b/Code/Editor/TrackView/DirectorNodeAnimator.cpp @@ -21,7 +21,6 @@ //////////////////////////////////////////////////////////////////////////// CDirectorNodeAnimator::CDirectorNodeAnimator([[maybe_unused]] CTrackViewAnimNode* pDirectorNode) { - assert(m_pDirectorNode != nullptr); } //////////////////////////////////////////////////////////////////////////// diff --git a/Code/Editor/TrackView/TrackViewNode.cpp b/Code/Editor/TrackView/TrackViewNode.cpp index d8507d9b0a..b61f7fcf29 100644 --- a/Code/Editor/TrackView/TrackViewNode.cpp +++ b/Code/Editor/TrackView/TrackViewNode.cpp @@ -22,16 +22,12 @@ //////////////////////////////////////////////////////////////////////////// void CTrackViewKeyConstHandle::GetKey(IKey* pKey) const { - assert(m_bIsValid); - m_pTrack->GetKey(m_keyIndex, pKey); } //////////////////////////////////////////////////////////////////////////// float CTrackViewKeyConstHandle::GetTime() const { - assert(m_bIsValid); - return m_pTrack->GetKeyTime(m_keyIndex); } diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/PaletteCardCollection.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/PaletteCardCollection.cpp index 40b95af321..fea843a565 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/PaletteCardCollection.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/PaletteCardCollection.cpp @@ -208,7 +208,7 @@ namespace AzQtComponents QString PaletteCardCollection::uniquePaletteName(QSharedPointer card, const QString& name) const { - const auto paletteNameExists = [this, card](const QString& name) + const auto paletteNameExists = [this](const QString& name) { auto it = std::find_if(m_paletteCards.begin(), m_paletteCards.end(), [&name](QSharedPointer card) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserFilterModel.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserFilterModel.cpp index c729ac4d6f..0601a34cf5 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserFilterModel.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserFilterModel.cpp @@ -134,7 +134,7 @@ namespace AzToolsFramework { const auto& subFilters = compFilter->GetSubFilters(); const auto& compFilterIter = AZStd::find_if(subFilters.cbegin(), subFilters.cend(), - [subFilters](FilterConstType filter) -> bool + [](FilterConstType filter) -> bool { const auto assetTypeFilter = qobject_cast>(filter); return !assetTypeFilter.isNull(); @@ -146,7 +146,7 @@ namespace AzToolsFramework } const auto& compositeStringFilterIter = AZStd::find_if(subFilters.cbegin(), subFilters.cend(), - [subFilters](FilterConstType filter) -> bool + [](FilterConstType filter) -> bool { // The real StringFilter is really a CompositeFilter with just one StringFilter in its subfilter list // To know if it is actually a StringFilter we have to get that subfilter and check if it is a Stringfilter. diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceUtilities.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceUtilities.cpp index 6668b5bc3d..aca667b9aa 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceUtilities.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceUtilities.cpp @@ -4094,7 +4094,7 @@ namespace AzToolsFramework using SCCommandBus = AzToolsFramework::SourceControlCommandBus; SCCommandBus::Broadcast(&SCCommandBus::Events::RequestEdit, fullFilePath.c_str(), true, - [sliceEntity, fullFilePath, tmpFileName, tmpFilesaved](bool /*success*/, const AzToolsFramework::SourceControlFileInfo& info) + [fullFilePath, tmpFileName, tmpFilesaved](bool /*success*/, const AzToolsFramework::SourceControlFileInfo& info) { if (!info.IsReadOnly()) { diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabInstantiateTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabInstantiateTests.cpp index 11efe07e90..09aac8dcf5 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabInstantiateTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabInstantiateTests.cpp @@ -33,7 +33,8 @@ namespace UnitTest CompareInstances(*firstInstance, *secondInstance, true, false); } - TEST_F(PrefabInstantiateTest, PrefabInstantiate_TripleNestingTemplate_InstantiateSucceeds) + // TODO: Issue #3398 will re-enable + TEST_F(PrefabInstantiateTest, DISABLED_PrefabInstantiate_TripleNestingTemplate_InstantiateSucceeds) { AZ::Entity* newEntity = CreateEntity("New Entity"); AzToolsFramework::EditorEntityContextRequestBus::Broadcast( diff --git a/Code/Tools/SerializeContextTools/Converter.cpp b/Code/Tools/SerializeContextTools/Converter.cpp index 38e114855a..eff5f140d5 100644 --- a/Code/Tools/SerializeContextTools/Converter.cpp +++ b/Code/Tools/SerializeContextTools/Converter.cpp @@ -82,7 +82,7 @@ namespace AZ AZ_Printf("Convert", "Converting '%s'\n", filePath.c_str()); PathDocumentContainer documents; - auto callback = [&result, &documents, &extension, &convertSettings, &verifySettings, skipVerify] + auto callback = [&result, &documents, &convertSettings, &verifySettings, skipVerify] (void* classPtr, const Uuid& classId, SerializeContext* /*context*/) { rapidjson::Document document; @@ -346,7 +346,7 @@ namespace AZ // Convert the supplied file list to an absolute path AZStd::optional absFilePath = AZ::Utils::ConvertToAbsolutePath(configFileView); AZ::IO::FixedMaxPath configFilePath = absFilePath ? *absFilePath : configFileView; - auto callback = [&documents, &outputExtension, &configFilePath](AZ::IO::PathView configFileView, bool isFile) -> bool + auto callback = [&documents, &configFilePath](AZ::IO::PathView configFileView, bool isFile) -> bool { if (configFileView == "." || configFileView == "..") { diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Artifact/Factory/TestImpactTestRunSuiteFactory.cpp b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Artifact/Factory/TestImpactTestRunSuiteFactory.cpp index f5d7d3a8a2..57c65837bd 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Artifact/Factory/TestImpactTestRunSuiteFactory.cpp +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Artifact/Factory/TestImpactTestRunSuiteFactory.cpp @@ -64,7 +64,7 @@ namespace TestImpact return !name.starts_with("DISABLED_") && name.find("/DISABLED_") == AZStd::string::npos; }; - const auto getDuration = [&Keys](const AZ::rapidxml::xml_node<>* node) + const auto getDuration = [](const AZ::rapidxml::xml_node<>* node) { const AZStd::string duration = node->first_attribute(Keys[DurationKey])->value(); return AZStd::chrono::milliseconds(static_cast(AZStd::stof(duration) * 1000.f)); @@ -78,7 +78,7 @@ namespace TestImpact for (auto testcase_node = testsuite_node->first_node(Keys[TestCaseKey]); testcase_node; testcase_node = testcase_node->next_sibling()) { - const auto getStatus = [&Keys](const AZ::rapidxml::xml_node<>* node) + const auto getStatus = [](const AZ::rapidxml::xml_node<>* node) { const AZStd::string status = node->first_attribute(Keys[StatusKey])->value(); if (status == Keys[RunKey]) diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Dependency/TestImpactTestSelectorAndPrioritizer.cpp b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Dependency/TestImpactTestSelectorAndPrioritizer.cpp index 74d8f354bd..7aae55a20a 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Dependency/TestImpactTestSelectorAndPrioritizer.cpp +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Dependency/TestImpactTestSelectorAndPrioritizer.cpp @@ -87,7 +87,7 @@ namespace TestImpact { for (const auto& parentTarget : sourceDependency.GetParentTargets()) { - AZStd::visit([&selectedTestTargetMap, &sourceDependency, this](auto&& target) + AZStd::visit([&selectedTestTargetMap, &sourceDependency](auto&& target) { if constexpr (IsProductionTarget) { @@ -129,7 +129,7 @@ namespace TestImpact { for (const auto& parentTarget : sourceDependency.GetParentTargets()) { - AZStd::visit([&selectedTestTargetMap, &sourceDependency, this](auto&& target) + AZStd::visit([&selectedTestTargetMap](auto&& target) { if constexpr (IsTestTarget) { diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/JobRunner/TestImpactProcessJobRunner.h b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/JobRunner/TestImpactProcessJobRunner.h index 6a898931a0..8144615aeb 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/JobRunner/TestImpactProcessJobRunner.h +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/JobRunner/TestImpactProcessJobRunner.h @@ -107,7 +107,7 @@ namespace TestImpact } // Wrapper around low-level process launch callback to gather job meta-data and present a simplified callback interface to the client - const ProcessLaunchCallback processLaunchCallback = [&jobCallback, &jobInfos, &metas]( + const ProcessLaunchCallback processLaunchCallback = [&jobCallback, &metas]( TestImpact::ProcessId pid, TestImpact::LaunchResult launchResult, AZStd::chrono::high_resolution_clock::time_point createTime) @@ -126,7 +126,7 @@ namespace TestImpact }; // Wrapper around low-level process exit callback to gather job meta-data and present a simplified callback interface to the client - const ProcessExitCallback processExitCallback = [&jobCallback, &jobInfos, &metas]( + const ProcessExitCallback processExitCallback = [&jobCallback, &metas]( TestImpact::ProcessId pid, TestImpact::ExitCondition exitCondition, TestImpact::ReturnCode returnCode, diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Enumeration/TestImpactTestEnumerator.cpp b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Enumeration/TestImpactTestEnumerator.cpp index 756b1c75d6..dba1053ee1 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Enumeration/TestImpactTestEnumerator.cpp +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Enumeration/TestImpactTestEnumerator.cpp @@ -151,7 +151,7 @@ namespace TestImpact } */ - const auto payloadGenerator = [this](const JobDataMap& jobDataMap) + const auto payloadGenerator = [](const JobDataMap& jobDataMap) { PayloadMap enumerations; for (const auto& [jobId, jobData] : jobDataMap) diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Run/TestImpactInstrumentedTestRunner.cpp b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Run/TestImpactInstrumentedTestRunner.cpp index bf7e4d2c34..51a3445a53 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Run/TestImpactInstrumentedTestRunner.cpp +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Run/TestImpactInstrumentedTestRunner.cpp @@ -40,7 +40,7 @@ namespace TestImpact AZStd::optional runnerTimeout, AZStd::optional clientCallback) { - const auto payloadGenerator = [this](const JobDataMap& jobDataMap) + const auto payloadGenerator = [](const JobDataMap& jobDataMap) { PayloadMap runs; for (const auto& [jobId, jobData] : jobDataMap) diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Run/TestImpactTestRunner.cpp b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Run/TestImpactTestRunner.cpp index a480f4aa4a..28c38d05d4 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Run/TestImpactTestRunner.cpp +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Run/TestImpactTestRunner.cpp @@ -28,7 +28,7 @@ namespace TestImpact AZStd::optional runnerTimeout, AZStd::optional clientCallback) { - const auto payloadGenerator = [this](const JobDataMap& jobDataMap) + const auto payloadGenerator = [](const JobDataMap& jobDataMap) { PayloadMap runs; for (const auto& [jobId, jobData] : jobDataMap) diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestImpactRuntime.cpp b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestImpactRuntime.cpp index 515118dd7a..770a1458b8 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestImpactRuntime.cpp +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestImpactRuntime.cpp @@ -323,7 +323,7 @@ namespace TestImpact void Runtime::EnumerateMutatedTestTargets(const ChangeDependencyList& changeDependencyList) { AZStd::vector testTargets; - const auto addMutatedTestTargetsToEnumerationList = [this, &testTargets](const AZStd::vector& sourceDependencies) + const auto addMutatedTestTargetsToEnumerationList = [&testTargets](const AZStd::vector& sourceDependencies) { for (const auto& sourceDependency : sourceDependencies) { diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListPool.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListPool.cpp index 3d3ec472a7..c31fe8ada8 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListPool.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListPool.cpp @@ -138,7 +138,7 @@ namespace AZ commandAllocatorPoolDescriptor.m_collectLatency = descriptor.m_frameCountMax; commandAllocatorPool.Init(commandAllocatorPoolDescriptor); - m_commandListSubAllocators[queueIdx].SetInitFunction([this, &commandListPool, &commandAllocatorPool] + m_commandListSubAllocators[queueIdx].SetInitFunction([&commandListPool, &commandAllocatorPool] (Internal::CommandListSubAllocator& subAllocator) { subAllocator.Init(commandAllocatorPool, commandListPool); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandQueue.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandQueue.cpp index b73228e717..5f2c737b38 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandQueue.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandQueue.cpp @@ -108,7 +108,7 @@ namespace AZ void CommandQueue::QueueGpuSignal(Fence& fence) { - QueueCommand([this, &fence](void* commandQueue) + QueueCommand([&fence](void* commandQueue) { AZ_PROFILE_SCOPE(AzRender, "SignalFence"); ID3D12CommandQueue* dx12CommandQueue = static_cast(commandQueue); diff --git a/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ShaderManagementConsoleBrowserInteractions.cpp b/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ShaderManagementConsoleBrowserInteractions.cpp index b82d348df3..ca836b1b8d 100644 --- a/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ShaderManagementConsoleBrowserInteractions.cpp +++ b/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ShaderManagementConsoleBrowserInteractions.cpp @@ -84,7 +84,7 @@ namespace ShaderManagementConsole } }); - menu->addAction("Duplicate...", [entry, caller]() + menu->addAction("Duplicate...", [entry]() { const QFileInfo duplicateFileInfo(AtomToolsFramework::GetDuplicationFileInfo(entry->GetFullPath().c_str())); if (!duplicateFileInfo.absoluteFilePath().isEmpty()) @@ -189,7 +189,7 @@ namespace ShaderManagementConsole }); // add get latest action - m_getLatestAction = sourceControlMenu->addAction("Get Latest", [path, this]() + m_getLatestAction = sourceControlMenu->addAction("Get Latest", [path]() { SourceControlCommandBus::Broadcast(&SourceControlCommandBus::Events::RequestLatest, path.c_str(), [](bool, const SourceControlFileInfo&) {}); diff --git a/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ShaderManagementConsoleWindow.cpp b/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ShaderManagementConsoleWindow.cpp index 6354f8beba..3812e47d70 100644 --- a/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ShaderManagementConsoleWindow.cpp +++ b/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ShaderManagementConsoleWindow.cpp @@ -202,7 +202,7 @@ namespace ShaderManagementConsole // Generating the main menu manually because it's easier and we will have some dynamic or data driven entries m_menuFile = menuBar()->addMenu("&File"); - m_actionOpen = m_menuFile->addAction("&Open...", [this]() { + m_actionOpen = m_menuFile->addAction("&Open...", []() { const AZStd::vector assetTypes = { }; @@ -256,7 +256,7 @@ namespace ShaderManagementConsole AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Broadcast(&AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Events::CloseDocument, documentId); }, QKeySequence::Close); - m_actionCloseAll = m_menuFile->addAction("Close All", [this]() { + m_actionCloseAll = m_menuFile->addAction("Close All", []() { AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Broadcast(&AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Events::CloseAllDocuments); }); @@ -305,7 +305,7 @@ namespace ShaderManagementConsole m_menuEdit->addSeparator(); - m_actionSettings = m_menuEdit->addAction("&Settings...", [this]() { + m_actionSettings = m_menuEdit->addAction("&Settings...", []() { }, QKeySequence::Preferences); m_actionSettings->setEnabled(false); @@ -334,10 +334,10 @@ namespace ShaderManagementConsole m_menuHelp = menuBar()->addMenu("&Help"); - m_actionHelp = m_menuHelp->addAction("&Help...", [this]() { + m_actionHelp = m_menuHelp->addAction("&Help...", []() { }); - m_actionAbout = m_menuHelp->addAction("&About...", [this]() { + m_actionAbout = m_menuHelp->addAction("&About...", []() { }); } diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewNode.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimViewNode.cpp index 2b14a38015..3c1292910f 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewNode.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewNode.cpp @@ -14,16 +14,12 @@ //////////////////////////////////////////////////////////////////////////// void CUiAnimViewKeyConstHandle::GetKey(IKey* pKey) const { - assert(m_bIsValid); - m_pTrack->GetKey(m_keyIndex, pKey); } //////////////////////////////////////////////////////////////////////////// float CUiAnimViewKeyConstHandle::GetTime() const { - assert(m_bIsValid); - return m_pTrack->GetKeyTime(m_keyIndex); } diff --git a/Gems/LyShine/Code/Editor/HierarchyMenu.cpp b/Gems/LyShine/Code/Editor/HierarchyMenu.cpp index 31c5255538..004fe53354 100644 --- a/Gems/LyShine/Code/Editor/HierarchyMenu.cpp +++ b/Gems/LyShine/Code/Editor/HierarchyMenu.cpp @@ -236,14 +236,14 @@ void HierarchyMenu::SliceMenuItems(HierarchyWidget* hierarchy, if (showMask & Show::kNewSlice) { QAction* action = addAction("Make Cascaded Slice from Selected Slices && Entities..."); - QObject::connect(action, &QAction::triggered, hierarchy, [hierarchy, selectedEntities] + QObject::connect(action, &QAction::triggered, hierarchy, [hierarchy] { hierarchy->GetEditorWindow()->GetSliceManager()->MakeSliceFromSelectedItems(hierarchy, true); } ); action = addAction(QObject::tr("Make Detached Slice from Selected Entities...")); - QObject::connect(action, &QAction::triggered, hierarchy, [hierarchy, selectedEntities] + QObject::connect(action, &QAction::triggered, hierarchy, [hierarchy] { hierarchy->GetEditorWindow()->GetSliceManager()->MakeSliceFromSelectedItems(hierarchy, false); } diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp index dbb95828f7..165007b79b 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp @@ -503,7 +503,7 @@ namespace ScriptCanvasEditor m_pendingSave.emplace_back(normPath); m_assetSaveFinalizer.Reset(); - m_assetSaveFinalizer.Start(this, fileInfo, saveInfo, onSaveCallback, AssetSaveFinalizer::OnCompleteHandler([saveInfo](AZ::Data::AssetId /*assetId*/) + m_assetSaveFinalizer.Start(this, fileInfo, saveInfo, onSaveCallback, AssetSaveFinalizer::OnCompleteHandler([](AZ::Data::AssetId /*assetId*/) { })); } diff --git a/Gems/Vegetation/Code/Source/InstanceSystemComponent.cpp b/Gems/Vegetation/Code/Source/InstanceSystemComponent.cpp index d4185fde6c..dd38daa633 100644 --- a/Gems/Vegetation/Code/Source/InstanceSystemComponent.cpp +++ b/Gems/Vegetation/Code/Source/InstanceSystemComponent.cpp @@ -582,7 +582,7 @@ namespace Vegetation } //offloading garbage collection to job to save time deallocating tasks on main thread - auto garbageCollectionJob = AZ::CreateJobFunction([removedTasksPtr]() mutable {}, true); + auto garbageCollectionJob = AZ::CreateJobFunction([]() mutable {}, true); garbageCollectionJob->Start(); } diff --git a/Gems/WhiteBox/Code/Source/EditorWhiteBoxComponentMode.cpp b/Gems/WhiteBox/Code/Source/EditorWhiteBoxComponentMode.cpp index cd9e8090cd..13dc29599d 100644 --- a/Gems/WhiteBox/Code/Source/EditorWhiteBoxComponentMode.cpp +++ b/Gems/WhiteBox/Code/Source/EditorWhiteBoxComponentMode.cpp @@ -397,7 +397,7 @@ namespace WhiteBox const auto edgeHandlesPair = Api::MeshUserEdgeHandles(*whiteBox); - const auto edgeHandles = [whiteBox, edgeSelectionMode, &edgeHandlesPair]() + const auto edgeHandles = [edgeSelectionMode, &edgeHandlesPair]() { switch (edgeSelectionMode) { From a75994e0b949b6447305563ef7c4fb38b2ba49a5 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 23 Aug 2021 15:11:09 -0700 Subject: [PATCH 42/49] more fixes Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Legacy/CryCommon/WinBase.cpp | 2 +- .../Artifact/Factory/TestImpactTestRunSuiteFactory.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Code/Legacy/CryCommon/WinBase.cpp b/Code/Legacy/CryCommon/WinBase.cpp index f9b1978e74..8473417d4a 100644 --- a/Code/Legacy/CryCommon/WinBase.cpp +++ b/Code/Legacy/CryCommon/WinBase.cpp @@ -825,7 +825,7 @@ const int comparePathNames(const char* cpFirst, const char* cpSecond, unsigned i return memicmp(first.c_str(), second.c_str(), length); } -#if defined(FIX_FILENAME_CASE) +#if FIX_FILENAME_CASE static bool FixOnePathElement(char* path) { if (*path == '\0') diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Artifact/Factory/TestImpactTestRunSuiteFactory.cpp b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Artifact/Factory/TestImpactTestRunSuiteFactory.cpp index 57c65837bd..b7a44d43ea 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Artifact/Factory/TestImpactTestRunSuiteFactory.cpp +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Artifact/Factory/TestImpactTestRunSuiteFactory.cpp @@ -64,8 +64,9 @@ namespace TestImpact return !name.starts_with("DISABLED_") && name.find("/DISABLED_") == AZStd::string::npos; }; - const auto getDuration = [](const AZ::rapidxml::xml_node<>* node) + const auto getDuration = [Keys](const AZ::rapidxml::xml_node<>* node) { + AZ_UNUSED(Keys); const AZStd::string duration = node->first_attribute(Keys[DurationKey])->value(); return AZStd::chrono::milliseconds(static_cast(AZStd::stof(duration) * 1000.f)); }; @@ -78,8 +79,9 @@ namespace TestImpact for (auto testcase_node = testsuite_node->first_node(Keys[TestCaseKey]); testcase_node; testcase_node = testcase_node->next_sibling()) { - const auto getStatus = [](const AZ::rapidxml::xml_node<>* node) + const auto getStatus = [Keys](const AZ::rapidxml::xml_node<>* node) { + AZ_UNUSED(Keys); const AZStd::string status = node->first_attribute(Keys[StatusKey])->value(); if (status == Keys[RunKey]) { From 07ea4edbc2d4dfad38ab094cd39525687776091e Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 23 Aug 2021 17:51:13 -0700 Subject: [PATCH 43/49] Fixes for Mac/iOS Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Editor/LogFile.cpp | 2 +- Code/Editor/Platform/Mac/main_dummy.cpp | 4 ++-- .../Mac/AzFramework/Process/ProcessWatcher_Mac.cpp | 2 -- Code/Tools/AssetProcessor/Platform/Mac/main_dummy.cpp | 4 ++-- Gems/Atom/RHI/Code/Tests/AllocatorTests.cpp | 1 - Gems/Atom/RHI/Code/Tests/ShaderResourceGroupTests.cpp | 3 +-- .../Source/RHI.Builders/ShaderPlatformInterface.cpp | 4 +--- .../RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp | 7 ------- Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPool.cpp | 3 +-- .../Atom/RHI/Metal/Code/Source/RHI/CommandListPool.cpp | 2 +- Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.h | 2 +- .../RHI/Metal/Code/Source/RHI/ImagePoolResolver.cpp | 6 ++---- .../Metal/Code/Source/RHI/NullDescriptorManager.cpp | 3 --- Gems/Atom/RHI/Metal/Code/Source/RHI/QueryPool.cpp | 10 ++++------ Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp | 3 --- .../Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp | 1 - .../RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp | 1 - Gems/Atom/RHI/Metal/Code/Source/RHI/SwapChain.cpp | 3 --- .../Platform/Mac/MicrophoneSystemComponent_Mac.mm | 7 ++++--- .../Platform/iOS/MicrophoneSystemComponent_iOS.mm | 7 ++++--- 20 files changed, 24 insertions(+), 51 deletions(-) diff --git a/Code/Editor/LogFile.cpp b/Code/Editor/LogFile.cpp index 2ebb353915..9692dd264a 100644 --- a/Code/Editor/LogFile.cpp +++ b/Code/Editor/LogFile.cpp @@ -179,7 +179,6 @@ void CLogFile::FormatLineV(const char * format, va_list argList) void CLogFile::AboutSystem() { - char szBuffer[MAX_LOGBUFFER_SIZE]; #if defined(AZ_PLATFORM_WINDOWS) || defined(AZ_PLATFORM_LINUX) ////////////////////////////////////////////////////////////////////// // Write the system informations to the log @@ -190,6 +189,7 @@ void CLogFile::AboutSystem() #endif // defined(AZ_PLATFORM_WINDOWS) || defined(AZ_PLATFORM_LINUX) #if defined(AZ_PLATFORM_WINDOWS) + char szBuffer[MAX_LOGBUFFER_SIZE]; wchar_t szLanguageBufferW[64]; DEVMODE DisplayConfig; OSVERSIONINFO OSVerInfo; diff --git a/Code/Editor/Platform/Mac/main_dummy.cpp b/Code/Editor/Platform/Mac/main_dummy.cpp index fb4a431295..082384db58 100644 --- a/Code/Editor/Platform/Mac/main_dummy.cpp +++ b/Code/Editor/Platform/Mac/main_dummy.cpp @@ -66,8 +66,8 @@ int main(int argc, char* argv[]) processLaunchInfo.m_environmentVariables = &envVars; processLaunchInfo.m_showWindow = true; - AzFramework::ProcessWatcher* processWatcher = AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE); - + AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE); + application.Destroy(); return 0; diff --git a/Code/Framework/AzFramework/Platform/Mac/AzFramework/Process/ProcessWatcher_Mac.cpp b/Code/Framework/AzFramework/Platform/Mac/AzFramework/Process/ProcessWatcher_Mac.cpp index 4099443913..1ba9ff3067 100644 --- a/Code/Framework/AzFramework/Platform/Mac/AzFramework/Process/ProcessWatcher_Mac.cpp +++ b/Code/Framework/AzFramework/Platform/Mac/AzFramework/Process/ProcessWatcher_Mac.cpp @@ -205,8 +205,6 @@ namespace AzFramework bool ProcessLauncher::LaunchProcess(const ProcessLaunchInfo& processLaunchInfo, ProcessData& processData) { - bool result = false; - // note that the convention here is that it uses windows-shell style escaping of combined args with spaces in it // (so surrounding with quotes like param="hello world") // this is so that the callers (which could be numerous) do not have to worry about this and sprinkle ifdefs diff --git a/Code/Tools/AssetProcessor/Platform/Mac/main_dummy.cpp b/Code/Tools/AssetProcessor/Platform/Mac/main_dummy.cpp index 12832cc488..cd080f9572 100644 --- a/Code/Tools/AssetProcessor/Platform/Mac/main_dummy.cpp +++ b/Code/Tools/AssetProcessor/Platform/Mac/main_dummy.cpp @@ -66,8 +66,8 @@ int main(int argc, char* argv[]) processLaunchInfo.m_environmentVariables = &envVars; processLaunchInfo.m_showWindow = true; - AzFramework::ProcessWatcher* processWatcher = AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE); - + AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE); + application.Destroy(); return 0; diff --git a/Gems/Atom/RHI/Code/Tests/AllocatorTests.cpp b/Gems/Atom/RHI/Code/Tests/AllocatorTests.cpp index fa4c14089f..e43510adb5 100644 --- a/Gems/Atom/RHI/Code/Tests/AllocatorTests.cpp +++ b/Gems/Atom/RHI/Code/Tests/AllocatorTests.cpp @@ -67,7 +67,6 @@ namespace UnitTest AZStd::vector retiredAllocationsCurrent; AZStd::vector retiredAllocationsPrevious; - const size_t AllocationCount = 100; const size_t AllocationSizeRange = descriptor.m_allocationSizeMax - descriptor.m_allocationSizeMin; AZStd::string outputString; diff --git a/Gems/Atom/RHI/Code/Tests/ShaderResourceGroupTests.cpp b/Gems/Atom/RHI/Code/Tests/ShaderResourceGroupTests.cpp index 32d89cd596..83b3b68b25 100644 --- a/Gems/Atom/RHI/Code/Tests/ShaderResourceGroupTests.cpp +++ b/Gems/Atom/RHI/Code/Tests/ShaderResourceGroupTests.cpp @@ -56,8 +56,7 @@ namespace UnitTest const uint32_t BufferConstantCount = 2; const uint32_t BufferReadCount = 2; const uint32_t BufferReadWriteCount = 2; - const uint32_t BindingIndex = 1; - + AZStd::unique_ptr m_factory; AZStd::unique_ptr m_serializeContext; diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp index b65db2a993..903b25e16f 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp @@ -252,9 +252,7 @@ namespace AZ // Output file AZStd::string shaderMSLOutputFile = RHI::BuildFileNameWithExtension(shaderSourceFile, tempFolder, "metal"); - - bool outputFileWriteResult = false; - + // Stage profile name parameter const AZStd::string shaderModelVersion = "6_2"; diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp index 2c9eb95ad4..bd163f1419 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp @@ -105,7 +105,6 @@ namespace AZ } Fence* fenceToSignal = nullptr; - uint64_t fenceToSignalValue = 0; size_t byteCount = uploadRequest.m_byteCount; size_t byteOffset = destMemoryView.GetOffset() + uploadRequest.m_byteOffset; uint64_t queueValue = m_uploadFence.Increment(); @@ -183,8 +182,6 @@ namespace AZ { CommandQueue* commandQueue = static_cast(queue); FramePacket* framePacket = BeginFramePacket(commandQueue); - const uint16_t arraySize = image->GetDescriptor().m_arraySize; - const uint16_t imageMipLevels = image->GetDescriptor().m_mipLevels; //[GFX TODO][ATOM-5605] - Cache alignments for all formats at Init const static uint32_t bufferOffsetAlign = [mtlDevice minimumTextureBufferAlignmentForPixelFormat: ConvertPixelFormat(image->GetDescriptor().m_format)]; @@ -212,7 +209,6 @@ namespace AZ if (subresourceLayout.m_size.m_height < subresourceLayout.m_rowCount) { AZ_Error("Metal", false, "AsyncUploadQueue::QueueUpload expects ImageHeight '%d' to be bigger than or equal to the image's RowCount '%d'.", subresourceLayout.m_size.m_height, subresourceLayout.m_rowCount); - RHI::AsyncWorkHandle::Null; } // The final staging size for each CopyTextureRegion command @@ -281,8 +277,6 @@ namespace AZ { const uint8_t* subresourceDataStart = reinterpret_cast(subresourceData.m_data) + depth * subresourceSlicePitch; - MTLTextureDescriptor* mtlTextureDesc = ConvertImageDescriptor(image->GetDescriptor()); - uint32_t startRow = 0; uint32_t destHeight = 0; while (startRow < subresourceLayout.m_rowCount) @@ -468,7 +462,6 @@ namespace AZ MTLBlitOption mtlBlitOption = GetBlitOption(destImage->GetDescriptor().m_format); - id tempTex = destImage->GetMemoryView().GetGpuAddress>(); [blitEncoder copyFromBuffer:framePacket->m_stagingResource sourceOffset:framePacket->m_dataOffset sourceBytesPerRow:stagingRowPitch diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPool.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPool.cpp index a1bd9533bc..13f216e098 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPool.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPool.cpp @@ -102,8 +102,7 @@ namespace AZ void BufferPool::ShutdownResourceInternal(RHI::Resource& resourceBase) { Buffer& buffer = static_cast(resourceBase); - auto& device = static_cast(GetDevice()); - + if (auto* resolver = GetResolver()) { resolver->OnResourceShutdown(resourceBase); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.cpp index 62091b794a..7753968122 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.cpp @@ -72,7 +72,7 @@ namespace AZ commandListPoolDescriptor.m_collectLatency = descriptor.m_frameCountMax; commandListPool.Init(commandListPoolDescriptor); - m_commandListSubAllocators[queueIdx].SetInitFunction([this, &commandListPool] + m_commandListSubAllocators[queueIdx].SetInitFunction([&commandListPool] (CommandListSubAllocator& subAllocator) { subAllocator.Init(commandListPool); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.h b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.h index ca40f3c7aa..0ec5952525 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.h +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.h @@ -90,7 +90,7 @@ namespace AZ void Collect(); private: - CommandListPool* m_commandListPool = nullptr; + [[maybe_unused]] CommandListPool* m_commandListPool = nullptr; AZStd::vector m_activeLists; AZStd::array m_commandListPools; diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/ImagePoolResolver.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/ImagePoolResolver.cpp index 94dacb2488..d8a0c2e788 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/ImagePoolResolver.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/ImagePoolResolver.cpp @@ -25,11 +25,9 @@ namespace AZ RHI::ResultCode ImagePoolResolver::UpdateImage(const RHI::ImageUpdateRequest& request, size_t& bytesTransferred) { Image* image = static_cast(request.m_image); - auto& device = static_cast(GetDevice()); - + const RHI::ImageSubresourceLayout& sourceSubresourceLayout = request.m_sourceSubresourceLayout; - const RHI::Origin& imageSubresourcePixelOffset = request.m_imageSubresourcePixelOffset; - + const uint32_t stagingRowPitch = sourceSubresourceLayout.m_bytesPerRow; const uint32_t stagingSlicePitch = sourceSubresourceLayout.m_bytesPerImage; const uint32_t stagingSize = stagingSlicePitch * sourceSubresourceLayout.m_size.m_depth; diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/NullDescriptorManager.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/NullDescriptorManager.cpp index e86ba3c2c3..749e47f6b5 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/NullDescriptorManager.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/NullDescriptorManager.cpp @@ -42,8 +42,6 @@ namespace AZ void NullDescriptorManager::Shutdown() { - const Device& device = static_cast(GetDevice()); - m_nullImages.clear(); m_nullBuffer.m_memoryView = {}; m_nullMtlSamplerState = nil; @@ -94,7 +92,6 @@ namespace AZ textureSizeAndAlign.size = memoryRequirements.m_sizeInBytes; const size_t alignedHeapSize = RHI::AlignUp(heapSize, textureSizeAndAlign.align); - const uint32_t bytesPerPixel = RHI::GetFormatSize(m_nullImages[imageIndex].m_imageDescriptor.m_format); if(imageIndex == static_cast(NullDescriptorManager::ImageTypes::TextureBuffer)) { m_nullImages[imageIndex].m_memoryView = device.CreateImagePlaced(m_nullImages[imageIndex].m_imageDescriptor, m_nullDescriptorHeap, alignedHeapSize, textureSizeAndAlign, MTLTextureTypeTextureBuffer); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/QueryPool.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/QueryPool.cpp index c8f2b89346..1f85d92692 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/QueryPool.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/QueryPool.cpp @@ -26,10 +26,9 @@ namespace AZ RHI::ResultCode QueryPool::InitInternal(RHI::Device& baseDevice, const RHI::QueryPoolDescriptor& descriptor) { auto& device = static_cast(baseDevice); - id mtlDevice = device.GetMtlDevice(); - NSError* error = nil; - + #if AZ_TRAIT_ATOM_METAL_COUNTER_SAMPLING + id mtlDevice = device.GetMtlDevice(); NSArray> * counterSets = [mtlDevice counterSets]; CacheCounterIndices(counterSets); #endif @@ -47,6 +46,7 @@ namespace AZ #if AZ_TRAIT_ATOM_METAL_COUNTER_SAMPLING case RHI::QueryType::Timestamp: { + NSError* error = nil; NSUInteger timeStampCounterIndex = [counterSets indexOfObjectPassingTest:^BOOL(id mtlCounterSet, NSUInteger idx, BOOL *stop) { if ([mtlCounterSet.name isEqualToString:MTLCommonCounterSetTimestamp]) @@ -77,6 +77,7 @@ namespace AZ } case RHI::QueryType::PipelineStatistics: { + NSError* error = nil; NSUInteger statisticCounterIndex = [counterSets indexOfObjectPassingTest:^BOOL(id mtlCounterSet, NSUInteger idx, BOOL *stop) { if ([mtlCounterSet.name isEqualToString:MTLCommonCounterSetStatistic]) @@ -127,9 +128,6 @@ namespace AZ RHI::ResultCode QueryPool::GetResultsInternal(uint32_t startIndex, uint32_t queryCount, uint64_t* results, uint32_t resultsCount, RHI::QueryResultFlagBits flags) { - auto& device = static_cast(GetDevice()); - MTLCommandBufferStatus commandBufferStatus = MTLCommandBufferStatusError; - switch(GetDescriptor().m_type) { case RHI::QueryType::Occlusion: diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp index d70a4d4e60..7e4d510dfa 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp @@ -115,12 +115,10 @@ namespace AZ const RHI::ImageScopeAttachmentDescriptor& bindingDescriptor = scopeAttachment->GetDescriptor(); id imageViewMtlTexture = imageView->GetMemoryView().GetGpuAddress>(); - const bool isFullView = imageView->IsFullView(); const bool isClearAction = bindingDescriptor.m_loadStoreAction.m_loadAction == RHI::AttachmentLoadAction::Clear; const bool isClearActionStencil = bindingDescriptor.m_loadStoreAction.m_loadActionStencil == RHI::AttachmentLoadAction::Clear; const bool isLoadAction = bindingDescriptor.m_loadStoreAction.m_loadAction == RHI::AttachmentLoadAction::Load; - const bool isLoadActionStencil = bindingDescriptor.m_loadStoreAction.m_loadActionStencil == RHI::AttachmentLoadAction::Load; const bool isStoreAction = bindingDescriptor.m_loadStoreAction.m_storeAction == RHI::AttachmentStoreAction::Store; const bool isStoreActionStencil = bindingDescriptor.m_loadStoreAction.m_storeActionStencil == RHI::AttachmentStoreAction::Store; @@ -158,7 +156,6 @@ namespace AZ { mtlStoreActionStencil = MTLStoreActionStore; } - const RHI::ImageViewDescriptor& imgViewDescriptor = imageView->GetDescriptor(); const AZStd::vector& usagesAndAccesses = scopeAttachment->GetUsageAndAccess(); for (const RHI::ScopeAttachmentUsageAndAccess& usageAndAccess : usagesAndAccesses) { diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp index 3862885395..6be5ec7259 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp @@ -26,7 +26,6 @@ namespace AZ { Device& device = static_cast(deviceBase); m_device = &device; - const RHI::ShaderResourceGroupLayout& layout = *descriptor.m_layout; m_srgLayout = descriptor.m_layout; return RHI::ResultCode::Success; } diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp index 03d898bc60..3d90b595e4 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp @@ -50,7 +50,6 @@ namespace AZ RHI::ResultCode StreamingImagePool::InitImageInternal(const RHI::StreamingImageInitRequest& request) { Image& image = static_cast(*request.m_image); - auto& device = static_cast(GetDevice()); MemoryView memoryView = GetDevice().CreateImageCommitted(image.GetDescriptor()); if (!memoryView.IsValid()) diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/SwapChain.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/SwapChain.cpp index 0065ea724e..90ba04c3db 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/SwapChain.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/SwapChain.cpp @@ -123,9 +123,6 @@ namespace AZ RHI::ResultCode SwapChain::InitImageInternal(const InitImageRequest& request) { - const RHI::SwapChainDescriptor& descriptor = GetDescriptor(); - Device& device = GetDevice(); - Name name(AZStd::string::format("SwapChainImage_%d", request.m_imageIndex)); Image& image = static_cast(*request.m_image); diff --git a/Gems/Microphone/Code/Source/Platform/Mac/MicrophoneSystemComponent_Mac.mm b/Gems/Microphone/Code/Source/Platform/Mac/MicrophoneSystemComponent_Mac.mm index 1f7cef7b0c..567f2db6b2 100644 --- a/Gems/Microphone/Code/Source/Platform/Mac/MicrophoneSystemComponent_Mac.mm +++ b/Gems/Microphone/Code/Source/Platform/Mac/MicrophoneSystemComponent_Mac.mm @@ -241,13 +241,14 @@ public: AZStd::size_t GetData(void** outputData, AZStd::size_t numFrames, const SAudioInputConfig& targetConfig, bool shouldDeinterleave) override { - bool changeSampleType = (targetConfig.m_sampleType != m_config.m_sampleType); - bool changeSampleRate = (targetConfig.m_sampleRate != m_config.m_sampleRate); - bool changeNumChannels = (targetConfig.m_numChannels != m_config.m_numChannels); #if defined(USE_LIBSAMPLERATE) // pending port of LIBSAMPLERATE to MacOS return {}; #else + bool changeSampleType = (targetConfig.m_sampleType != m_config.m_sampleType); + bool changeSampleRate = (targetConfig.m_sampleRate != m_config.m_sampleRate); + bool changeNumChannels = (targetConfig.m_numChannels != m_config.m_numChannels); + if (changeSampleType || changeNumChannels) { // Without the SRC library, any change is unsupported! diff --git a/Gems/Microphone/Code/Source/Platform/iOS/MicrophoneSystemComponent_iOS.mm b/Gems/Microphone/Code/Source/Platform/iOS/MicrophoneSystemComponent_iOS.mm index fe8580723a..a3d4f9434f 100644 --- a/Gems/Microphone/Code/Source/Platform/iOS/MicrophoneSystemComponent_iOS.mm +++ b/Gems/Microphone/Code/Source/Platform/iOS/MicrophoneSystemComponent_iOS.mm @@ -187,13 +187,14 @@ public: AZStd::size_t GetData(void** outputData, AZStd::size_t numFrames, const SAudioInputConfig& targetConfig, bool shouldDeinterleave) override { - bool changeSampleType = (targetConfig.m_sampleType != m_config.m_sampleType); - bool changeSampleRate = (targetConfig.m_sampleRate != m_config.m_sampleRate); - bool changeNumChannels = (targetConfig.m_numChannels != m_config.m_numChannels); #if defined(USE_LIBSAMPLERATE) // pending port of LIBSAMPLERATE to iOS return {}; #else + bool changeSampleType = (targetConfig.m_sampleType != m_config.m_sampleType); + bool changeSampleRate = (targetConfig.m_sampleRate != m_config.m_sampleRate); + bool changeNumChannels = (targetConfig.m_numChannels != m_config.m_numChannels); + if (changeSampleType || changeNumChannels) { // Without the SRC library, any change is unsupported! From 91077b0dcdfac07fe55cf8d65e9f35eea0819165 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:06:27 -0700 Subject: [PATCH 44/49] small fix from previous commit Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Gems/Atom/RHI/Metal/Code/Source/RHI/QueryPool.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/QueryPool.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/QueryPool.cpp index 1f85d92692..629aeb24f1 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/QueryPool.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/QueryPool.cpp @@ -46,7 +46,6 @@ namespace AZ #if AZ_TRAIT_ATOM_METAL_COUNTER_SAMPLING case RHI::QueryType::Timestamp: { - NSError* error = nil; NSUInteger timeStampCounterIndex = [counterSets indexOfObjectPassingTest:^BOOL(id mtlCounterSet, NSUInteger idx, BOOL *stop) { if ([mtlCounterSet.name isEqualToString:MTLCommonCounterSetTimestamp]) From d51330702315eeafe2c085e15090f415dd47030b Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Tue, 24 Aug 2021 12:10:31 -0700 Subject: [PATCH 45/49] another warn fix Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Code/Source/Document/AtomToolsDocumentMainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Document/AtomToolsDocumentMainWindow.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Document/AtomToolsDocumentMainWindow.cpp index c39bfc8327..0d62adc9ee 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Document/AtomToolsDocumentMainWindow.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Document/AtomToolsDocumentMainWindow.cpp @@ -121,7 +121,7 @@ namespace AtomToolsFramework }, QKeySequence::Close); m_menuFile->insertAction(insertPostion, m_actionClose); - m_actionCloseAll = CreateAction("Close All", [this]() { + m_actionCloseAll = CreateAction("Close All", []() { AtomToolsDocumentSystemRequestBus::Broadcast(&AtomToolsDocumentSystemRequestBus::Events::CloseAllDocuments); }); m_menuFile->insertAction(insertPostion, m_actionCloseAll); From cd5df6b372e6c60d9fc270d618f708049d9bc86d Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Tue, 24 Aug 2021 16:16:36 -0700 Subject: [PATCH 46/49] Some more fixes Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Editor/LogFile.cpp | 3 +-- .../RPI.Builders/Model/MaterialAssetBuilderComponent.cpp | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Code/Editor/LogFile.cpp b/Code/Editor/LogFile.cpp index 9692dd264a..62e39c8f8a 100644 --- a/Code/Editor/LogFile.cpp +++ b/Code/Editor/LogFile.cpp @@ -183,13 +183,12 @@ void CLogFile::AboutSystem() ////////////////////////////////////////////////////////////////////// // Write the system informations to the log ////////////////////////////////////////////////////////////////////// - + char szBuffer[MAX_LOGBUFFER_SIZE]; //wchar_t szCPUModel[64]; MEMORYSTATUS MemoryStatus; #endif // defined(AZ_PLATFORM_WINDOWS) || defined(AZ_PLATFORM_LINUX) #if defined(AZ_PLATFORM_WINDOWS) - char szBuffer[MAX_LOGBUFFER_SIZE]; wchar_t szLanguageBufferW[64]; DEVMODE DisplayConfig; OSVERSIONINFO OSVerInfo; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/MaterialAssetBuilderComponent.cpp b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/MaterialAssetBuilderComponent.cpp index 4a4c2156ce..ccbdc47f7e 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/MaterialAssetBuilderComponent.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/MaterialAssetBuilderComponent.cpp @@ -253,7 +253,6 @@ namespace AZ } const auto& scene = context.m_scene; - const Uuid sourceSceneUuid = scene.GetSourceGuid(); const auto& sceneGraph = scene.GetGraph(); auto names = sceneGraph.GetNameStorage(); From 058f6e0f227c0786cc653a35e6823692cb2374ee Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Wed, 25 Aug 2021 14:06:26 -0700 Subject: [PATCH 47/49] PR comments/fixes Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Editor/Core/LevelEditorMenuHandler.cpp | 3 +- Code/Editor/Core/LevelEditorMenuHandler.h | 2 +- ...bjectSelectionReferenceFrameCalculator.cpp | 74 ------------------- ...bObjectSelectionReferenceFrameCalculator.h | 41 ---------- ...bObjectSelectionReferenceFrameCalculator.h | 24 ------ Code/Editor/MainWindow.cpp | 2 +- Code/Editor/Objects/BaseObject.h | 2 - Code/Editor/Platform/Mac/main_dummy.cpp | 2 +- Code/Editor/editor_lib_files.cmake | 3 - .../AzCore/AzCore/Debug/BudgetTracker.cpp | 2 - Code/Framework/AzCore/AzCore/Math/Guid.h | 24 ++---- .../AzCore/AzCore/Memory/AllocatorScope.h | 4 +- .../AzCore/AzCore/RTTI/BehaviorContext.h | 3 +- .../AzCore/AzCore/std/string/string_view.h | 17 ----- .../Tools/UpgradeTool/VersionExplorer.cpp | 2 +- 15 files changed, 15 insertions(+), 190 deletions(-) delete mode 100644 Code/Editor/EditMode/SubObjectSelectionReferenceFrameCalculator.cpp delete mode 100644 Code/Editor/EditMode/SubObjectSelectionReferenceFrameCalculator.h delete mode 100644 Code/Editor/Include/ISubObjectSelectionReferenceFrameCalculator.h diff --git a/Code/Editor/Core/LevelEditorMenuHandler.cpp b/Code/Editor/Core/LevelEditorMenuHandler.cpp index 8c757a361e..e568f05167 100644 --- a/Code/Editor/Core/LevelEditorMenuHandler.cpp +++ b/Code/Editor/Core/LevelEditorMenuHandler.cpp @@ -154,8 +154,7 @@ namespace } } -LevelEditorMenuHandler::LevelEditorMenuHandler( - MainWindow* mainWindow, QtViewPaneManager* const viewPaneManager, [[maybe_unused]] QSettings& settings) +LevelEditorMenuHandler::LevelEditorMenuHandler(MainWindow* mainWindow, QtViewPaneManager* const viewPaneManager) : QObject(mainWindow) , m_mainWindow(mainWindow) , m_viewPaneManager(viewPaneManager) diff --git a/Code/Editor/Core/LevelEditorMenuHandler.h b/Code/Editor/Core/LevelEditorMenuHandler.h index 95f2f70703..5ac8e63786 100644 --- a/Code/Editor/Core/LevelEditorMenuHandler.h +++ b/Code/Editor/Core/LevelEditorMenuHandler.h @@ -33,7 +33,7 @@ class LevelEditorMenuHandler { Q_OBJECT public: - LevelEditorMenuHandler(MainWindow* mainWindow, QtViewPaneManager* const viewPaneManager, QSettings& settings); + LevelEditorMenuHandler(MainWindow* mainWindow, QtViewPaneManager* const viewPaneManager); ~LevelEditorMenuHandler(); void Initialize(); diff --git a/Code/Editor/EditMode/SubObjectSelectionReferenceFrameCalculator.cpp b/Code/Editor/EditMode/SubObjectSelectionReferenceFrameCalculator.cpp deleted file mode 100644 index 99f4ab1ca6..0000000000 --- a/Code/Editor/EditMode/SubObjectSelectionReferenceFrameCalculator.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -// Description : Calculate the reference frame for sub-object selections. - -#include "EditorDefs.h" - -#include "SubObjectSelectionReferenceFrameCalculator.h" - -SubObjectSelectionReferenceFrameCalculator::SubObjectSelectionReferenceFrameCalculator([[maybe_unused]] ESubObjElementType selectionType) - : m_anySelected(false) - , pos(0.0f, 0.0f, 0.0f) - , normal(0.0f, 0.0f, 0.0f) - , nNormals(0) - , bUseExplicitFrame(false) - , bExplicitAnySelected(false) -{ -} - -void SubObjectSelectionReferenceFrameCalculator::SetExplicitFrame(bool bAnySelected, const Matrix34& refFrame) -{ - this->m_refFrame = refFrame; - this->bUseExplicitFrame = true; - this->bExplicitAnySelected = bAnySelected; -} - -bool SubObjectSelectionReferenceFrameCalculator::GetFrame(Matrix34& refFrame) -{ - if (this->bUseExplicitFrame) - { - refFrame = this->m_refFrame; - return this->bExplicitAnySelected; - } - else - { - refFrame.SetIdentity(); - - if (this->nNormals > 0) - { - this->normal = this->normal / static_cast(this->nNormals); - if (!this->normal.IsZero()) - { - this->normal.Normalize(); - } - - // Average position. - this->pos = this->pos / static_cast(this->nNormals); - refFrame.SetTranslation(this->pos); - } - - if (this->m_anySelected) - { - if (!this->normal.IsZero()) - { - Vec3 xAxis(1, 0, 0), yAxis(0, 1, 0), zAxis(0, 0, 1); - if (this->normal.IsEquivalent(zAxis) || normal.IsEquivalent(-zAxis)) - { - zAxis = xAxis; - } - xAxis = this->normal.Cross(zAxis).GetNormalized(); - yAxis = xAxis.Cross(this->normal).GetNormalized(); - refFrame.SetFromVectors(xAxis, yAxis, normal, pos); - } - } - - return m_anySelected; - } -} diff --git a/Code/Editor/EditMode/SubObjectSelectionReferenceFrameCalculator.h b/Code/Editor/EditMode/SubObjectSelectionReferenceFrameCalculator.h deleted file mode 100644 index dd33342feb..0000000000 --- a/Code/Editor/EditMode/SubObjectSelectionReferenceFrameCalculator.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -// Description : Calculate the reference frame for sub-object selections. - - -#ifndef CRYINCLUDE_EDITOR_EDITMODE_SUBOBJECTSELECTIONREFERENCEFRAMECALCULATOR_H -#define CRYINCLUDE_EDITOR_EDITMODE_SUBOBJECTSELECTIONREFERENCEFRAMECALCULATOR_H -#pragma once - - -#include "ISubObjectSelectionReferenceFrameCalculator.h" -#include "Objects/SubObjSelection.h" - -class SubObjectSelectionReferenceFrameCalculator - : public ISubObjectSelectionReferenceFrameCalculator -{ -public: - SubObjectSelectionReferenceFrameCalculator(ESubObjElementType selectionType); - - virtual void SetExplicitFrame(bool bAnySelected, const Matrix34& refFrame); - bool GetFrame(Matrix34& refFrame); - -private: - bool m_anySelected; - Vec3 pos; - Vec3 normal; - int nNormals; - std::vector positions; - Matrix34 m_refFrame; - bool bUseExplicitFrame; - bool bExplicitAnySelected; -}; - -#endif // CRYINCLUDE_EDITOR_EDITMODE_SUBOBJECTSELECTIONREFERENCEFRAMECALCULATOR_H diff --git a/Code/Editor/Include/ISubObjectSelectionReferenceFrameCalculator.h b/Code/Editor/Include/ISubObjectSelectionReferenceFrameCalculator.h deleted file mode 100644 index ff82b57de1..0000000000 --- a/Code/Editor/Include/ISubObjectSelectionReferenceFrameCalculator.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -// Description : Calculate the reference frame for sub-object selections. - - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_ISUBOBJECTSELECTIONREFERENCEFRAMECALCULATOR_H -#define CRYINCLUDE_EDITOR_INCLUDE_ISUBOBJECTSELECTIONREFERENCEFRAMECALCULATOR_H -#pragma once - - -class ISubObjectSelectionReferenceFrameCalculator -{ -public: - virtual void SetExplicitFrame(bool bAnySelected, const Matrix34& refFrame) = 0; -}; - -#endif // CRYINCLUDE_EDITOR_INCLUDE_ISUBOBJECTSELECTIONREFERENCEFRAMECALCULATOR_H diff --git a/Code/Editor/MainWindow.cpp b/Code/Editor/MainWindow.cpp index bec61df984..beb338b732 100644 --- a/Code/Editor/MainWindow.cpp +++ b/Code/Editor/MainWindow.cpp @@ -297,7 +297,7 @@ MainWindow::MainWindow(QWidget* parent) , m_settings("O3DE", "O3DE") , m_toolbarManager(new ToolbarManager(m_actionManager, this)) , m_assetImporterManager(new AssetImporterManager(this)) - , m_levelEditorMenuHandler(new LevelEditorMenuHandler(this, m_viewPaneManager, m_settings)) + , m_levelEditorMenuHandler(new LevelEditorMenuHandler(this, m_viewPaneManager)) , m_sourceControlNotifHandler(new AzToolsFramework::QtSourceControlNotificationHandler(this)) , m_viewPaneHost(nullptr) , m_autoSaveTimer(nullptr) diff --git a/Code/Editor/Objects/BaseObject.h b/Code/Editor/Objects/BaseObject.h index 47dba99ab7..ece0bf67c3 100644 --- a/Code/Editor/Objects/BaseObject.h +++ b/Code/Editor/Objects/BaseObject.h @@ -33,7 +33,6 @@ class CGizmo; class CObjectArchive; struct SSubObjSelectionModifyContext; struct SRayHitInfo; -class ISubObjectSelectionReferenceFrameCalculator; class CPopupMenuItem; class QMenu; struct IRenderNode; @@ -571,7 +570,6 @@ public: // Return true if object support selecting of this sub object element type. virtual bool StartSubObjSelection([[maybe_unused]] int elemType) { return false; }; virtual void EndSubObjectSelection() {}; - virtual void CalculateSubObjectSelectionReferenceFrame([[maybe_unused]] ISubObjectSelectionReferenceFrameCalculator* pCalculator) { }; virtual void ModifySubObjSelection([[maybe_unused]] SSubObjSelectionModifyContext& modCtx) {}; virtual void AcceptSubObjectModify() {}; diff --git a/Code/Editor/Platform/Mac/main_dummy.cpp b/Code/Editor/Platform/Mac/main_dummy.cpp index 082384db58..814cbfde66 100644 --- a/Code/Editor/Platform/Mac/main_dummy.cpp +++ b/Code/Editor/Platform/Mac/main_dummy.cpp @@ -66,7 +66,7 @@ int main(int argc, char* argv[]) processLaunchInfo.m_environmentVariables = &envVars; processLaunchInfo.m_showWindow = true; - AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE); + AZStd::unique_ptr processWatcher(AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE)); application.Destroy(); diff --git a/Code/Editor/editor_lib_files.cmake b/Code/Editor/editor_lib_files.cmake index 6c5096a8f5..bc8f835fc7 100644 --- a/Code/Editor/editor_lib_files.cmake +++ b/Code/Editor/editor_lib_files.cmake @@ -290,7 +290,6 @@ set(FILES Include/IPreferencesPage.h Include/IRenderListener.h Include/ISourceControl.h - Include/ISubObjectSelectionReferenceFrameCalculator.h Include/ITextureDatabaseUpdater.h Include/ITransformManipulator.h Include/IViewPane.h @@ -460,8 +459,6 @@ set(FILES Dialogs/PythonScriptsDialog.ui Dialogs/Generic/UserOptions.cpp Dialogs/Generic/UserOptions.h - EditMode/SubObjectSelectionReferenceFrameCalculator.cpp - EditMode/SubObjectSelectionReferenceFrameCalculator.h Export/ExportManager.cpp Export/ExportManager.h Export/OBJExporter.cpp diff --git a/Code/Framework/AzCore/AzCore/Debug/BudgetTracker.cpp b/Code/Framework/AzCore/AzCore/Debug/BudgetTracker.cpp index 255a740e32..2dac9a566e 100644 --- a/Code/Framework/AzCore/AzCore/Debug/BudgetTracker.cpp +++ b/Code/Framework/AzCore/AzCore/Debug/BudgetTracker.cpp @@ -17,8 +17,6 @@ namespace AZ::Debug { - constexpr static const char* BudgetTrackerEnvName = "budgetTrackerEnv"; - struct BudgetTracker::BudgetTrackerImpl { AZStd::unordered_map m_budgets; diff --git a/Code/Framework/AzCore/AzCore/Math/Guid.h b/Code/Framework/AzCore/AzCore/Math/Guid.h index 9889092743..3a2db1693f 100644 --- a/Code/Framework/AzCore/AzCore/Math/Guid.h +++ b/Code/Framework/AzCore/AzCore/Math/Guid.h @@ -10,23 +10,16 @@ #ifndef GUID_DEFINED #define GUID_DEFINED -typedef struct _GUID { - _GUID(unsigned long d1, unsigned short d2, unsigned short d3, std::initializer_list d4) - : Data1(d1), - Data2(d2), - Data3(d3) - { - for (auto it = d4.begin(); it != d4.end(); ++it) - Data4[it - d4.begin()] = *it; - } - _GUID() = default; +#include +struct _GUID { uint32_t Data1; unsigned short Data2; unsigned short Data3; - unsigned char Data4[ 8 ]; -} GUID; + AZStd::array Data4; +}; +using GUID = _GUID; #endif // GUID_DEFINED #if !defined _SYS_GUID_OPERATOR_EQ_ && !defined _NO_SYS_GUID_OPERATOR_EQ_ @@ -36,7 +29,7 @@ static bool inline operator==(const _GUID& lhs, const _GUID& rhs) return lhs.Data1 == rhs.Data1 && lhs.Data2 == rhs.Data2 && lhs.Data3 == rhs.Data3 && - memcmp(lhs.Data4, rhs.Data4, 8) == 0; + lhs.Data4 == rhs.Data4; } static bool inline operator!=(const _GUID& lhs, const _GUID& rhs) { @@ -66,10 +59,9 @@ typedef const GUID& REFIID; const GUID name \ = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } -inline REFGUID GUID_NULL() +inline constexpr GUID GUID_NULL() { - static GUID guid = { 0x00000000L, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; - return guid; + return { 0x00000000L, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; } #define GUID_NULL GUID_NULL() diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorScope.h b/Code/Framework/AzCore/AzCore/Memory/AllocatorScope.h index 7637db3967..4f9aabb4be 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorScope.h +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorScope.h @@ -20,9 +20,7 @@ namespace AZ public: void ActivateAllocators() { - // Note the parameter pack expansion, this creates the equivalent of a fold expression - // For each type, call InitAllocator(), then put 0 in the initializer list - [[maybe_unused]] std::initializer_list init{(InitAllocator(), 0)...}; + (InitAllocator(), ...); } void DeactivateAllocators() diff --git a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h index 48bb72dd52..f02c37492b 100644 --- a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h +++ b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h @@ -3774,8 +3774,7 @@ namespace AZ template inline void OnDemandReflectFunctions(OnDemandReflectionOwner* onDemandReflection, AZStd::Internal::pack_traits_arg_sequence) { - using PackExpander = bool[]; - [[maybe_unused]] PackExpander pe = { true, (BehaviorOnDemandReflectHelper::raw_fp_type>::QueueReflect(onDemandReflection), true)... }; + (BehaviorOnDemandReflectHelper::raw_fp_type>::QueueReflect(onDemandReflection), ...); } // Assumes parameters array is big enough to store all parameters diff --git a/Code/Framework/AzCore/AzCore/std/string/string_view.h b/Code/Framework/AzCore/AzCore/std/string/string_view.h index 29589ec063..d831f0d276 100644 --- a/Code/Framework/AzCore/AzCore/std/string/string_view.h +++ b/Code/Framework/AzCore/AzCore/std/string/string_view.h @@ -869,30 +869,13 @@ namespace AZStd constexpr size_t hash_string(RandomAccessIterator first, size_t length) { size_t hash = 14695981039346656037ULL; -#if AZ_COMPILER_MSVC >= 1924 constexpr size_t fnvPrime = 1099511628211ULL; -#endif const RandomAccessIterator last(first + length); for (; first != last; ++first) { hash ^= static_cast(*first); -#if AZ_COMPILER_MSVC < 1924 - // Workaround for integer overflow warning for hash function when used in a constexpr context - // The warning must be disabled at the call site and is a compiler bug that has been fixed - // with Visual Studio 2019 version 16.4 - // https://developercommunity.visualstudio.com/content/problem/211134/unsigned-integer-overflows-in-constexpr-functionsa.html?childToView=211580#comment-211580 - constexpr size_t fnvPrimeHigh{ 0x100ULL }; - constexpr size_t fnvPrimeLow{ 0x000001b3 }; - const uint64_t hashHigh{ hash >> 32 }; - const uint64_t hashLow{ hash & 0xFFFF'FFFF }; - const uint64_t lowResult{ hashLow * fnvPrimeLow }; - const uint64_t fnvPrimeHighResult{ hashLow * fnvPrimeHigh }; - const uint64_t hashHighResult{ hashHigh * fnvPrimeLow }; - hash = (lowResult & 0xffff'ffff) + (((lowResult >> 32) + (fnvPrimeHighResult & 0xffff'ffff) + (hashHighResult & 0xffff'ffff)) << 32); -#else hash *= fnvPrime; -#endif } return hash; } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/VersionExplorer.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/VersionExplorer.cpp index a039ad7b53..738cfd8d22 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/VersionExplorer.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/VersionExplorer.cpp @@ -762,7 +762,7 @@ namespace ScriptCanvasEditor rowGoToButton->setEnabled(false); m_inProgressAsset = AZStd::find_if(m_assetsToUpgrade.begin(), m_assetsToUpgrade.end() - , [this, asset](const UpgradeAssets::value_type& assetToUpgrade) + , [asset](const UpgradeAssets::value_type& assetToUpgrade) { return assetToUpgrade.GetId() == asset.GetId(); }); From fded2bafad10fe5c4a4ca0ca46a1185ac544a24f Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Wed, 25 Aug 2021 15:35:37 -0700 Subject: [PATCH 48/49] More PR comments/fixes Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Tools/AssetProcessor/Platform/Mac/main_dummy.cpp | 2 +- Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Code/Tools/AssetProcessor/Platform/Mac/main_dummy.cpp b/Code/Tools/AssetProcessor/Platform/Mac/main_dummy.cpp index cd080f9572..e624b40787 100644 --- a/Code/Tools/AssetProcessor/Platform/Mac/main_dummy.cpp +++ b/Code/Tools/AssetProcessor/Platform/Mac/main_dummy.cpp @@ -66,7 +66,7 @@ int main(int argc, char* argv[]) processLaunchInfo.m_environmentVariables = &envVars; processLaunchInfo.m_showWindow = true; - AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE); + AZStd::unique_ptr processWatcher(AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE)); application.Destroy(); diff --git a/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp b/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp index 1e9086c7a0..ace82c4944 100644 --- a/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp +++ b/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp @@ -731,9 +731,9 @@ void UiAnimationSystem::StillUpdate() ////////////////////////////////////////////////////////////////////////// void UiAnimationSystem::ShowPlayedSequencesDebug() { - f32 green[4] = {0, 1, 0, 1}; - f32 purple[4] = {1, 0, 1, 1}; - f32 white[4] = {1, 1, 1, 1}; + //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; From e5e271f45a3203a55d5d91398eebd26dc25f4ecf Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Wed, 25 Aug 2021 16:42:01 -0700 Subject: [PATCH 49/49] One more fix Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Editor/Objects/TrackGizmo.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Code/Editor/Objects/TrackGizmo.cpp b/Code/Editor/Objects/TrackGizmo.cpp index 2dc1a93128..3b753e737a 100644 --- a/Code/Editor/Objects/TrackGizmo.cpp +++ b/Code/Editor/Objects/TrackGizmo.cpp @@ -27,9 +27,11 @@ ////////////////////////////////////////////////////////////////////////// #define AXIS_SIZE 0.1f +#if 0 namespace { int s_highlightAxis = 0; } +#endif ////////////////////////////////////////////////////////////////////////// CTrackGizmo::CTrackGizmo()