From 9f9e59e3ba0a4b66b79e830e6394593dca04c557 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 12 Feb 2020 00:43:21 +0100 Subject: [PATCH] - fixed some warnings --- source/CMakeLists.txt | 2 +- source/common/music/music.cpp | 3 ++- source/common/rendering/gl/system/gl_framebuffer.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index ce3d85821..dbe729b0d 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -410,7 +410,7 @@ endif() if( MSVC ) find_package( ZMusic ) else() - find_package( ZMusic REQUIRED ) + find_package( ZMusic ) endif() if( MSVC AND NOT ZMUSIC_FOUND ) diff --git a/source/common/music/music.cpp b/source/common/music/music.cpp index 9f54fbb5f..b4765f420 100644 --- a/source/common/music/music.cpp +++ b/source/common/music/music.cpp @@ -108,11 +108,12 @@ static FName knownMusicExts[] = { FString G_SetupFilenameBasedMusic(const char* fn, const char* defmusic) { FString name = StripExtension(fn); + FString test; // Test if a real file with this name exists with all known extensions for music. for (auto& ext : knownMusicExts) { - FStringf test("%s.%s", name.GetChars(), ext.GetChars()); + test.Format("%s.%s", name.GetChars(), ext.GetChars()); if (FileExists(test)) return test; #ifdef __unix__ test.Format("%s.%s", name.GetChars(), FString(ext.GetChars()).MakeLower().GetChars()); diff --git a/source/common/rendering/gl/system/gl_framebuffer.h b/source/common/rendering/gl/system/gl_framebuffer.h index aeda7cada..d4bf644d1 100644 --- a/source/common/rendering/gl/system/gl_framebuffer.h +++ b/source/common/rendering/gl/system/gl_framebuffer.h @@ -26,7 +26,7 @@ public: void CleanForRestart() override; const char* DeviceName() const override; - void WriteSavePic(FileWriter* file, int width, int height); + void WriteSavePic(FileWriter* file, int width, int height) override; #ifdef IMPLEMENT_IT void SetTextureFilterMode() override; IHardwareTexture *CreateHardwareTexture() override;