From 89d07177797b4d44a04c3d49a8718da327ab2ed0 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 18 Feb 2024 16:32:45 +0100 Subject: [PATCH] Delete some dead code --- include/EAttributes.h | 66 -------------------------------- include/IAttributes.h | 31 ++------------- source/Irrlicht/CAttributeImpl.h | 15 -------- source/Irrlicht/CAttributes.cpp | 20 ---------- source/Irrlicht/CAttributes.h | 9 ----- source/Irrlicht/IAttribute.h | 1 - source/Irrlicht/S2DVertex.h | 26 ------------- 7 files changed, 3 insertions(+), 165 deletions(-) delete mode 100644 source/Irrlicht/S2DVertex.h diff --git a/include/EAttributes.h b/include/EAttributes.h index 121b6b36..a96141a1 100644 --- a/include/EAttributes.h +++ b/include/EAttributes.h @@ -19,75 +19,9 @@ enum E_ATTRIBUTE_TYPE // float attribute EAT_FLOAT, - // string attribute - EAT_STRING, - // boolean attribute EAT_BOOL, - // enumeration attribute - EAT_ENUM, - - // color attribute - EAT_COLOR, - - // floating point color attribute - EAT_COLORF, - - // 3d vector attribute - EAT_VECTOR3D, - - // 2d position attribute - EAT_POSITION2D, - - // vector 2d attribute - EAT_VECTOR2D, - - // rectangle attribute - EAT_RECT, - - // matrix attribute - EAT_MATRIX, - - // quaternion attribute - EAT_QUATERNION, - - // 3d bounding box - EAT_BBOX, - - // plane - EAT_PLANE, - - // 3d triangle - EAT_TRIANGLE3D, - - // line 2d - EAT_LINE2D, - - // line 3d - EAT_LINE3D, - - // array of stringws attribute - EAT_STRINGWARRAY, - - // array of float - EAT_FLOATARRAY, - - // array of int - EAT_INTARRAY, - - // binary data attribute - EAT_BINARY, - - // texture reference attribute - EAT_TEXTURE, - - // user pointer void* - EAT_USER_POINTER, - - // dimension attribute - EAT_DIMENSION2D, - // known attribute type count EAT_COUNT, diff --git a/include/IAttributes.h b/include/IAttributes.h index 88d196db..b96c1214 100644 --- a/include/IAttributes.h +++ b/include/IAttributes.h @@ -6,25 +6,10 @@ #define __I_ATTRIBUTES_H_INCLUDED__ #include "IReferenceCounted.h" -#include "SColor.h" -#include "vector3d.h" -#include "vector2d.h" -#include "line2d.h" -#include "line3d.h" -#include "triangle3d.h" -#include "position2d.h" -#include "rect.h" -#include "dimension2d.h" -#include "matrix4.h" -#include "quaternion.h" -#include "plane3d.h" -#include "triangle3d.h" -#include "line2d.h" -#include "line3d.h" -#include "irrString.h" -#include "irrArray.h" #include "EAttributes.h" -#include "path.h" + +// not needed here but I can't be bothered to clean the transitive includes up. +#include "quaternion.h" namespace irr { @@ -55,16 +40,6 @@ public: //! \param index: Index value, must be between 0 and getAttributeCount()-1. virtual E_ATTRIBUTE_TYPE getAttributeType(s32 index) const = 0; - //! Returns the type string of the attribute - //! \param attributeName: String for the attribute type - //! \param defaultNotFound Value returned when attributeName was not found - virtual const wchar_t* getAttributeTypeString(const c8* attributeName, const wchar_t* defaultNotFound = L"unknown") const = 0; - - //! Returns the type string of the attribute by index. - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - //! \param defaultNotFound Value returned for an invalid index - virtual const wchar_t* getAttributeTypeString(s32 index, const wchar_t* defaultNotFound = L"unknown") const = 0; - //! Returns if an attribute with a name exists virtual bool existsAttribute(const c8* attributeName) const = 0; diff --git a/source/Irrlicht/CAttributeImpl.h b/source/Irrlicht/CAttributeImpl.h index 3cbb2e00..0e75652e 100644 --- a/source/Irrlicht/CAttributeImpl.h +++ b/source/Irrlicht/CAttributeImpl.h @@ -62,11 +62,6 @@ public: return EAT_BOOL; } - const wchar_t* getTypeString() const override - { - return L"bool"; - } - bool BoolValue; }; @@ -106,11 +101,6 @@ public: return EAT_INT; } - const wchar_t* getTypeString() const override - { - return L"int"; - } - s32 Value; }; @@ -150,11 +140,6 @@ public: return EAT_FLOAT; } - const wchar_t* getTypeString() const override - { - return L"float"; - } - f32 Value; }; diff --git a/source/Irrlicht/CAttributes.cpp b/source/Irrlicht/CAttributes.cpp index ed84f76f..db39eaa1 100644 --- a/source/Irrlicht/CAttributes.cpp +++ b/source/Irrlicht/CAttributes.cpp @@ -172,26 +172,6 @@ E_ATTRIBUTE_TYPE CAttributes::getAttributeType(s32 index) const return Attributes[index]->getType(); } -//! Returns the type of an attribute -const wchar_t* CAttributes::getAttributeTypeString(const c8* attributeName, const wchar_t* defaultNotFound) const -{ - const IAttribute* att = getAttributeP(attributeName); - if (att) - return att->getTypeString(); - else - return defaultNotFound; -} - -//! Returns attribute type string by index. -//! \param index: Index value, must be between 0 and getAttributeCount()-1. -const wchar_t* CAttributes::getAttributeTypeString(s32 index, const wchar_t* defaultNotFound) const -{ - if ((u32)index >= Attributes.size()) - return defaultNotFound; - - return Attributes[index]->getTypeString(); -} - //! Gets an attribute as integer value //! \param index: Index value, must be between 0 and getAttributeCount()-1. s32 CAttributes::getAttributeAsInt(s32 index) const diff --git a/source/Irrlicht/CAttributes.h b/source/Irrlicht/CAttributes.h index e5fae36e..83c27a54 100644 --- a/source/Irrlicht/CAttributes.h +++ b/source/Irrlicht/CAttributes.h @@ -41,15 +41,6 @@ public: //! \param index: Index value, must be between 0 and getAttributeCount()-1. E_ATTRIBUTE_TYPE getAttributeType(s32 index) const override; - //! Returns the type string of the attribute - //! \param attributeName: String for the attribute type - //! \param defaultNotFound Value returned when attributeName was not found - const wchar_t* getAttributeTypeString(const c8* attributeName, const wchar_t* defaultNotFound = L"unknown") const override; - - //! Returns the type string of the attribute by index. - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - const wchar_t* getAttributeTypeString(s32 index, const wchar_t* defaultNotFound = L"unknown") const override; - //! Returns if an attribute with a name exists bool existsAttribute(const c8* attributeName) const override; diff --git a/source/Irrlicht/IAttribute.h b/source/Irrlicht/IAttribute.h index 90d9fc6a..2f40536b 100644 --- a/source/Irrlicht/IAttribute.h +++ b/source/Irrlicht/IAttribute.h @@ -56,7 +56,6 @@ public: core::stringc Name; virtual E_ATTRIBUTE_TYPE getType() const = 0; - virtual const wchar_t* getTypeString() const = 0; }; } // end namespace io diff --git a/source/Irrlicht/S2DVertex.h b/source/Irrlicht/S2DVertex.h deleted file mode 100644 index 9a0e1bc0..00000000 --- a/source/Irrlicht/S2DVertex.h +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#pragma once - -#include "vector2d.h" - -typedef signed short TZBufferType; - -namespace irr -{ -namespace video -{ - - struct S2DVertex - { - core::vector2d Pos; // position - core::vector2d TCoords; // texture coordinates - TZBufferType ZValue; // zvalue - u16 Color; - }; - - -} // end namespace video -} // end namespace irr