Reformat the code, using:

find -type f |  # list all regular files
  grep -E '\.(h|cpp|mm)$' |  # filter for source files
  grep -v '/mt_' |  # filter out generated files
  grep -v '/vendor/' | # and vendored GL
  grep -v '/test/image_loader_test.cpp' |  # and this file (has giant literals arrays)
  xargs -n 1 -P $(nproc) clang-format -i  # reformat everything

Co-authored-by: numzero <numzer0@yandex.ru>
This commit is contained in:
Desour
2024-03-20 19:35:52 +01:00
committed by sfan5
parent 9814510b1b
commit f5c6d3e945
292 changed files with 37376 additions and 42421 deletions

View File

@ -14,7 +14,7 @@ namespace irr
{
namespace video
{
class ITexture;
class ITexture;
} // end namespace video
namespace io
{
@ -23,32 +23,30 @@ namespace io
class IAttributes : public virtual IReferenceCounted
{
public:
//! Returns amount of attributes in this collection of attributes.
virtual u32 getAttributeCount() const = 0;
//! Returns attribute name by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual const c8* getAttributeName(s32 index) const = 0;
virtual const c8 *getAttributeName(s32 index) const = 0;
//! Returns the type of an attribute
//! \param attributeName: Name for the attribute
virtual E_ATTRIBUTE_TYPE getAttributeType(const c8* attributeName) const = 0;
virtual E_ATTRIBUTE_TYPE getAttributeType(const c8 *attributeName) const = 0;
//! Returns attribute type by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual E_ATTRIBUTE_TYPE getAttributeType(s32 index) const = 0;
//! Returns if an attribute with a name exists
virtual bool existsAttribute(const c8* attributeName) const = 0;
virtual bool existsAttribute(const c8 *attributeName) const = 0;
//! Returns attribute index from name, -1 if not found
virtual s32 findAttribute(const c8* attributeName) const = 0;
virtual s32 findAttribute(const c8 *attributeName) const = 0;
//! Removes all attributes
virtual void clear() = 0;
/*
Integer Attribute
@ -56,16 +54,16 @@ public:
*/
//! Adds an attribute as integer
virtual void addInt(const c8* attributeName, s32 value) = 0;
virtual void addInt(const c8 *attributeName, s32 value) = 0;
//! Sets an attribute as integer value
virtual void setAttribute(const c8* attributeName, s32 value) = 0;
virtual void setAttribute(const c8 *attributeName, s32 value) = 0;
//! Gets an attribute as integer value
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual s32 getAttributeAsInt(const c8* attributeName, irr::s32 defaultNotFound=0) const = 0;
virtual s32 getAttributeAsInt(const c8 *attributeName, irr::s32 defaultNotFound = 0) const = 0;
//! Gets an attribute as integer value
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
@ -81,16 +79,16 @@ public:
*/
//! Adds an attribute as float
virtual void addFloat(const c8* attributeName, f32 value) = 0;
virtual void addFloat(const c8 *attributeName, f32 value) = 0;
//! Sets a attribute as float value
virtual void setAttribute(const c8* attributeName, f32 value) = 0;
virtual void setAttribute(const c8 *attributeName, f32 value) = 0;
//! Gets an attribute as float value
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual f32 getAttributeAsFloat(const c8* attributeName, irr::f32 defaultNotFound=0.f) const = 0;
virtual f32 getAttributeAsFloat(const c8 *attributeName, irr::f32 defaultNotFound = 0.f) const = 0;
//! Gets an attribute as float value
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
@ -99,22 +97,21 @@ public:
//! Sets an attribute as float value
virtual void setAttribute(s32 index, f32 value) = 0;
/*
Bool Attribute
*/
//! Adds an attribute as bool
virtual void addBool(const c8* attributeName, bool value) = 0;
virtual void addBool(const c8 *attributeName, bool value) = 0;
//! Sets an attribute as boolean value
virtual void setAttribute(const c8* attributeName, bool value) = 0;
virtual void setAttribute(const c8 *attributeName, bool value) = 0;
//! Gets an attribute as boolean value
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual bool getAttributeAsBool(const c8* attributeName, bool defaultNotFound=false) const = 0;
virtual bool getAttributeAsBool(const c8 *attributeName, bool defaultNotFound = false) const = 0;
//! Gets an attribute as boolean value
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
@ -122,7 +119,6 @@ public:
//! Sets an attribute as boolean value
virtual void setAttribute(s32 index, bool value) = 0;
};
} // end namespace io