diff --git a/Code/Editor/BaseLibraryItem.cpp b/Code/Editor/BaseLibraryItem.cpp index 252510c951..b1fba91fad 100644 --- a/Code/Editor/BaseLibraryItem.cpp +++ b/Code/Editor/BaseLibraryItem.cpp @@ -43,7 +43,7 @@ public: //evaluate size XmlString xmlStr = m_undoCtx.node->getXML(); m_size = sizeof(CUndoBaseLibraryItem); - m_size += xmlStr.GetAllocatedMemory(); + m_size += static_cast(xmlStr.GetAllocatedMemory()); m_size += m_itemPath.length(); m_size += m_description.length(); } @@ -87,7 +87,7 @@ protected: libItem->Serialize(m_redoCtx); XmlString xmlStr = m_redoCtx.node->getXML(); - m_size += xmlStr.GetAllocatedMemory(); + m_size += static_cast(xmlStr.GetAllocatedMemory()); } //load previous saved data diff --git a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyCtrl.cpp b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyCtrl.cpp index 1a7060aa8d..cf80d56962 100644 --- a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyCtrl.cpp +++ b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyCtrl.cpp @@ -560,7 +560,7 @@ void ReflectedPropertyControl::RequestPropertyContextMenu(AzToolsFramework::Inst // Popup Menu with Event selection. QMenu menu; - UINT i = 0; + unsigned int i = 0; const int ePPA_CustomItemBase = 10; // reserved from 10 to 99 const int ePPA_CustomPopupBase = 100; // reserved from 100 to x*100+100 where x is size of m_customPopupMenuPopups @@ -595,12 +595,12 @@ void ReflectedPropertyControl::RequestPropertyContextMenu(AzToolsFramework::Inst action->setData(ePPA_CustomItemBase + i); } - for (UINT j = 0; j < m_customPopupMenuPopups.size(); ++j) + for (unsigned int j = 0; j < m_customPopupMenuPopups.size(); ++j) { SCustomPopupMenu* pMenuInfo = &m_customPopupMenuPopups[j]; QMenu* pSubMenu = menu.addMenu(pMenuInfo->m_text); - for (UINT k = 0; k < pMenuInfo->m_subMenuText.size(); ++k) + for (UINT k = 0; k < static_cast(pMenuInfo->m_subMenuText.size()); ++k) { const UINT uID = ePPA_CustomPopupBase + ePPA_CustomPopupBase * j + k; QAction *action = pSubMenu->addAction(pMenuInfo->m_subMenuText[k]); diff --git a/Code/Editor/EditorDefs.h b/Code/Editor/EditorDefs.h index 6614fa4d72..423f4c5f73 100644 --- a/Code/Editor/EditorDefs.h +++ b/Code/Editor/EditorDefs.h @@ -33,18 +33,6 @@ #include #include -// Warnings in STL -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters in the debug information. -#pragma warning (disable : 4244) // conversion from 'long' to 'float', possible loss of data -#pragma warning (disable : 4018) // signed/unsigned mismatch - -// Disable warning when a function returns a value inside an __asm block -#pragma warning (disable : 4035) - -////////////////////////////////////////////////////////////////////////// -// 64-bits related warnings. -#pragma warning (disable : 4267) // conversion from 'size_t' to 'int', possible loss of data - ////////////////////////////////////////////////////////////////////////// // Simple type definitions. ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Editor/EditorViewportWidget.cpp b/Code/Editor/EditorViewportWidget.cpp index 28e8cce33e..c7b1976432 100644 --- a/Code/Editor/EditorViewportWidget.cpp +++ b/Code/Editor/EditorViewportWidget.cpp @@ -1915,8 +1915,8 @@ Vec3 EditorViewportWidget::WorldToView3D(const Vec3& wp, [[maybe_unused]] int nF { out.x = (x / 100) * m_rcClient.width(); out.y = (y / 100) * m_rcClient.height(); - out.x /= QHighDpiScaling::factor(windowHandle()->screen()); - out.y /= QHighDpiScaling::factor(windowHandle()->screen()); + out.x /= static_cast(QHighDpiScaling::factor(windowHandle()->screen())); + out.y /= static_cast(QHighDpiScaling::factor(windowHandle()->screen())); out.z = z; } return out; diff --git a/Code/Editor/Objects/BaseObject.cpp b/Code/Editor/Objects/BaseObject.cpp index 482055d7ed..f40363ba98 100644 --- a/Code/Editor/Objects/BaseObject.cpp +++ b/Code/Editor/Objects/BaseObject.cpp @@ -1978,8 +1978,8 @@ bool CBaseObject::HitHelperAtTest(HitContext& hc, const Vec3& pos) { float fScreenScale = hc.view->GetScreenScaleFactor(pos); - iconSizeX *= OBJECT_TEXTURE_ICON_SCALE / fScreenScale; - iconSizeY *= OBJECT_TEXTURE_ICON_SCALE / fScreenScale; + iconSizeX = static_cast(static_cast(iconSizeX) * OBJECT_TEXTURE_ICON_SCALE / fScreenScale); + iconSizeY = static_cast(static_cast(iconSizeY) * OBJECT_TEXTURE_ICON_SCALE / fScreenScale); } // Hit Test icon of this object. diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.cpp b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.cpp index 02d2174fb8..c1938184db 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.cpp +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.cpp @@ -2597,7 +2597,7 @@ void OutlinerItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& QString htmlStripped = layerInfoString; htmlStripped.remove(htmlMarkupRegex); const float layerInfoPadding = 1.2f; - textWidthAvailable -= fontMetrics.horizontalAdvance(htmlStripped) * layerInfoPadding; + textWidthAvailable -= static_cast(fontMetrics.horizontalAdvance(htmlStripped) * layerInfoPadding); } entityNameRichText = fontMetrics.elidedText(optionV4.text, Qt::TextElideMode::ElideRight, textWidthAvailable); diff --git a/Code/Editor/Plugins/EditorCommon/QtViewPane.cpp b/Code/Editor/Plugins/EditorCommon/QtViewPane.cpp index 7d97e6f580..3deef7e503 100644 --- a/Code/Editor/Plugins/EditorCommon/QtViewPane.cpp +++ b/Code/Editor/Plugins/EditorCommon/QtViewPane.cpp @@ -9,8 +9,6 @@ #include "platform.h" -#pragma warning(disable: 4266) // disabled warning from afk overrides - #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS #include #include @@ -30,13 +28,10 @@ #include "QtUtil.h" // ugly dependencies: -#pragma warning(push) -#pragma warning(disable: 4244) // warning C4244: 'argument' : conversion from 'A' to 'B', possible loss of data #include "Functor.h" class CXmlArchive; #include #include "Util/PathUtil.h" -#pragma warning(pop) // ^^^ // --------------------------------------------------------------------------- diff --git a/Code/Editor/TrackView/TrackViewDopeSheetBase.cpp b/Code/Editor/TrackView/TrackViewDopeSheetBase.cpp index aa4ef94e9e..c784142b3c 100644 --- a/Code/Editor/TrackView/TrackViewDopeSheetBase.cpp +++ b/Code/Editor/TrackView/TrackViewDopeSheetBase.cpp @@ -258,7 +258,7 @@ void CTrackViewDopeSheetBase::SetTimeScale(float timeScale, float fAnchorTime) while (fPixelsPerTick >= 12.0 && steps < 100); float fCurrentOffset = -fAnchorTime * m_timeScale; - m_scrollOffset.rx() += fOldOffset - fCurrentOffset; + m_scrollOffset.rx() += static_cast(fOldOffset - fCurrentOffset); m_scrollBar->setValue(m_scrollOffset.x()); update(); diff --git a/Code/Editor/Util/AffineParts.cpp b/Code/Editor/Util/AffineParts.cpp index 7e6a1be35b..c80ceb3ffa 100644 --- a/Code/Editor/Util/AffineParts.cpp +++ b/Code/Editor/Util/AffineParts.cpp @@ -9,8 +9,6 @@ #include "EditorDefs.h" -#pragma warning ( disable : 4244 ) // conversion from 'double' to 'float', possible loss of data. - /**** Decompose.h - Basic declarations ****/ typedef struct { diff --git a/Code/Editor/Util/GdiUtil.cpp b/Code/Editor/Util/GdiUtil.cpp index eba5ac8579..8565aabf9d 100644 --- a/Code/Editor/Util/GdiUtil.cpp +++ b/Code/Editor/Util/GdiUtil.cpp @@ -61,15 +61,11 @@ QColor ScaleColor(const QColor& c, float aScale) aColor = QColor(1, 1, 1); } - int r = aColor.red(); - int g = aColor.green(); - int b = aColor.blue(); + const float r = static_cast(aColor.red()) * aScale; + const float g = static_cast(aColor.green()) * aScale; + const float b = static_cast(aColor.blue()) * aScale; - r *= aScale; - g *= aScale; - b *= aScale; - - return QColor(CLAMP(r, 0, 255), CLAMP(g, 0, 255), CLAMP(b, 0, 255)); + return QColor(CLAMP(static_cast(r), 0, 255), CLAMP(static_cast(g), 0, 255), CLAMP(static_cast(b), 0, 255)); } CAlphaBitmap::CAlphaBitmap() diff --git a/Code/Editor/Util/ImageTIF.cpp b/Code/Editor/Util/ImageTIF.cpp index 25e4296154..654b24f857 100644 --- a/Code/Editor/Util/ImageTIF.cpp +++ b/Code/Editor/Util/ImageTIF.cpp @@ -60,7 +60,7 @@ libtiffDummyReadProc (thandle_t fd, tdata_t buf, tsize_t size) memcpy(buf, &memImage->buffer[memImage->offset], size); - memImage->offset += size; + memImage->offset += static_cast(size); // Return the amount of data read return size; @@ -83,7 +83,7 @@ libtiffDummySeekProc (thandle_t fd, toff_t off, int i) break; case SEEK_CUR: - memImage->offset += off; + memImage->offset += static_cast(off); break; case SEEK_END: diff --git a/Code/Editor/Util/Util.h b/Code/Editor/Util/Util.h index b0ec0db818..61bb0eed09 100644 --- a/Code/Editor/Util/Util.h +++ b/Code/Editor/Util/Util.h @@ -137,8 +137,6 @@ namespace Util { x = x - 1; -#pragma warning(push) -#pragma warning(disable : 4293) if (sizeof(TInteger) > 0) { x |= x >> 1; @@ -163,7 +161,6 @@ namespace Util { x |= x >> 32; } -#pragma warning(pop) return x + 1; } diff --git a/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp b/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp index 6b25c49b88..fb8ca8b892 100644 --- a/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp +++ b/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp @@ -357,8 +357,6 @@ namespace AzFramework } } - #pragma warning( push ) - #pragma warning( disable : 4505 ) // StackDump is useful to debug the lua stack. Disable warning about this method being unused. //========================================================================= // DebugPrintStack // Prints the Lua stack starting from the bottom. @@ -375,8 +373,6 @@ namespace AzFramework AZ_Warning("ScriptComponent", false, "Stack Dump: '%s'", dump.c_str()); } - #pragma warning( pop ) - //========================================================================= // Properties__IndexFindSubtable diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp index d5a213e80f..08e08afdd5 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp @@ -208,7 +208,7 @@ namespace O3DE::ProjectManager const QPixmap& pixmap = iterator.value(); painter->drawPixmap(contentRect.left() + startX, contentRect.bottom() - s_platformIconSize, pixmap); qreal aspectRatio = static_cast(pixmap.width()) / pixmap.height(); - startX += s_platformIconSize * aspectRatio + s_platformIconSize / 2.5; + startX += static_cast(s_platformIconSize * aspectRatio + s_platformIconSize / 2.5); } } } diff --git a/Gems/AWSCore/Code/Include/Public/Framework/AWSApiClientJobConfig.h b/Gems/AWSCore/Code/Include/Public/Framework/AWSApiClientJobConfig.h index 2070bab4b6..800edffd41 100644 --- a/Gems/AWSCore/Code/Include/Public/Framework/AWSApiClientJobConfig.h +++ b/Gems/AWSCore/Code/Include/Public/Framework/AWSApiClientJobConfig.h @@ -45,15 +45,9 @@ namespace AWSCore virtual std::shared_ptr GetClient() = 0; }; -#ifdef _MSC_VER -#pragma warning( push ) -#pragma warning( disable: 4250 ) // warning C4250: 'AWSCore::AwsApiClientJobConfig': inherits 'AWSCore::AwsApiJobConfig::AWSCore::AwsApiJobConfig::GetJobContext' via dominance // Thanks to http://stackoverflow.com/questions/11965596/diamond-inheritance-scenario-compiles-fine-in-g-but-produces-warnings-errors for the explanation // This is the expected and desired behavior. The warning is superfluous. - -#endif - /// Configuration for AWS jobs using a specific client type. template class AwsApiClientJobConfig @@ -126,9 +120,4 @@ namespace AWSCore /// Set by ApplySettings std::shared_ptr m_client; }; - -#ifdef _MSC_VER -#pragma warning( pop ) // C4250 -#endif - } // namespace AWSCore diff --git a/Gems/AWSCore/Code/Include/Public/Framework/HttpRequestJobConfig.h b/Gems/AWSCore/Code/Include/Public/Framework/HttpRequestJobConfig.h index 9018c167f6..f5a089b5ca 100644 --- a/Gems/AWSCore/Code/Include/Public/Framework/HttpRequestJobConfig.h +++ b/Gems/AWSCore/Code/Include/Public/Framework/HttpRequestJobConfig.h @@ -27,15 +27,9 @@ namespace AWSCore }; -#ifdef _MSC_VER -#pragma warning( push ) -#pragma warning( disable: 4250 ) // warning C4250: 'AWSCore::HttpRequestJobConfig' : inherits 'AWSCore::AwsApiJobConfig::AWSCore::AwsApiJobConfig::GetJobContext' via dominance // Thanks to http://stackoverflow.com/questions/11965596/diamond-inheritance-scenario-compiles-fine-in-g-but-produces-warnings-errors for the explanation // This is the expected and desired behavior. The warning is superfluous. - -#endif - //! Provides service job configuration using settings properties. class HttpRequestJobConfig : public AwsApiJobConfig @@ -98,9 +92,4 @@ namespace AWSCore std::shared_ptr m_httpClient{ nullptr }; Aws::String m_userAgent{}; }; - -#ifdef _MSC_VER -#pragma warning( pop ) // C4250 -#endif - } // namespace AWSCore diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceClientJobConfig.h b/Gems/AWSCore/Code/Include/Public/Framework/ServiceClientJobConfig.h index 239fdfdbc0..c78fc41617 100644 --- a/Gems/AWSCore/Code/Include/Public/Framework/ServiceClientJobConfig.h +++ b/Gems/AWSCore/Code/Include/Public/Framework/ServiceClientJobConfig.h @@ -60,15 +60,10 @@ namespace AWSCore static const char* GetRESTApiStageKeyName() { return RESTAPI_STAGE; } \ }; -#ifdef _MSC_VER -#pragma warning( push ) -#pragma warning( disable: 4250 ) // warning C4250: 'AWSCore::ServiceClientJobConfig' : inherits 'AWSCore::AwsApiJobConfig::AWSCore::AwsApiJobConfig::GetJobContext' via dominance // Thanks to http://stackoverflow.com/questions/11965596/diamond-inheritance-scenario-compiles-fine-in-g-but-produces-warnings-errors for the explanation // This is the expected and desired behavior. The warning is superfluous. -#endif - /// Provides service job configuration using settings properties. template class ServiceClientJobConfig @@ -132,11 +127,6 @@ namespace AWSCore } }; - -#ifdef _MSC_VER -#pragma warning( pop ) // C4250 -#endif - } // namespace AWSCore diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceJobConfig.h b/Gems/AWSCore/Code/Include/Public/Framework/ServiceJobConfig.h index 0e2e2de96d..8632db7d9f 100644 --- a/Gems/AWSCore/Code/Include/Public/Framework/ServiceJobConfig.h +++ b/Gems/AWSCore/Code/Include/Public/Framework/ServiceJobConfig.h @@ -19,15 +19,9 @@ namespace AWSCore { }; -#ifdef _MSC_VER -#pragma warning( push ) -#pragma warning( disable: 4250 ) // warning C4250: 'AWSCore::ServiceJobConfig' : inherits 'AWSCore::AwsApiJobConfig::AWSCore::AwsApiJobConfig::GetJobContext' via dominance // Thanks to http://stackoverflow.com/questions/11965596/diamond-inheritance-scenario-compiles-fine-in-g-but-produces-warnings-errors for the explanation // This is the expected and desired behavior. The warning is superfluous. - -#endif - /// Provides service job configuration using settings properties. class ServiceJobConfig : public HttpRequestJobConfig @@ -63,9 +57,4 @@ namespace AWSCore private: }; - -#ifdef _MSC_VER -#pragma warning( pop ) // C4250 -#endif - } // namespace AWSCore diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceRequestJobConfig.h b/Gems/AWSCore/Code/Include/Public/Framework/ServiceRequestJobConfig.h index 8395384427..660b4f2537 100644 --- a/Gems/AWSCore/Code/Include/Public/Framework/ServiceRequestJobConfig.h +++ b/Gems/AWSCore/Code/Include/Public/Framework/ServiceRequestJobConfig.h @@ -25,15 +25,10 @@ namespace AWSCore virtual bool IsValid() const = 0; }; -#ifdef _MSC_VER -#pragma warning( push ) -#pragma warning( disable: 4250 ) // warning C4250: 'AWSCore::ServiceRequestJobConfig' : inherits 'AWSCore::AwsApiJobConfig::AWSCore::AwsApiJobConfig::GetJobContext' via dominance // Thanks to http://stackoverflow.com/questions/11965596/diamond-inheritance-scenario-compiles-fine-in-g-but-produces-warnings-errors for the explanation // This is the expected and desired behavior. The warning is superfluous. -#endif - template class ServiceRequestJobConfig : public ServiceClientJobConfig @@ -106,8 +101,4 @@ namespace AWSCore }; -#ifdef _MSC_VER -#pragma warning( pop ) // C4250 -#endif - } // namespace AWSCore diff --git a/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionMetric.cpp b/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionMetric.cpp index f54d7f71af..c4f51fcb6f 100644 --- a/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionMetric.cpp +++ b/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionMetric.cpp @@ -12,8 +12,6 @@ #include #include -#pragma warning(disable : 4996) - namespace AWSCore { constexpr char AWSAttributionMetricDefaultO3DEVersion[] = "1.1"; diff --git a/Gems/AWSGameLift/Code/AWSGameLiftServer/Source/GameLiftServerSDKWrapper.cpp b/Gems/AWSGameLift/Code/AWSGameLiftServer/Source/GameLiftServerSDKWrapper.cpp index ae9b868f42..ae4fe7b0f4 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftServer/Source/GameLiftServerSDKWrapper.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftServer/Source/GameLiftServerSDKWrapper.cpp @@ -10,8 +10,6 @@ #include -#pragma warning(disable : 4996) - namespace AWSGameLift { Aws::GameLift::GenericOutcome GameLiftServerSDKWrapper::AcceptPlayerSession(const std::string& playerSessionId) diff --git a/Gems/AWSMetrics/Code/Source/MetricsEventBuilder.cpp b/Gems/AWSMetrics/Code/Source/MetricsEventBuilder.cpp index b7d9163fa9..043af2ef09 100644 --- a/Gems/AWSMetrics/Code/Source/MetricsEventBuilder.cpp +++ b/Gems/AWSMetrics/Code/Source/MetricsEventBuilder.cpp @@ -15,9 +15,6 @@ #include -#pragma warning(disable : 4996) - - namespace AWSMetrics { MetricsEventBuilder::MetricsEventBuilder() diff --git a/Gems/Atom/Asset/ImageProcessingAtom/External/CubeMapGen/VectorMacros.h b/Gems/Atom/Asset/ImageProcessingAtom/External/CubeMapGen/VectorMacros.h index c293cf1ac7..0db22d03d6 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/External/CubeMapGen/VectorMacros.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/External/CubeMapGen/VectorMacros.h @@ -18,9 +18,6 @@ //-------------------------------------------------------------------------------------- // Modified from original -//disable warning about doubles being converted down to float -#pragma warning (disable : 4244 ) - #define VM_LARGE_FLOAT 3.7e37f #define VM_MIN(a, b) (((a) < (b)) ? (a) : (b)) diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Window/AtomToolsMainWindowRequestBus.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Window/AtomToolsMainWindowRequestBus.h index 6edb44bc5c..647082f553 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Window/AtomToolsMainWindowRequestBus.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Window/AtomToolsMainWindowRequestBus.h @@ -8,9 +8,6 @@ #pragma once -//! Disables "unreferenced formal parameter" warning -#pragma warning(disable : 4100) - #include #include #include diff --git a/Gems/CrashReporting/Code/Platform/Windows/GameCrashUploader_windows.cpp b/Gems/CrashReporting/Code/Platform/Windows/GameCrashUploader_windows.cpp index f65d98d7da..d8def1885e 100644 --- a/Gems/CrashReporting/Code/Platform/Windows/GameCrashUploader_windows.cpp +++ b/Gems/CrashReporting/Code/Platform/Windows/GameCrashUploader_windows.cpp @@ -15,8 +15,6 @@ #include #include -#pragma warning(disable : 4996) - namespace O3de { diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewDopeSheetBase.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimViewDopeSheetBase.cpp index a38736ff67..bd5c82fc9e 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewDopeSheetBase.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewDopeSheetBase.cpp @@ -251,7 +251,7 @@ void CUiAnimViewDopeSheetBase::SetTimeScale(float timeScale, float fAnchorTime) while (fPixelsPerTick >= 12.0 && steps < 100); float fCurrentOffset = -fAnchorTime * m_timeScale; - m_scrollOffset.rx() += fOldOffset - fCurrentOffset; + m_scrollOffset.rx() += static_cast(fOldOffset - fCurrentOffset); update(); diff --git a/Gems/LyShine/Code/Editor/EditorCommon.h b/Gems/LyShine/Code/Editor/EditorCommon.h index ebe5b89cfc..9af5958c67 100644 --- a/Gems/LyShine/Code/Editor/EditorCommon.h +++ b/Gems/LyShine/Code/Editor/EditorCommon.h @@ -34,8 +34,6 @@ #include #include -#pragma warning(disable: 4355) // 'this' : used in base member initializer list - class CanvasSizeToolbarSection; class CommandCanvasPropertiesChange; class CommandCanvasSizeToolbarIndex; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h index 9cf5d04167..41a674536b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h @@ -21,9 +21,6 @@ #include "Node.h" #include "Attributes.h" -#pragma warning( push ) -#pragma warning( disable : 5046) // 'function' : Symbol involving type with internal linkage not defined - /** * NodeFunctionGeneric.h * @@ -372,5 +369,3 @@ namespace ScriptCanvas } } - -#pragma warning( pop ) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp index 67c79aaa05..62ca21f1b6 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp @@ -10,8 +10,6 @@ #include -#pragma warning (disable:4503) // decorated name length exceeded, name was truncated - namespace ScriptCanvas { namespace Nodes diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/CreateElementsActions.cpp b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/CreateElementsActions.cpp index 71b157e0a9..0fa3765ac3 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/CreateElementsActions.cpp +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/CreateElementsActions.cpp @@ -539,8 +539,8 @@ namespace ScriptCanvasDeveloper AZ::Vector2 stepDirection = AZ::Vector2::CreateZero(); - stepDirection.SetX(jutDirection.x() * stepSize.GetX()); - stepDirection.SetY(jutDirection.y() * stepSize.GetY()); + stepDirection.SetX(static_cast(jutDirection.x() * stepSize.GetX())); + stepDirection.SetY(static_cast(jutDirection.y() * stepSize.GetY())); m_scenePoint.setX(m_scenePoint.x() + stepDirection.GetX() * 2); } diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_NodeGenerics.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_NodeGenerics.cpp index f6e5b361f4..cbbe77fbba 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_NodeGenerics.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_NodeGenerics.cpp @@ -13,9 +13,6 @@ #include -#pragma warning( push ) -#pragma warning( disable : 5046) //'function' : Symbol involving type with internal linkage not defined - using namespace ScriptCanvasTests; namespace @@ -163,6 +160,3 @@ TEST_F(ScriptCanvasTestFixture, NodeGenerics) delete graph->GetEntity(); } - - -#pragma warning( pop )