Skip to content

Commit

Permalink
Cleanup headers in irr/include/ (minetest#15181)
Browse files Browse the repository at this point in the history
  • Loading branch information
Desour authored Oct 18, 2024
1 parent f2ab887 commit e5d321d
Show file tree
Hide file tree
Showing 51 changed files with 74 additions and 178 deletions.
2 changes: 0 additions & 2 deletions irr/include/EDriverTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

#pragma once

#include "irrTypes.h"

namespace irr
{
namespace video
Expand Down
1 change: 0 additions & 1 deletion irr/include/IAnimatedMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#pragma once

#include "aabbox3d.h"
#include "IMesh.h"

namespace irr
Expand Down
3 changes: 0 additions & 3 deletions irr/include/IAttributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
#include "IReferenceCounted.h"
#include "EAttributes.h"

// not needed here but I can't be bothered to clean the transitive includes up.
#include "quaternion.h"

namespace irr
{
namespace video
Expand Down
2 changes: 0 additions & 2 deletions irr/include/IGUIElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
#include "IEventReceiver.h"
#include "EGUIElementTypes.h"
#include "EGUIAlignment.h"
#include "IAttributes.h"
#include "IGUIEnvironment.h"
#include <cassert>
#include <algorithm>
#include <list>
#include <vector>

Expand Down
2 changes: 1 addition & 1 deletion irr/include/IGUIEnvironment.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "IReferenceCounted.h"
#include "IGUISkin.h"
#include "rect.h"
#include "EFocusFlags.h"
#include "EFocusFlags.h" // IWYU pragma: export
#include "IEventReceiver.h"
#include "path.h"

Expand Down
2 changes: 1 addition & 1 deletion irr/include/IGUIImageList.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#pragma once

#include "IGUIElement.h"
#include "IReferenceCounted.h"
#include "rect.h"
#include "irrTypes.h"

Expand Down
1 change: 0 additions & 1 deletion irr/include/IGUITabControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include "IGUIElement.h"
#include "SColor.h"
#include "IGUISkin.h"

namespace irr
{
Expand Down
2 changes: 0 additions & 2 deletions irr/include/IImageLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

#include "IReferenceCounted.h"
#include "IImage.h"
#include "ITexture.h"
#include "path.h"
#include "irrArray.h"

namespace irr
{
Expand Down
3 changes: 1 addition & 2 deletions irr/include/IImageWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
#pragma once

#include "IReferenceCounted.h"
#include "irrString.h"
#include "coreutil.h"
#include "path.h"

namespace irr
{
Expand Down
1 change: 0 additions & 1 deletion irr/include/IIndexBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#pragma once

#include "IReferenceCounted.h"
#include "irrArray.h"
#include "EHardwareBufferFlags.h"
#include "EPrimitiveTypes.h"
#include "SVertexIndex.h"
Expand Down
1 change: 0 additions & 1 deletion irr/include/IMaterialRendererServices.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#pragma once

#include "SMaterial.h"
#include "S3DVertex.h"

namespace irr
{
Expand Down
1 change: 0 additions & 1 deletion irr/include/IMeshManipulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "IReferenceCounted.h"
#include "vector3d.h"
#include "aabbox3d.h"
#include "matrix4.h"
#include "IAnimatedMesh.h"
#include "IMeshBuffer.h"
#include "SVertexManipulator.h"
Expand Down
2 changes: 1 addition & 1 deletion irr/include/IReadFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#pragma once

#include "IReferenceCounted.h"
#include "coreutil.h"
#include "EReadFileType.h"
#include "path.h"

namespace irr
{
Expand Down
4 changes: 1 addition & 3 deletions irr/include/ISceneManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@

#include "IReferenceCounted.h"
#include "irrArray.h"
#include "irrString.h"
#include "path.h"
#include "vector3d.h"
#include "dimension2d.h"
#include "SColor.h"
#include "ESceneNodeTypes.h"
#include "SceneParameters.h"
#include "SceneParameters.h" // IWYU pragma: export
#include "ISkinnedMesh.h"

namespace irr
Expand Down
3 changes: 1 addition & 2 deletions irr/include/ISceneNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
#include "ECullingTypes.h"
#include "EDebugSceneTypes.h"
#include "SMaterial.h"
#include "irrString.h"
#include "irrArray.h"
#include "aabbox3d.h"
#include "matrix4.h"
#include "IAttributes.h"

#include <list>
#include <optional>
#include <string>

namespace irr
{
Expand Down
3 changes: 2 additions & 1 deletion irr/include/ISkinnedMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
#pragma once

#include "irrArray.h"
#include "IBoneSceneNode.h"
#include "IAnimatedMesh.h"
#include "SSkinMeshBuffer.h"
#include "quaternion.h"

#include <optional>
#include <string>

namespace irr
{
Expand Down
3 changes: 1 addition & 2 deletions irr/include/ITexture.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
#pragma once

#include "IReferenceCounted.h"
#include "IImage.h"
#include "SColor.h"
#include "dimension2d.h"
#include "EDriverTypes.h"
#include "path.h"
#include "matrix4.h"

namespace irr
{
Expand Down
1 change: 0 additions & 1 deletion irr/include/IVertexBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#pragma once

#include "IReferenceCounted.h"
#include "irrArray.h"
#include "EHardwareBufferFlags.h"
#include "S3DVertex.h"

Expand Down
1 change: 1 addition & 0 deletions irr/include/IVideoDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "rect.h"
#include "SColor.h"
#include "IImage.h"
#include "ITexture.h"
#include "irrArray.h"
#include "matrix4.h"
Expand Down
4 changes: 2 additions & 2 deletions irr/include/SMaterial.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include "SColor.h"
#include "matrix4.h"
#include "irrMath.h"
#include "EMaterialTypes.h"
#include "EMaterialProps.h"
#include "EMaterialTypes.h" // IWYU pragma: export
#include "EMaterialProps.h" // IWYU pragma: export
#include "SMaterialLayer.h"
#include "IrrCompileConfig.h" // for IRRLICHT_API

Expand Down
2 changes: 1 addition & 1 deletion irr/include/SMeshBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h

// replaced by template
#include "CMeshBuffer.h"
#include "CMeshBuffer.h" // IWYU pragma: export
1 change: 0 additions & 1 deletion irr/include/SSkinMeshBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "CVertexBuffer.h"
#include "CIndexBuffer.h"
#include "S3DVertex.h"
#include "irrArray.h"

namespace irr
{
Expand Down
2 changes: 0 additions & 2 deletions irr/include/SVertexIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

#pragma once

#include "irrTypes.h"

namespace irr
{
namespace video
Expand Down
4 changes: 1 addition & 3 deletions irr/include/SVertexManipulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

#pragma once

#include "matrix4.h"
#include "S3DVertex.h"
#include "SColor.h"
#include "vector3d.h"

namespace irr
{
Expand Down
1 change: 0 additions & 1 deletion irr/include/coreutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#pragma once

#include "irrString.h"
#include "path.h"

namespace irr
Expand Down
10 changes: 6 additions & 4 deletions irr/include/fast_atof.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

#pragma once

#include "irrMath.h"
#include "irrString.h"
#include "irrTypes.h"
#include <cfloat>
#include <climits>
#include <cmath>

namespace irr
{
Expand Down Expand Up @@ -305,7 +307,7 @@ inline const char *fast_atof_move(const char *in, f32 &result)
if (numDecimals < IRR_ATOF_TABLE_SIZE) {
value += decimal * fast_atof_table[numDecimals];
} else {
value += decimal * (f32)pow(10.f, -(float)numDecimals);
value += decimal * std::pow(10.f, -(float)numDecimals);
}
in = afterDecimal;
}
Expand All @@ -316,7 +318,7 @@ inline const char *fast_atof_move(const char *in, f32 &result)
// strtol10() will deal with both + and - signs,
// but calculate as f32 to prevent overflow at FLT_MAX
// Using pow with float cast instead of powf as otherwise accuracy decreases.
value *= (f32)pow(10.f, (f32)strtol10(in, &in));
value *= std::pow(10.f, (f32)strtol10(in, &in));
}

result = negative ? -value : value;
Expand Down
2 changes: 1 addition & 1 deletion irr/include/irrArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class array
}

//! Assignment operator
const array<T> &operator=(const array<T> &other)
array<T> &operator=(const array<T> &other)
{
if (this == &other)
return *this;
Expand Down
Loading

0 comments on commit e5d321d

Please sign in to comment.