From b19f128903e8f5e17de1d5464fb0d73f57e55ef2 Mon Sep 17 00:00:00 2001 From: David Korth Date: Fri, 13 Jun 2025 18:35:18 -0400 Subject: [PATCH] [librptexture] ICOPrivate::~ICOPrivate(): Use dir.is_res instead of isResource(). Removed isResource(). --- src/librptexture/fileformat/ICO.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/librptexture/fileformat/ICO.cpp b/src/librptexture/fileformat/ICO.cpp index 6015c88d7..7fb2a0283 100644 --- a/src/librptexture/fileformat/ICO.cpp +++ b/src/librptexture/fileformat/ICO.cpp @@ -85,15 +85,6 @@ public: /** Win3.x icon stuff **/ - /** - * Is this an icon resource from a .exe/.dll? - * @return True if it's a resource; false if it's a .ico file. - */ - inline bool isResource(void) const - { - return (iconType >= IconType::IconRes_Win1) && (iconType <= IconType::CursorRes_Win3); - } - // NOTE: ICONDIRENTRY (for .ico files) and GRPICONDIRENTRY (for resources) // are different sizes. Hence, we have to use this union of struct pointers hack. struct icodir_ico { @@ -311,7 +302,7 @@ ICOPrivate::ICOPrivate(ICO *q, const IResourceReaderPtr &resReader, uint16_t typ ICOPrivate::~ICOPrivate() { if (dir.v) { - if (isResource()) { + if (dir.is_res) { delete dir.res; } else { delete dir.ico;