diff --git a/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp index a0dda9f692..962c82614f 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp @@ -347,17 +347,12 @@ namespace AZ::IO::ArchiveInternal return EOF; } int c = EOF; - int i; - for (i = 0; i < 1; i++) + if (m_nCurSeek == GetFileSize()) { - if (i + m_nCurSeek == GetFileSize()) - { - return c; - } - c = pData[i + m_nCurSeek]; - break; + return c; } - m_nCurSeek += i + 1; + c = pData[m_nCurSeek]; + m_nCurSeek += 1; return c; } } diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsTypes.h b/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsTypes.h index bb53d6d3dd..30f3fb6297 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsTypes.h +++ b/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsTypes.h @@ -56,7 +56,7 @@ namespace AzPhysics //! A handle to a Scene within the physics simulation. //! A SceneHandle is a tuple of a Crc of the scenes name and the index in the Scene list. using SceneHandle = AZStd::tuple; - static constexpr SceneHandle InvalidSceneHandle = { AZ::Crc32(), -1 }; + static constexpr SceneHandle InvalidSceneHandle = { AZ::Crc32(), AZ::s8(-1) }; //! Ease of use type for referencing a List of SceneHandle objects. using SceneHandleList = AZStd::vector; diff --git a/Code/Framework/AzNetworking/AzNetworking/Utilities/QuantizedValues.h b/Code/Framework/AzNetworking/AzNetworking/Utilities/QuantizedValues.h index 190a32ddc7..46e778d5b3 100644 --- a/Code/Framework/AzNetworking/AzNetworking/Utilities/QuantizedValues.h +++ b/Code/Framework/AzNetworking/AzNetworking/Utilities/QuantizedValues.h @@ -176,7 +176,7 @@ namespace AzNetworking //! Takes a quantized integral value and stores the floating point representation. void DecodeQuantizedValues(); - AZ_PUSH_DISABLE_WARNING(4201 4324, "-Wunknown-warning-option") // anonymous union, structure was padded due to alignment + AZ_PUSH_DISABLE_WARNING(4324, "-Wunknown-warning-option") // anonymous union, structure was padded due to alignment union { float m_quantizedValues[NUM_ELEMENTS]; diff --git a/Code/Framework/AzNetworking/AzNetworking/Utilities/QuantizedValues.inl b/Code/Framework/AzNetworking/AzNetworking/Utilities/QuantizedValues.inl index b0a424d48a..86e736928a 100644 --- a/Code/Framework/AzNetworking/AzNetworking/Utilities/QuantizedValues.inl +++ b/Code/Framework/AzNetworking/AzNetworking/Utilities/QuantizedValues.inl @@ -218,14 +218,7 @@ namespace AzNetworking { SerializeType serializedValue = static_cast(m_serializeValues[i]); -#ifdef AZ_COMPILER_MSVC -# pragma warning(push) -# pragma warning(disable: 4127) // conditional expression is constant -#endif - if (NUM_BYTES == 3) -#ifdef AZ_COMPILER_MSVC -# pragma warning(pop) -#endif + if constexpr (NUM_BYTES == 3) { uint8_t lowByte = static_cast((serializedValue & 0x000000FF) ); uint8_t midByte = static_cast((serializedValue & 0x0000FF00) >> 8); diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/SliderCombo.h b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/SliderCombo.h index 7baa386784..2646162af4 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/SliderCombo.h +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/SliderCombo.h @@ -40,6 +40,8 @@ namespace AzQtComponents //! Current value. Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged) public: + using value_type = int; + explicit SliderCombo(QWidget *parent = nullptr); ~SliderCombo(); @@ -142,6 +144,8 @@ namespace AzQtComponents Q_PROPERTY(double curveMidpoint READ curveMidpoint WRITE setCurveMidpoint) public: + using value_type = double; + explicit SliderDoubleCombo(QWidget *parent = nullptr); ~SliderDoubleCombo(); diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabLoadBenchmarks.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabLoadBenchmarks.cpp index a6c1e27caf..dd29654416 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabLoadBenchmarks.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabLoadBenchmarks.cpp @@ -16,7 +16,7 @@ namespace Benchmark BENCHMARK_DEFINE_F(BM_PrefabLoad, LoadPrefab_Basic)(::benchmark::State& state) { - const unsigned int numTemplates = state.range(); + const unsigned int numTemplates = static_cast(state.range()); CreateFakePaths(numTemplates); for (auto _ : state)