diff --git a/Code/Editor/CryEditDoc.h b/Code/Editor/CryEditDoc.h index 2a6bf8bc63..5e11e32e0e 100644 --- a/Code/Editor/CryEditDoc.h +++ b/Code/Editor/CryEditDoc.h @@ -15,6 +15,7 @@ #include #include #include +#include #endif class CClouds; diff --git a/Code/Editor/Objects/DisplayContext.h b/Code/Editor/Objects/DisplayContext.h index 498b96c540..85fbe11b7e 100644 --- a/Code/Editor/Objects/DisplayContext.h +++ b/Code/Editor/Objects/DisplayContext.h @@ -30,6 +30,7 @@ struct IRenderAuxGeom; struct IIconManager; class CDisplaySettings; class CCamera; +class QPoint; enum DisplayFlags { diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/ComponentPalette/ComponentPaletteWindow.h b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/ComponentPalette/ComponentPaletteWindow.h index 38211d7d03..f4b927cba9 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/ComponentPalette/ComponentPaletteWindow.h +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/ComponentPalette/ComponentPaletteWindow.h @@ -10,6 +10,7 @@ #if !defined(Q_MOC_RUN) #include #include +#include #endif namespace AzToolsFramework diff --git a/Code/Editor/Plugins/EditorAssetImporter/AssetImporterWindow.h b/Code/Editor/Plugins/EditorAssetImporter/AssetImporterWindow.h index f8f486ef52..cf7f7eed28 100644 --- a/Code/Editor/Plugins/EditorAssetImporter/AssetImporterWindow.h +++ b/Code/Editor/Plugins/EditorAssetImporter/AssetImporterWindow.h @@ -19,6 +19,7 @@ #include #include #include +#include #endif namespace AZStd diff --git a/Code/Editor/Plugins/EditorAssetImporter/Main.cpp b/Code/Editor/Plugins/EditorAssetImporter/Main.cpp index b06bcdae77..301205eb44 100644 --- a/Code/Editor/Plugins/EditorAssetImporter/Main.cpp +++ b/Code/Editor/Plugins/EditorAssetImporter/Main.cpp @@ -14,10 +14,7 @@ #include "AssetImporterPlugin.h" -#if defined(AZ_PLATFORM_WINDOWS) -#define WIN32_LEAN_AND_MEAN -#include -#endif +#include #include PLUGIN_API IPlugin* CreatePluginInstance(PLUGIN_INIT_PARAM* pInitParam) diff --git a/Code/Editor/Plugins/EditorCommon/DrawingPrimitives/Ruler.cpp b/Code/Editor/Plugins/EditorCommon/DrawingPrimitives/Ruler.cpp index 1aa2121b10..029f6142cb 100644 --- a/Code/Editor/Plugins/EditorCommon/DrawingPrimitives/Ruler.cpp +++ b/Code/Editor/Plugins/EditorCommon/DrawingPrimitives/Ruler.cpp @@ -158,7 +158,7 @@ namespace DrawingPrimitives char format[16] = ""; - sprintf_s(format, "%%.%df", rulerPrecision); + azsprintf(format, "%%.%df", rulerPrecision); const int height = options.m_rect.height(); const int top = options.m_rect.top(); diff --git a/Code/Editor/Util/EditorUtils.h b/Code/Editor/Util/EditorUtils.h index b9110be17d..1c7aad782e 100644 --- a/Code/Editor/Util/EditorUtils.h +++ b/Code/Editor/Util/EditorUtils.h @@ -13,7 +13,7 @@ #define CRYINCLUDE_EDITOR_UTIL_EDITORUTILS_H #pragma once - +#include #include #include "Util/FileUtil.h" #include diff --git a/Code/Editor/Util/RefCountBase.h b/Code/Editor/Util/RefCountBase.h index d375b45a0b..7bb075d21c 100644 --- a/Code/Editor/Util/RefCountBase.h +++ b/Code/Editor/Util/RefCountBase.h @@ -14,6 +14,7 @@ #pragma once #include +#include //! Derive from this class to get reference counting in your class. class EDITOR_CORE_API CRefCountBase diff --git a/Code/Editor/Util/StringHelpers.cpp b/Code/Editor/Util/StringHelpers.cpp index 8b8ca62609..04d13efe45 100644 --- a/Code/Editor/Util/StringHelpers.cpp +++ b/Code/Editor/Util/StringHelpers.cpp @@ -14,11 +14,7 @@ #include #include -#if defined(AZ_PLATFORM_WINDOWS) -#define WIN32_LEAN_AND_MEAN -#include // WideCharToMultibyte(), CP_UTF8, etc. -#endif - +#include // WideCharToMultibyte(), CP_UTF8, etc. #include static inline char ToLower(const char c) diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/PlatformIncl_UnixLike.h b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/PlatformIncl_UnixLike.h index 4714c433fe..e68be1334e 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/PlatformIncl_UnixLike.h +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/PlatformIncl_UnixLike.h @@ -8,3 +8,16 @@ #pragma once #include + +#define __STDC_FORMAT_MACROS +#include + +// types like AZ::u64 require an usigned long long, but inttypes.h has it as unsigned long +#undef PRIX64 +#undef PRIx64 +#undef PRId64 +#undef PRIu64 +#define PRIX64 "llX" +#define PRIx64 "llx" +#define PRId64 "lld" +#define PRIu64 "llu" diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/std/parallel/internal/semaphore_UnixLike.h b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/std/parallel/internal/semaphore_UnixLike.h index bfe0361c0f..a51d2023f7 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/std/parallel/internal/semaphore_UnixLike.h +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/std/parallel/internal/semaphore_UnixLike.h @@ -7,6 +7,7 @@ #pragma once #include "time_UnixLike.h" +#include /** * This file is to be included from the semaphore.h only. It should NOT be included by the user. diff --git a/Code/Framework/AzTest/AzTest/Platform/Windows/ScopedAutoTempDirectory_Windows.cpp b/Code/Framework/AzTest/AzTest/Platform/Windows/ScopedAutoTempDirectory_Windows.cpp index 6803bbf3dd..aa58ed295b 100644 --- a/Code/Framework/AzTest/AzTest/Platform/Windows/ScopedAutoTempDirectory_Windows.cpp +++ b/Code/Framework/AzTest/AzTest/Platform/Windows/ScopedAutoTempDirectory_Windows.cpp @@ -4,10 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#include -#include -#include -#include + +#include #include #include diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkAPI.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkAPI.h index b6804cc974..490866935c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkAPI.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkAPI.h @@ -214,9 +214,7 @@ namespace LegacyFramework /** (Windows) retrieves the main module of the executable. * This is always going to be the main executable except in the situation where the framework may be running as a DLL belonging to another process or program. */ -#ifdef AZ_PLATFORM_WINDOWS - virtual HMODULE GetMainModule() = 0; -#endif + virtual void* GetMainModule() = 0; virtual const char* GetApplicationName() = 0; virtual const char* GetApplicationModule() = 0; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp index 2f5e402791..b17f6480cc 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp @@ -57,7 +57,7 @@ AZ_POP_DISABLE_OVERRIDE_WARNING namespace LegacyFramework { ApplicationDesc::ApplicationDesc(const char* name, int argc, char** argv) - : m_applicationModule(NULL) + : m_applicationModule(nullptr) , m_enableGridmate(true) , m_enablePerforce(true) , m_enableGUI(true) @@ -70,7 +70,7 @@ namespace LegacyFramework m_applicationName[0] = 0; if (name) { - azstrcpy(m_applicationName, _MAX_PATH, name); + azstrcpy(m_applicationName, AZ_MAX_PATH_LEN, name); } } @@ -90,7 +90,7 @@ namespace LegacyFramework m_enableGUI = other.m_enableGUI; m_enableGridmate = other.m_enableGridmate; m_enablePerforce = other.m_enablePerforce; - azstrcpy(m_applicationName, _MAX_PATH, other.m_applicationName); + azstrcpy(m_applicationName, AZ_MAX_PATH_LEN, other.m_applicationName); m_enableProjectManager = other.m_enableProjectManager; m_shouldRunAssetProcessor = other.m_shouldRunAssetProcessor; m_saveUserSettings = other.m_saveUserSettings; @@ -104,12 +104,12 @@ namespace LegacyFramework m_isPrimary = true; m_desiredExitCode = 0; m_abortRequested = false; - m_applicationEntity = NULL; - m_ptrSystemEntity = NULL; + m_applicationEntity = nullptr; + m_ptrSystemEntity = nullptr; m_applicationModule[0] = 0; } - HMODULE Application::GetMainModule() + void* Application::GetMainModule() { return m_desc.m_applicationModule; } @@ -371,7 +371,7 @@ namespace LegacyFramework applicationFilePath.append("_app.xml"); - AZ_Assert(applicationFilePath.size() <= _MAX_PATH, "Application path longer than expected"); + AZ_Assert(applicationFilePath.size() <= AZ_MAX_PATH_LEN, "Application path longer than expected"); qstrcpy(m_applicationFilePath, applicationFilePath.c_str()); // load all application entities, if present: diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.h index 5cde088c2d..55b1014139 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.h @@ -24,7 +24,7 @@ namespace LegacyFramework { struct ApplicationDesc { - HMODULE m_applicationModule; // only necessary if you want to attach your application as a DLL plugin to another application, hosting it + void* m_applicationModule; // only necessary if you want to attach your application as a DLL plugin to another application, hosting it bool m_enableGUI; // false if you want none of the QT or GUI functionality to exist. You cannot use project manager if you do this. bool m_enableGridmate; // false if you want to not activate the network communications module. bool m_enablePerforce; // false if you want to not activate perforce SCM integration. note that this will eventually become a plugin anyway @@ -35,7 +35,7 @@ namespace LegacyFramework int m_argc; char** m_argv; - char m_applicationName[_MAX_PATH]; + char m_applicationName[AZ_MAX_PATH_LEN]; ApplicationDesc(const char* name = "Application", int argc = 0, char** argv = nullptr); ApplicationDesc(const ApplicationDesc& other); @@ -65,7 +65,7 @@ namespace LegacyFramework virtual bool IsRunningInGUIMode() { return m_desc.m_enableGUI; } virtual bool RequiresGameProject() { return m_desc.m_enableProjectManager; } virtual bool ShouldRunAssetProcessor() { return m_desc.m_shouldRunAssetProcessor; } - virtual HMODULE GetMainModule(); + virtual void* GetMainModule(); virtual const char* GetApplicationName(); virtual const char* GetApplicationModule(); virtual const char* GetApplicationDirectory(); @@ -131,11 +131,11 @@ namespace LegacyFramework void CreateApplicationComponent(); void SaveApplicationEntity(); - char m_applicationModule[_MAX_PATH]; + char m_applicationModule[AZ_MAX_PATH_LEN]; int m_desiredExitCode; bool m_isPrimary; volatile bool m_abortRequested; // if you CTRL+C in a console app, this becomes true. its up to you to check... - char m_applicationFilePath[_MAX_PATH]; + char m_applicationFilePath[AZ_MAX_PATH_LEN]; ApplicationDesc m_desc; AzFramework::CommandLine* m_ptrCommandLineParser; }; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/UIFrameworkAPI.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/UIFrameworkAPI.cpp index 2869dc2c78..4029bc07fe 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/UIFrameworkAPI.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/UIFrameworkAPI.cpp @@ -48,32 +48,6 @@ namespace AzToolsFramework }; } - static QWindow* windowForWidget(const QWidget* widget) - { - QWindow* window = widget->windowHandle(); - if (window) - { - return window; - } - const QWidget* nativeParent = widget->nativeParentWidget(); - if (nativeParent) - { - return nativeParent->windowHandle(); - } - return 0; - } - - HWND getHWNDForWidget(const QWidget* widget) - { - QWindow* window = windowForWidget(widget); - if (window && window->handle()) - { - QPlatformNativeInterface* itf = QGuiApplication::platformNativeInterface(); - return static_cast(itf->nativeResourceForWindow(QByteArrayLiteral("handle"), window)); - } - return 0; - } - bool GetOverwritePromptResult(QWidget* pParentWidget, const char* assetNameToOvewrite) { OverwritePromptDialog dlg(pParentWidget); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/UIFrameworkAPI.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/UIFrameworkAPI.h index a73b1ee0ff..2225f0b241 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/UIFrameworkAPI.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/UIFrameworkAPI.h @@ -51,9 +51,6 @@ namespace AzToolsFramework // ------------------------------------------------ DESCRIPTOR STRUCTS ---------------------------------------------------- // ------------------------------------------------------------------------------------------------------------------------ - // helper function: - HWND getHWNDForWidget(const QWidget* widget); - struct HotkeyDescription { enum Scope diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiWidgetCallbacks.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiWidgetCallbacks.h index 4b422f0b80..ed50bd8510 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiWidgetCallbacks.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiWidgetCallbacks.h @@ -7,6 +7,7 @@ #pragma once +#include #include #include #include diff --git a/Code/Legacy/CryCommon/CryAssert_impl.h b/Code/Legacy/CryCommon/CryAssert_impl.h index 9aa2f25e46..cc3a4db0cd 100644 --- a/Code/Legacy/CryCommon/CryAssert_impl.h +++ b/Code/Legacy/CryCommon/CryAssert_impl.h @@ -47,8 +47,7 @@ #include -#define WIN32_LEAN_AND_MEAN -#include +#include //----------------------------------------------------------------------------------------------------- diff --git a/Code/Legacy/CryCommon/CryThreadImpl_windows.h b/Code/Legacy/CryCommon/CryThreadImpl_windows.h index bede6be9bd..fae13c410b 100644 --- a/Code/Legacy/CryCommon/CryThreadImpl_windows.h +++ b/Code/Legacy/CryCommon/CryThreadImpl_windows.h @@ -8,13 +8,9 @@ #pragma once -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif - -#include -#include +#include #include // for CreateSemaphore + struct SThreadNameDesc { DWORD dwType; diff --git a/Code/Legacy/CryCommon/CryWindows.h b/Code/Legacy/CryCommon/CryWindows.h index 52810c01ec..c3b3f0b821 100644 --- a/Code/Legacy/CryCommon/CryWindows.h +++ b/Code/Legacy/CryCommon/CryWindows.h @@ -13,32 +13,6 @@ #define CRYINCLUDE_CRYCOMMON_CRYWINDOWS_H #pragma once - -#if defined(WIN32) || defined(WIN64) - -#ifndef FULL_WINDOWS_HEADER - #define WIN32_LEAN_AND_MEAN -#endif - -#include - -#undef GetCommandLine -#undef GetObject -#undef PlaySound -#undef GetClassName -#undef DrawText -#undef GetCharWidth -#undef GetUserName -#undef LoadLibrary -#undef RegisterClass - -#undef min -#undef max - -#undef NOMINMAX -#undef WIN32_LEAN_AND_MEAN -#undef FULL_WINDOWS_HEADER - -#endif +#include #endif // CRYINCLUDE_CRYCOMMON_CRYWINDOWS_H diff --git a/Code/Legacy/CryCommon/IWindowMessageHandler.h b/Code/Legacy/CryCommon/IWindowMessageHandler.h index afbc064db4..fe56efd29f 100644 --- a/Code/Legacy/CryCommon/IWindowMessageHandler.h +++ b/Code/Legacy/CryCommon/IWindowMessageHandler.h @@ -8,12 +8,10 @@ #ifndef _CRY_WINDOW_MESSAGE_HANDLER_H_ #define _CRY_WINDOW_MESSAGE_HANDLER_H_ -#include "platform.h" + #if defined(WIN32) -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif -#include +#include "platform.h" +#include // Summary: // Window message handler for Windows OS diff --git a/Code/Legacy/CrySystem/System.cpp b/Code/Legacy/CrySystem/System.cpp index f28a540209..fe5662d794 100644 --- a/Code/Legacy/CrySystem/System.cpp +++ b/Code/Legacy/CrySystem/System.cpp @@ -48,9 +48,7 @@ #endif #ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -// If app hasn't chosen, set to work with Windows 98, Windows Me, Windows 2000, Windows XP and beyond -#include +#include LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { diff --git a/Code/Legacy/CrySystem/WindowsErrorReporting.cpp b/Code/Legacy/CrySystem/WindowsErrorReporting.cpp index b0fdeebfa4..3c7a8e55ab 100644 --- a/Code/Legacy/CrySystem/WindowsErrorReporting.cpp +++ b/Code/Legacy/CrySystem/WindowsErrorReporting.cpp @@ -14,7 +14,7 @@ #ifdef WIN32 #include "System.h" -#include +#include #include #include "errorrep.h" #include "ISystem.h" diff --git a/Code/Tools/AssetProcessor/native/AssetManager/SourceFileRelocator.cpp b/Code/Tools/AssetProcessor/native/AssetManager/SourceFileRelocator.cpp index 1d411026b9..ce0f8ff612 100644 --- a/Code/Tools/AssetProcessor/native/AssetManager/SourceFileRelocator.cpp +++ b/Code/Tools/AssetProcessor/native/AssetManager/SourceFileRelocator.cpp @@ -699,7 +699,7 @@ Please note that only those seed files will get updated that are active for your { report.append(AZStd::string::format( "SOURCEID: %" PRId64 ", CURRENT PATH: %s, NEW PATH: %s, CURRENT GUID: %s, NEW GUID: %s\n", - static_cast(relocationInfo.m_sourceEntry.m_sourceID), + relocationInfo.m_sourceEntry.m_sourceID, relocationInfo.m_oldRelativePath.c_str(), relocationInfo.m_newRelativePath.c_str(), relocationInfo.m_sourceEntry.m_sourceGuid.ToString().c_str(), @@ -709,7 +709,7 @@ Please note that only those seed files will get updated that are active for your { report.append(AZStd::string::format( "SOURCEID: %" PRId64 ", CURRENT PATH: %s, CURRENT GUID: %s\n", - static_cast(relocationInfo.m_sourceEntry.m_sourceID), + relocationInfo.m_sourceEntry.m_sourceID, relocationInfo.m_oldRelativePath.c_str(), relocationInfo.m_sourceEntry.m_sourceGuid.ToString().c_str())); } diff --git a/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp b/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp index c241b52084..56b9dc1476 100644 --- a/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp @@ -1025,7 +1025,7 @@ namespace AssetUtilities AZStd::string ComputeJobLogFileName(const AzToolsFramework::AssetSystem::JobInfo& jobInfo) { - return AZStd::string::format("%s-%u-%" PRIu64 ".log", jobInfo.m_sourceFile.c_str(), jobInfo.GetHash(), static_cast(jobInfo.m_jobRunKey)); + return AZStd::string::format("%s-%u-%" PRIu64 ".log", jobInfo.m_sourceFile.c_str(), jobInfo.GetHash(), jobInfo.m_jobRunKey); } AZStd::string ComputeJobLogFileName(const AssetBuilderSDK::CreateJobsRequest& createJobsRequest) @@ -1245,7 +1245,7 @@ namespace AssetUtilities return 0; } - std::uint64_t AdjustTimestamp(QDateTime timestamp) + AZ::u64 AdjustTimestamp(QDateTime timestamp) { timestamp = timestamp.toUTC(); @@ -1280,7 +1280,7 @@ namespace AssetUtilities else { bool useHash = ShouldUseFileHashing(); - std::uint64_t fileIdentifier; + AZ::u64 fileIdentifier; if(useHash) { fileIdentifier = GetFileHash(absolutePath.c_str()); @@ -1294,13 +1294,13 @@ namespace AssetUtilities // so we add the size of it too. // its also possible that it moved to a different file with the same modtime/hash AND size, // but with a different name. So we add that too. - return AZStd::string::format("%" PRIX64 ":%" PRIu64 ":%s", fileIdentifier, aznumeric_cast(fileStateInfo.m_fileSize), nameToUse.c_str()); + return AZStd::string::format("%" PRIX64 ":%" PRIu64 ":%s", fileIdentifier, fileStateInfo.m_fileSize, nameToUse.c_str()); } } AZStd::string ComputeJobLogFileName(const AssetProcessor::JobEntry& jobEntry) { - return AZStd::string::format("%s-%u-%" PRIu64 ".log", jobEntry.m_databaseSourceName.toUtf8().constData(), jobEntry.GetHash(), static_cast(jobEntry.m_jobRunKey)); + return AZStd::string::format("%s-%u-%" PRIu64 ".log", jobEntry.m_databaseSourceName.toUtf8().constData(), jobEntry.GetHash(), jobEntry.m_jobRunKey); } bool CreateTempRootFolder(QString startFolder, QDir& tempRoot) diff --git a/Code/Tools/AssetProcessor/native/utilities/assetUtils.h b/Code/Tools/AssetProcessor/native/utilities/assetUtils.h index d6739fc544..2eb89f4deb 100644 --- a/Code/Tools/AssetProcessor/native/utilities/assetUtils.h +++ b/Code/Tools/AssetProcessor/native/utilities/assetUtils.h @@ -240,7 +240,7 @@ namespace AssetUtilities inline constexpr AZ::u64 FileHashBufferSize = 1024 * 64; //! Adjusts a timestamp to fix timezone settings and account for any precision adjustment needed - std::uint64_t AdjustTimestamp(QDateTime timestamp); + AZ::u64 AdjustTimestamp(QDateTime timestamp); // Generates a fingerprint string based on details of the file, will return the string "0" if the file does not exist. // note that the 'name to use' can be blank, but it used to disambiguate between files that have the same diff --git a/Code/Tools/CrashHandler/Tools/Uploader/platforms/win/main.cpp b/Code/Tools/CrashHandler/Tools/Uploader/platforms/win/main.cpp index 02ceb9afcf..2f6f116283 100644 --- a/Code/Tools/CrashHandler/Tools/Uploader/platforms/win/main.cpp +++ b/Code/Tools/CrashHandler/Tools/Uploader/platforms/win/main.cpp @@ -7,12 +7,11 @@ // LY Editor Crashpad Upload Handler Extension +#include #include #include #include -#include - namespace { int HandlerMain(int argc, char* argv[]) diff --git a/Code/Tools/CrashHandler/Uploader/include/Uploader/CrashUploader.h b/Code/Tools/CrashHandler/Uploader/include/Uploader/CrashUploader.h index ecf11b3d38..cfd82f455e 100644 --- a/Code/Tools/CrashHandler/Uploader/include/Uploader/CrashUploader.h +++ b/Code/Tools/CrashHandler/Uploader/include/Uploader/CrashUploader.h @@ -8,6 +8,7 @@ #pragma once +#include #include #include #include diff --git a/Code/Tools/GridHub/GridHub/gridhub.cpp b/Code/Tools/GridHub/GridHub/gridhub.cpp index 9c494e41fa..f2957f341a 100644 --- a/Code/Tools/GridHub/GridHub/gridhub.cpp +++ b/Code/Tools/GridHub/GridHub/gridhub.cpp @@ -5,7 +5,7 @@ * */ -#include +#include AZ_PUSH_DISABLE_WARNING(4244 4251, "-Wunknown-warning-option") #include #include @@ -13,8 +13,7 @@ AZ_PUSH_DISABLE_WARNING(4244 4251, "-Wunknown-warning-option") AZ_POP_DISABLE_WARNING #ifdef AZ_PLATFORM_WINDOWS -// windows include must be first so we get the full version (AZCore bring the trimmed one) -#include +#include #else #include #endif diff --git a/Code/Tools/GridHub/GridHub/gridhub.hxx b/Code/Tools/GridHub/GridHub/gridhub.hxx index c8a9c336d4..23266449b4 100644 --- a/Code/Tools/GridHub/GridHub/gridhub.hxx +++ b/Code/Tools/GridHub/GridHub/gridhub.hxx @@ -23,10 +23,7 @@ AZ_POP_DISABLE_WARNING #include #include #include - -#if defined(AZ_PLATFORM_WINDOWS) -#include -#endif +#include #endif namespace AZ diff --git a/Code/Tools/GridHub/GridHub/main.cpp b/Code/Tools/GridHub/GridHub/main.cpp index 5b35abff6c..d24d00375e 100644 --- a/Code/Tools/GridHub/GridHub/main.cpp +++ b/Code/Tools/GridHub/GridHub/main.cpp @@ -7,7 +7,7 @@ // windows include must be first so we get the full version (AZCore bring the trimmed one) #ifdef _WIN32 -#include +#include #include #include #include diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorContextInterface.h b/Code/Tools/Standalone/Source/LUA/LUAEditorContextInterface.h index 7b6fb5ddbe..3b6d0f5e48 100644 --- a/Code/Tools/Standalone/Source/LUA/LUAEditorContextInterface.h +++ b/Code/Tools/Standalone/Source/LUA/LUAEditorContextInterface.h @@ -13,10 +13,8 @@ #include #include #include - -#if defined(AZ_PLATFORM_WINDOWS) -#include -#endif +#include +#include namespace LUAEditor { diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/FormatUtils.h b/Gems/AssetMemoryAnalyzer/Code/Source/FormatUtils.h index c9fbe1434e..c9b15c2809 100644 --- a/Gems/AssetMemoryAnalyzer/Code/Source/FormatUtils.h +++ b/Gems/AssetMemoryAnalyzer/Code/Source/FormatUtils.h @@ -6,6 +6,8 @@ */ #pragma once +#include + namespace AssetMemoryAnalyzer { namespace Data diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/FIR-Windows.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/FIR-Windows.h index 5057008e1a..136b4df01e 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/FIR-Windows.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/FIR-Windows.h @@ -13,6 +13,7 @@ #pragma once #include #include +#include /* #################################################################################################################### */ diff --git a/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/LaunchLuxCoreUI_Windows.cpp b/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/LaunchLuxCoreUI_Windows.cpp index 9b0808445a..8e970e3f80 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/LaunchLuxCoreUI_Windows.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/LaunchLuxCoreUI_Windows.cpp @@ -6,7 +6,7 @@ */ #include -#include +#include namespace LuxCoreUI { diff --git a/Gems/Atom/RHI/Vulkan/Code/Include/Platform/Linux/Atom_RHI_Vulkan_Platform.h b/Gems/Atom/RHI/Vulkan/Code/Include/Platform/Linux/Atom_RHI_Vulkan_Platform.h index b9baa421ba..db6994ba15 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Include/Platform/Linux/Atom_RHI_Vulkan_Platform.h +++ b/Gems/Atom/RHI/Vulkan/Code/Include/Platform/Linux/Atom_RHI_Vulkan_Platform.h @@ -6,5 +6,4 @@ */ #pragma once -#include - +#include diff --git a/Gems/Atom/RHI/Vulkan/Code/Include/Platform/Windows/Atom/RHI.Loader/Glad/Vulkan_Windows.h b/Gems/Atom/RHI/Vulkan/Code/Include/Platform/Windows/Atom/RHI.Loader/Glad/Vulkan_Windows.h index 2d0cac9cbf..bd142402ab 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Include/Platform/Windows/Atom/RHI.Loader/Glad/Vulkan_Windows.h +++ b/Gems/Atom/RHI/Vulkan/Code/Include/Platform/Windows/Atom/RHI.Loader/Glad/Vulkan_Windows.h @@ -6,13 +6,4 @@ */ #pragma once -#ifndef WIN32_LEAN_AND_MEAN - #define WIN32_LEAN_AND_MEAN 1 - #define LEAN_AND_MEAN_DEFINED 1 -#endif - -#include - -#if defined(LEAN_AND_MEAN_DEFINED) - #undef WIN32_LEAN_AND_MEAN -#endif +#include diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Windows/MaterialEditor_Traits_Platform.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Windows/MaterialEditor_Traits_Platform.h index de2c3a2a1b..da4bbc902b 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Windows/MaterialEditor_Traits_Platform.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Windows/MaterialEditor_Traits_Platform.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include #include diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportWidget.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportWidget.cpp index e2bda2c755..cf7348f39e 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportWidget.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportWidget.cpp @@ -63,5 +63,3 @@ namespace MaterialEditor return false; } } // namespace MaterialEditor - -#include diff --git a/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Platform/Windows/ShaderManagementConsole_Traits_Platform.h b/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Platform/Windows/ShaderManagementConsole_Traits_Platform.h index f7a884a79b..6951dbdcf3 100644 --- a/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Platform/Windows/ShaderManagementConsole_Traits_Platform.h +++ b/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Platform/Windows/ShaderManagementConsole_Traits_Platform.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include #include diff --git a/Gems/LmbrCentral/Code/Source/Builders/SliceBuilder/SliceBuilderWorker.cpp b/Gems/LmbrCentral/Code/Source/Builders/SliceBuilder/SliceBuilderWorker.cpp index 1ef2eccc1d..efb1ae5d36 100644 --- a/Gems/LmbrCentral/Code/Source/Builders/SliceBuilder/SliceBuilderWorker.cpp +++ b/Gems/LmbrCentral/Code/Source/Builders/SliceBuilder/SliceBuilderWorker.cpp @@ -36,6 +36,7 @@ #include #include #include "AzFramework/Asset/SimpleAsset.h" +#include namespace SliceBuilder { diff --git a/Gems/LyShine/Code/Editor/Animation/UiAVSequenceProps.cpp b/Gems/LyShine/Code/Editor/Animation/UiAVSequenceProps.cpp index cf80fe7b4d..65d015105f 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAVSequenceProps.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAVSequenceProps.cpp @@ -42,7 +42,7 @@ CUiAVSequenceProps::~CUiAVSequenceProps() } // CUiAVSequenceProps message handlers -BOOL CUiAVSequenceProps::OnInitDialog() +bool CUiAVSequenceProps::OnInitDialog() { QString name = m_pSequence->GetName(); ui->NAME->setText(name); @@ -74,7 +74,7 @@ BOOL CUiAVSequenceProps::OnInitDialog() ui->ORT_ONCE->setChecked(true); } - return TRUE; // return TRUE unless you set the focus to a control + return true; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } diff --git a/Gems/LyShine/Code/Editor/Animation/UiAVSequenceProps.h b/Gems/LyShine/Code/Editor/Animation/UiAVSequenceProps.h index 7f02103e8e..274ca1366f 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAVSequenceProps.h +++ b/Gems/LyShine/Code/Editor/Animation/UiAVSequenceProps.h @@ -32,7 +32,7 @@ public: private: CUiAnimViewSequence* m_pSequence; - virtual BOOL OnInitDialog(); + virtual bool OnInitDialog(); virtual void OnOK(); void MoveScaleKeys(); diff --git a/Gems/SaveData/Code/Source/Platform/Windows/SaveData_SystemComponent_Windows.cpp b/Gems/SaveData/Code/Source/Platform/Windows/SaveData_SystemComponent_Windows.cpp index e2d0d82f7d..d9cc5548ea 100644 --- a/Gems/SaveData/Code/Source/Platform/Windows/SaveData_SystemComponent_Windows.cpp +++ b/Gems/SaveData/Code/Source/Platform/Windows/SaveData_SystemComponent_Windows.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include ////////////////////////////////////////////////////////////////////////////////////////////////////