Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
Delete some dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Feb 18, 2024
1 parent 7ba1ea2 commit c9adbf7
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 165 deletions.
66 changes: 0 additions & 66 deletions include/EAttributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down
31 changes: 3 additions & 28 deletions include/IAttributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -55,16 +40,6 @@ class IAttributes : public virtual IReferenceCounted
//! \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;

Expand Down
15 changes: 0 additions & 15 deletions source/Irrlicht/CAttributeImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ class CBoolAttribute : public IAttribute
return EAT_BOOL;
}

const wchar_t* getTypeString() const override
{
return L"bool";
}

bool BoolValue;
};

Expand Down Expand Up @@ -106,11 +101,6 @@ class CIntAttribute : public IAttribute
return EAT_INT;
}

const wchar_t* getTypeString() const override
{
return L"int";
}

s32 Value;
};

Expand Down Expand Up @@ -150,11 +140,6 @@ class CFloatAttribute : public IAttribute
return EAT_FLOAT;
}

const wchar_t* getTypeString() const override
{
return L"float";
}

f32 Value;
};

Expand Down
20 changes: 0 additions & 20 deletions source/Irrlicht/CAttributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions source/Irrlicht/CAttributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ class CAttributes : public IAttributes
//! \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;

Expand Down
1 change: 0 additions & 1 deletion source/Irrlicht/IAttribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ class IAttribute : public virtual IReferenceCounted
core::stringc Name;

virtual E_ATTRIBUTE_TYPE getType() const = 0;
virtual const wchar_t* getTypeString() const = 0;
};

} // end namespace io
Expand Down
26 changes: 0 additions & 26 deletions source/Irrlicht/S2DVertex.h

This file was deleted.

0 comments on commit c9adbf7

Please sign in to comment.