From 1d58677e18d3ee39f6e4096d11758fb4e6d4e452 Mon Sep 17 00:00:00 2001 From: cutealien Date: Sun, 13 Aug 2023 15:31:42 +0000 Subject: [PATCH] Clean up include dependencies in public headers Removing includes which were not needed by headers Note that if you include those headers directly (instead of including irrlicht.h) you may have to add some new includes now. Thought I generally tried to avoid removing headers where it leads to too much changes in user-code Reason was mainly that IntelliSense in VisualStudio 17.7 added a new feature which shows those unused headers :) Has to be used a bit careful as it doesn't know about defines and other platforms And I only did clean up public headers so far (will probably do some more later or another time) git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6524 dfc29bdd-3216-0410-991c-e03cc46cb475 --- include/IAnimatedMesh.h | 1 - include/IColladaMeshWriter.h | 1 - include/IGUIImageList.h | 3 +-- include/IGUIWindow.h | 1 - include/IImage.h | 1 - include/IImageWriter.h | 1 - include/IIndexBuffer.h | 1 - include/IMeshLoader.h | 1 - include/ISceneManager.h | 1 - include/ISceneNodeAnimator.h | 2 -- include/ISceneNodeAnimatorCameraFPS.h | 1 - include/ISceneUserDataSerializer.h | 2 -- include/ISkinnedMesh.h | 3 ++- include/SMaterial.h | 1 - include/irrString.h | 2 -- include/matrix4.h | 1 - source/Irrlicht/CAnimatedMeshSceneNode.cpp | 4 +--- source/Irrlicht/CB3DMeshFileLoader.cpp | 1 + source/Irrlicht/COpenGLShaderMaterialRenderer.h | 1 + source/Irrlicht/CSceneLoaderIrr.cpp | 2 ++ source/Irrlicht/CSkinnedMesh.h | 1 + 21 files changed, 9 insertions(+), 23 deletions(-) diff --git a/include/IAnimatedMesh.h b/include/IAnimatedMesh.h index ab9be06..9579761 100644 --- a/include/IAnimatedMesh.h +++ b/include/IAnimatedMesh.h @@ -5,7 +5,6 @@ #ifndef IRR_I_ANIMATED_MESH_H_INCLUDED #define IRR_I_ANIMATED_MESH_H_INCLUDED -#include "aabbox3d.h" #include "IMesh.h" namespace irr diff --git a/include/IColladaMeshWriter.h b/include/IColladaMeshWriter.h index 0c70081..260ba8e 100644 --- a/include/IColladaMeshWriter.h +++ b/include/IColladaMeshWriter.h @@ -7,7 +7,6 @@ #include "IMeshWriter.h" #include "ISceneNode.h" -#include "IAnimatedMesh.h" #include "SMaterial.h" namespace irr diff --git a/include/IGUIImageList.h b/include/IGUIImageList.h index 2280f05..89d14a1 100644 --- a/include/IGUIImageList.h +++ b/include/IGUIImageList.h @@ -4,9 +4,8 @@ #ifndef IRR_I_GUI_IMAGE_LIST_H_INCLUDED #define IRR_I_GUI_IMAGE_LIST_H_INCLUDED -#include "IGUIElement.h" #include "rect.h" -#include "irrTypes.h" +#include "IReferenceCounted.h" namespace irr { diff --git a/include/IGUIWindow.h b/include/IGUIWindow.h index 88723b0..2b36494 100644 --- a/include/IGUIWindow.h +++ b/include/IGUIWindow.h @@ -6,7 +6,6 @@ #define IRR_I_GUI_WINDOW_H_INCLUDED #include "IGUIElement.h" -#include "EMessageBoxFlags.h" namespace irr { diff --git a/include/IImage.h b/include/IImage.h index dc958cc..488d33e 100644 --- a/include/IImage.h +++ b/include/IImage.h @@ -10,7 +10,6 @@ #include "rect.h" #include "SColor.h" #include "irrAllocator.h" -#include namespace irr { diff --git a/include/IImageWriter.h b/include/IImageWriter.h index 7ac8ada..7e4cc98 100644 --- a/include/IImageWriter.h +++ b/include/IImageWriter.h @@ -6,7 +6,6 @@ #define IRR_I_IMAGE_WRITER_H_INCLUDED #include "IReferenceCounted.h" -#include "irrString.h" #include "coreutil.h" namespace irr diff --git a/include/IIndexBuffer.h b/include/IIndexBuffer.h index a39e306..5582d8f 100644 --- a/include/IIndexBuffer.h +++ b/include/IIndexBuffer.h @@ -6,7 +6,6 @@ #define IRR_I_INDEX_BUFFER_H_INCLUDED #include "IReferenceCounted.h" -#include "irrArray.h" #include "EHardwareBufferFlags.h" #include "SVertexIndex.h" diff --git a/include/IMeshLoader.h b/include/IMeshLoader.h index cd81adb..74e7336 100644 --- a/include/IMeshLoader.h +++ b/include/IMeshLoader.h @@ -8,7 +8,6 @@ #include "IReferenceCounted.h" #include "path.h" #include "IMeshTextureLoader.h" -#include "SVertexIndex.h" namespace irr { diff --git a/include/ISceneManager.h b/include/ISceneManager.h index 64ab0e8..fab9a7e 100644 --- a/include/ISceneManager.h +++ b/include/ISceneManager.h @@ -7,7 +7,6 @@ #include "IReferenceCounted.h" #include "irrArray.h" -#include "irrString.h" #include "path.h" #include "vector3d.h" #include "dimension2d.h" diff --git a/include/ISceneNodeAnimator.h b/include/ISceneNodeAnimator.h index b284865..3f184a6 100644 --- a/include/ISceneNodeAnimator.h +++ b/include/ISceneNodeAnimator.h @@ -5,8 +5,6 @@ #ifndef IRR_I_SCENE_NODE_ANIMATOR_H_INCLUDED #define IRR_I_SCENE_NODE_ANIMATOR_H_INCLUDED -#include "IReferenceCounted.h" -#include "vector3d.h" #include "ESceneNodeAnimatorTypes.h" #include "IAttributeExchangingObject.h" #include "IAttributes.h" diff --git a/include/ISceneNodeAnimatorCameraFPS.h b/include/ISceneNodeAnimatorCameraFPS.h index 8caaef9..ce69ced 100644 --- a/include/ISceneNodeAnimatorCameraFPS.h +++ b/include/ISceneNodeAnimatorCameraFPS.h @@ -6,7 +6,6 @@ #define IRR_I_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED #include "ISceneNodeAnimator.h" -#include "IEventReceiver.h" #include "irrArray.h" namespace irr diff --git a/include/ISceneUserDataSerializer.h b/include/ISceneUserDataSerializer.h index 8978ce9..b4032d0 100644 --- a/include/ISceneUserDataSerializer.h +++ b/include/ISceneUserDataSerializer.h @@ -5,8 +5,6 @@ #ifndef IRR_I_SCENE_USER_DATA_SERIALIZER_H_INCLUDED #define IRR_I_SCENE_USER_DATA_SERIALIZER_H_INCLUDED -#include "IReferenceCounted.h" - namespace irr { namespace io diff --git a/include/ISkinnedMesh.h b/include/ISkinnedMesh.h index baa487a..b6c94ca 100644 --- a/include/ISkinnedMesh.h +++ b/include/ISkinnedMesh.h @@ -6,9 +6,10 @@ #define IRR_I_SKINNED_MESH_H_INCLUDED #include "irrArray.h" -#include "IBoneSceneNode.h" #include "IAnimatedMesh.h" #include "SSkinMeshBuffer.h" +#include "quaternion.h" +#include "irrString.h" namespace irr { diff --git a/include/SMaterial.h b/include/SMaterial.h index 1d71ce8..15a0048 100644 --- a/include/SMaterial.h +++ b/include/SMaterial.h @@ -7,7 +7,6 @@ #include "SColor.h" #include "matrix4.h" -#include "irrArray.h" #include "irrMath.h" #include "EMaterialTypes.h" #include "EMaterialFlags.h" diff --git a/include/irrString.h b/include/irrString.h index bc7a6a2..7c630a0 100644 --- a/include/irrString.h +++ b/include/irrString.h @@ -8,9 +8,7 @@ #include "irrTypes.h" #include "irrAllocator.h" #include "irrMath.h" -#include #include -#include namespace irr { diff --git a/include/matrix4.h b/include/matrix4.h index 3c51eac..c355515 100644 --- a/include/matrix4.h +++ b/include/matrix4.h @@ -2399,4 +2399,3 @@ namespace core } // end namespace irr #endif - diff --git a/source/Irrlicht/CAnimatedMeshSceneNode.cpp b/source/Irrlicht/CAnimatedMeshSceneNode.cpp index e5c7f80..b6731b4 100644 --- a/source/Irrlicht/CAnimatedMeshSceneNode.cpp +++ b/source/Irrlicht/CAnimatedMeshSceneNode.cpp @@ -5,8 +5,8 @@ #include "CAnimatedMeshSceneNode.h" #include "IVideoDriver.h" #include "ISceneManager.h" -#include "S3DVertex.h" #include "os.h" +#include "IFileSystem.h" #ifdef _IRR_COMPILE_WITH_SHADOW_VOLUME_SCENENODE_ #include "CShadowVolumeSceneNode.h" #else @@ -14,9 +14,7 @@ #endif // _IRR_COMPILE_WITH_SHADOW_VOLUME_SCENENODE_ #include "IAnimatedMeshMD3.h" #include "CSkinnedMesh.h" -#include "IDummyTransformationSceneNode.h" #include "IBoneSceneNode.h" -#include "IMaterialRenderer.h" #include "IMesh.h" #include "IMeshCache.h" #include "IAnimatedMesh.h" diff --git a/source/Irrlicht/CB3DMeshFileLoader.cpp b/source/Irrlicht/CB3DMeshFileLoader.cpp index 05f8bf5..4323af3 100644 --- a/source/Irrlicht/CB3DMeshFileLoader.cpp +++ b/source/Irrlicht/CB3DMeshFileLoader.cpp @@ -13,6 +13,7 @@ #include "CMeshTextureLoader.h" #include "IVideoDriver.h" +#include "IAttributes.h" #include "IFileSystem.h" #include "os.h" diff --git a/source/Irrlicht/COpenGLShaderMaterialRenderer.h b/source/Irrlicht/COpenGLShaderMaterialRenderer.h index 06ebf30..82a51eb 100644 --- a/source/Irrlicht/COpenGLShaderMaterialRenderer.h +++ b/source/Irrlicht/COpenGLShaderMaterialRenderer.h @@ -10,6 +10,7 @@ #ifdef _IRR_COMPILE_WITH_OPENGL_ #include "IMaterialRenderer.h" +#include "irrArray.h" #include "COpenGLCommon.h" diff --git a/source/Irrlicht/CSceneLoaderIrr.cpp b/source/Irrlicht/CSceneLoaderIrr.cpp index 7705436..8e97581 100644 --- a/source/Irrlicht/CSceneLoaderIrr.cpp +++ b/source/Irrlicht/CSceneLoaderIrr.cpp @@ -6,8 +6,10 @@ #include "ISceneNodeAnimatorFactory.h" #include "ISceneUserDataSerializer.h" #include "ISceneManager.h" +#include "ISceneNode.h" #include "IVideoDriver.h" #include "IFileSystem.h" +#include "IAttributes.h" #include "os.h" namespace irr diff --git a/source/Irrlicht/CSkinnedMesh.h b/source/Irrlicht/CSkinnedMesh.h index b51c038..9dbb60c 100644 --- a/source/Irrlicht/CSkinnedMesh.h +++ b/source/Irrlicht/CSkinnedMesh.h @@ -21,6 +21,7 @@ namespace scene class IAnimatedMeshSceneNode; class IBoneSceneNode; + class ISceneManager; class CSkinnedMesh: public ISkinnedMesh {