From 3dc3e25649241d9fb2e6c7ea38d878c48d5ce7f5 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Sat, 7 Mar 2026 23:17:42 +0100 Subject: [PATCH] Fix deprecation warnings --- Source/Engine/Graphics/PostProcessSettings.h | 14 +++++++++++++- Source/Engine/Platform/CreateWindowSettings.h | 14 +++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/Source/Engine/Graphics/PostProcessSettings.h b/Source/Engine/Graphics/PostProcessSettings.h index 5ba390716..faebcb6f6 100644 --- a/Source/Engine/Graphics/PostProcessSettings.h +++ b/Source/Engine/Graphics/PostProcessSettings.h @@ -1844,7 +1844,7 @@ API_STRUCT() struct FLAXENGINE_API ScreenSpaceReflectionsSettings : ISerializabl /// The intensity of the temporal effect. Lower values produce reflections faster, but more noise. /// API_FIELD(Attributes="Limit(0, 20.0f, 0.5f), EditorOrder(55), PostProcessSetting((int)ScreenSpaceReflectionsSettingsOverride.TemporalScale)") - DEPRECATED("TemporalScale of SSR is unsued now.") float TemporalScale = 8.0f; + DEPRECATED("TemporalScale of SSR is unsued now.") float TemporalScale; /// /// Defines how quickly reflections blend between the reflection in the current frame and the history buffer. Lower values produce reflections faster, but with more jittering. If the camera in your game doesn't move much, we recommend values closer to 1. @@ -1852,6 +1852,18 @@ API_STRUCT() struct FLAXENGINE_API ScreenSpaceReflectionsSettings : ISerializabl API_FIELD(Attributes="Limit(0.05f, 1.0f, 0.01f), EditorOrder(60), PostProcessSetting((int)ScreenSpaceReflectionsSettingsOverride.TemporalResponse)") float TemporalResponse = 0.8f; +public: + // Ignore deprecation warnings in defaults + PRAGMA_DISABLE_DEPRECATION_WARNINGS + ScreenSpaceReflectionsSettings() + { + TemporalScale = 8.0f; + } + ScreenSpaceReflectionsSettings(const ScreenSpaceReflectionsSettings& other) = default; + ScreenSpaceReflectionsSettings(ScreenSpaceReflectionsSettings&& other) = default; + ScreenSpaceReflectionsSettings& operator=(const ScreenSpaceReflectionsSettings& other) = default; + PRAGMA_ENABLE_DEPRECATION_WARNINGS + public: /// /// Blends the settings using given weight. diff --git a/Source/Engine/Platform/CreateWindowSettings.h b/Source/Engine/Platform/CreateWindowSettings.h index 4285bee1c..639a7b647 100644 --- a/Source/Engine/Platform/CreateWindowSettings.h +++ b/Source/Engine/Platform/CreateWindowSettings.h @@ -148,7 +148,7 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(CreateWindowSettings); /// True if it's a regular window, false for tooltips, context menu and other utility windows. /// [Deprecated in v1.12] /// - API_FIELD() DEPRECATED("Use Type instead") bool IsRegularWindow = true; + API_FIELD() DEPRECATED("Use Type instead") bool IsRegularWindow; /// /// The type of window. The type affects the behaviour of the window in system level. @@ -170,4 +170,16 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(CreateWindowSettings); /// The custom data (platform dependant). /// API_FIELD() void* Data = nullptr; + +public: + // Ignore deprecation warnings in defaults + PRAGMA_DISABLE_DEPRECATION_WARNINGS + CreateWindowSettings() + { + IsRegularWindow = true; + } + CreateWindowSettings(const CreateWindowSettings& other) = default; + CreateWindowSettings(CreateWindowSettings&& other) = default; + CreateWindowSettings& operator=(const CreateWindowSettings& other) = default; + PRAGMA_ENABLE_DEPRECATION_WARNINGS };