diff --git a/src/common/engine/serializer.cpp b/src/common/engine/serializer.cpp index d500826ed6..f0d31a13dc 100644 --- a/src/common/engine/serializer.cpp +++ b/src/common/engine/serializer.cpp @@ -1504,7 +1504,7 @@ template<> FSerializer &Serialize(FSerializer &arc, const char *key, Dictionary { if (arc.isWriting()) { - FString contents { dict ? DictionaryToString(*dict) : "null" }; + FString contents { dict ? DictionaryToString(*dict) : FString("null") }; return arc(key, contents); } else diff --git a/src/common/objects/dobject.h b/src/common/objects/dobject.h index 3c98d144bb..98d9106a24 100644 --- a/src/common/objects/dobject.h +++ b/src/common/objects/dobject.h @@ -110,7 +110,7 @@ enum EInPlace { EC_InPlace }; #define DECLARE_ABSTRACT_CLASS(cls,parent) \ public: \ - virtual PClass *StaticType() const; \ + PClass *StaticType() const override; \ static ClassReg RegistrationInfo, * const RegistrationInfoPtr; \ typedef parent Super; \ private: \ diff --git a/src/common/platform/posix/i_system_posix.cpp b/src/common/platform/posix/i_system_posix.cpp index 46be3f0526..aa8bea6d29 100644 --- a/src/common/platform/posix/i_system_posix.cpp +++ b/src/common/platform/posix/i_system_posix.cpp @@ -35,7 +35,6 @@ #endif // __APPLE__ #include "cmdlib.h" -#include "d_protocol.h" #include "i_system.h" #include "gameconfigfile.h" #include "x86.h" diff --git a/src/common/platform/posix/sdl/sdlglvideo.cpp b/src/common/platform/posix/sdl/sdlglvideo.cpp index ead04b73c4..da64bb9d47 100644 --- a/src/common/platform/posix/sdl/sdlglvideo.cpp +++ b/src/common/platform/posix/sdl/sdlglvideo.cpp @@ -51,7 +51,7 @@ #include "gl_framebuffer.h" #ifdef HAVE_VULKAN -#include "rendering/vulkan/system/vk_framebuffer.h" +#include "vk_framebuffer.h" #endif #ifdef HAVE_SOFTPOLY diff --git a/src/common/rendering/gl/gl_renderer.h b/src/common/rendering/gl/gl_renderer.h index 5613fd5fd2..8b5fe7e038 100644 --- a/src/common/rendering/gl/gl_renderer.h +++ b/src/common/rendering/gl/gl_renderer.h @@ -20,13 +20,13 @@ class FLightBuffer; class DPSprite; class FGLRenderBuffers; class FGL2DDrawer; -class FHardwareTexture; class SWSceneDrawer; class HWViewpointBuffer; struct FRenderViewpoint; namespace OpenGLRenderer { + class FHardwareTexture; class FShaderManager; class FSamplerManager; class OpenGLFrameBuffer; diff --git a/src/common/rendering/polyrenderer/backend/poly_framebuffer.h b/src/common/rendering/polyrenderer/backend/poly_framebuffer.h index 38b8974f81..c96dfa321e 100644 --- a/src/common/rendering/polyrenderer/backend/poly_framebuffer.h +++ b/src/common/rendering/polyrenderer/backend/poly_framebuffer.h @@ -27,7 +27,7 @@ public: PolyFrameBuffer(void *hMonitor, bool fullscreen); ~PolyFrameBuffer(); - void Update(); + void Update() override; bool IsPoly() override { return true; } @@ -65,7 +65,7 @@ public: private: void RenderTextureView(FCanvasTexture* tex, std::function renderFunc) override; - void UpdateShadowMap(); + void UpdateShadowMap() override; void CheckCanvas(); diff --git a/src/common/rendering/polyrenderer/drawers/screen_triangle.h b/src/common/rendering/polyrenderer/drawers/screen_triangle.h index 520ab4d000..24af616999 100644 --- a/src/common/rendering/polyrenderer/drawers/screen_triangle.h +++ b/src/common/rendering/polyrenderer/drawers/screen_triangle.h @@ -24,6 +24,7 @@ #include #include +#include #include "renderstyle.h" //#include "rendering/swrenderer/drawers/r_draw.h" diff --git a/src/common/rendering/vulkan/renderer/vk_postprocess.cpp b/src/common/rendering/vulkan/renderer/vk_postprocess.cpp index c1c4148cae..6d3656fd92 100644 --- a/src/common/rendering/vulkan/renderer/vk_postprocess.cpp +++ b/src/common/rendering/vulkan/renderer/vk_postprocess.cpp @@ -533,10 +533,10 @@ void VkPPRenderState::RenderScreenQuad(VkPPRenderPassSetup *passSetup, VulkanDes auto cmdbuffer = fb->GetDrawCommands(); VkViewport viewport = { }; - viewport.x = x; - viewport.y = y; - viewport.width = width; - viewport.height = height; + viewport.x = (float)x; + viewport.y = (float)y; + viewport.width = (float)width; + viewport.height = (float)height; viewport.minDepth = 0.0f; viewport.maxDepth = 1.0f; @@ -761,7 +761,7 @@ void VkPPRenderPassSetup::CreatePipeline(const VkPPRenderPassKey &key) builder.addDynamicState(VK_DYNAMIC_STATE_SCISSOR); // Note: the actual values are ignored since we use dynamic viewport+scissor states builder.setViewport(0.0f, 0.0f, 320.0f, 200.0f); - builder.setScissor(0.0f, 0.0f, 320.0f, 200.0f); + builder.setScissor(0, 0, 320, 200); if (key.StencilTest) { builder.addDynamicState(VK_DYNAMIC_STATE_STENCIL_REFERENCE); diff --git a/src/common/rendering/vulkan/renderer/vk_renderpass.cpp b/src/common/rendering/vulkan/renderer/vk_renderpass.cpp index 53b1cd732b..2e0973c087 100644 --- a/src/common/rendering/vulkan/renderer/vk_renderpass.cpp +++ b/src/common/rendering/vulkan/renderer/vk_renderpass.cpp @@ -404,7 +404,7 @@ std::unique_ptr VkRenderPassSetup::CreatePipeline(const VkPipeli // Note: the actual values are ignored since we use dynamic viewport+scissor states builder.setViewport(0.0f, 0.0f, 320.0f, 200.0f); - builder.setScissor(0, 0, 320.0f, 200.0f); + builder.setScissor(0, 0, 320, 200); static const VkPrimitiveTopology vktopology[] = { VK_PRIMITIVE_TOPOLOGY_POINT_LIST, diff --git a/src/common/rendering/vulkan/system/vk_framebuffer.h b/src/common/rendering/vulkan/system/vk_framebuffer.h index bf062afe2c..537879e6a6 100644 --- a/src/common/rendering/vulkan/system/vk_framebuffer.h +++ b/src/common/rendering/vulkan/system/vk_framebuffer.h @@ -68,7 +68,7 @@ public: ~VulkanFrameBuffer(); bool IsVulkan() override { return true; } - void Update(); + void Update() override; void InitializeState() override; diff --git a/src/common/scripting/backend/codegen.h b/src/common/scripting/backend/codegen.h index 5a0fc06644..bcadae39db 100644 --- a/src/common/scripting/backend/codegen.h +++ b/src/common/scripting/backend/codegen.h @@ -198,7 +198,7 @@ struct ExpVal const FString GetString() const { - return Type == TypeString ? *(FString *)&pointer : Type == TypeName ? FString(FName(ENamedName(Int)).GetChars()) : ""; + return Type == TypeString ? *(FString *)&pointer : Type == TypeName ? FString(FName(ENamedName(Int)).GetChars()) : FString(); } bool GetBool() const diff --git a/src/common/scripting/core/dictionary.cpp b/src/common/scripting/core/dictionary.cpp index b8dacd2bcd..5d4b05a3da 100644 --- a/src/common/scripting/core/dictionary.cpp +++ b/src/common/scripting/core/dictionary.cpp @@ -62,7 +62,7 @@ static void DictInsert(Dictionary *dict, const FString &key, const FString &valu static void DictAt(const Dictionary *dict, const FString &key, FString *result) { const FString *value = dict->Map.CheckKey(key); - *result = value ? *value : ""; + *result = value ? *value : FString(); } static void DictToString(const Dictionary *dict, FString *result) diff --git a/src/common/textures/textures.h b/src/common/textures/textures.h index f0b5b4dfce..9ca6be736b 100644 --- a/src/common/textures/textures.h +++ b/src/common/textures/textures.h @@ -352,7 +352,7 @@ protected: void SetFromImage(); public: FImageTexture(FImageSource* image) noexcept; - virtual TArray Get8BitPixels(bool alphatex); + TArray Get8BitPixels(bool alphatex) override; void SetImage(FImageSource* img) {