From 273f3e5bfa72dd3cf2143c9e9cb025d7d4b4643b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Thu, 1 Aug 2024 22:38:48 +0200 Subject: [PATCH] Remove unused return value of `IGraphics::UnloadTexture` function --- src/engine/client/graphics_threaded.cpp | 5 ++--- src/engine/client/graphics_threaded.h | 2 +- src/engine/graphics.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/engine/client/graphics_threaded.cpp b/src/engine/client/graphics_threaded.cpp index b3d4a6f28..282dda34a 100644 --- a/src/engine/client/graphics_threaded.cpp +++ b/src/engine/client/graphics_threaded.cpp @@ -288,17 +288,16 @@ void CGraphics_Threaded::FreeTextureIndex(CTextureHandle *pIndex) pIndex->Invalidate(); } -int CGraphics_Threaded::UnloadTexture(CTextureHandle *pIndex) +void CGraphics_Threaded::UnloadTexture(CTextureHandle *pIndex) { if(pIndex->IsNullTexture() || !pIndex->IsValid()) - return 0; + return; CCommandBuffer::SCommand_Texture_Destroy Cmd; Cmd.m_Slot = pIndex->Id(); AddCmd(Cmd); FreeTextureIndex(pIndex); - return 0; } static bool ConvertToRGBA(uint8_t *pDest, const CImageInfo &SrcImage) diff --git a/src/engine/client/graphics_threaded.h b/src/engine/client/graphics_threaded.h index 3b852b50f..dd1d4ce65 100644 --- a/src/engine/client/graphics_threaded.h +++ b/src/engine/client/graphics_threaded.h @@ -946,7 +946,7 @@ public: IGraphics::CTextureHandle FindFreeTextureIndex(); void FreeTextureIndex(CTextureHandle *pIndex); - int UnloadTexture(IGraphics::CTextureHandle *pIndex) override; + void UnloadTexture(IGraphics::CTextureHandle *pIndex) override; IGraphics::CTextureHandle LoadTextureRaw(const CImageInfo &Image, int Flags, const char *pTexName = nullptr) override; IGraphics::CTextureHandle LoadTextureRawMove(CImageInfo &Image, int Flags, const char *pTexName = nullptr) override; diff --git a/src/engine/graphics.h b/src/engine/graphics.h index 2c7c4dbfc..418bf7b58 100644 --- a/src/engine/graphics.h +++ b/src/engine/graphics.h @@ -340,7 +340,7 @@ public: // destination width must be equal to the subwidth of the source virtual void CopyTextureFromTextureBufferSub(uint8_t *pDestBuffer, size_t DestWidth, size_t DestHeight, const CImageInfo &SourceImage, size_t SrcSubOffsetX, size_t SrcSubOffsetY, size_t SrcSubCopyWidth, size_t SrcSubCopyHeight) = 0; - virtual int UnloadTexture(CTextureHandle *pIndex) = 0; + virtual void UnloadTexture(CTextureHandle *pIndex) = 0; virtual CTextureHandle LoadTextureRaw(const CImageInfo &Image, int Flags, const char *pTexName = nullptr) = 0; virtual CTextureHandle LoadTextureRawMove(CImageInfo &Image, int Flags, const char *pTexName = nullptr) = 0; virtual CTextureHandle LoadTexture(const char *pFilename, int StorageType, int Flags = 0) = 0;