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

Commit

Permalink
cleanup: replace remaining #ifndef #define with #pragma once
Browse files Browse the repository at this point in the history
  • Loading branch information
nerzhul committed Oct 9, 2023
1 parent 5b2f192 commit 9fe7efd
Show file tree
Hide file tree
Showing 23 changed files with 23 additions and 76 deletions.
4 changes: 1 addition & 3 deletions include/IContextManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_I_CONTEXT_MANAGER_H_INCLUDED__
#define __IRR_I_CONTEXT_MANAGER_H_INCLUDED__
#pragma once

#include "SExposedVideoData.h"
#include "SIrrCreationParameters.h"
Expand Down Expand Up @@ -60,4 +59,3 @@ namespace video
} // end namespace irr


#endif
5 changes: 1 addition & 4 deletions include/IMeshWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_I_MESH_WRITER_H_INCLUDED__
#define __IRR_I_MESH_WRITER_H_INCLUDED__

#pragma once
#include "IReferenceCounted.h"
#include "EMeshWriterEnums.h"

Expand Down Expand Up @@ -54,5 +52,4 @@ namespace scene
} // end namespace
} // end namespace

#endif

4 changes: 1 addition & 3 deletions include/IVideoDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_I_VIDEO_DRIVER_H_INCLUDED__
#define __IRR_I_VIDEO_DRIVER_H_INCLUDED__
#pragma once

#include "rect.h"
#include "SColor.h"
Expand Down Expand Up @@ -1211,4 +1210,3 @@ namespace video
} // end namespace irr


#endif
5 changes: 1 addition & 4 deletions include/IrrCompileConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_COMPILE_CONFIG_H_INCLUDED__
#define __IRR_COMPILE_CONFIG_H_INCLUDED__
#pragma once

//! Identifies the IrrlichtMt fork customized for the Minetest engine
#define IRRLICHT_VERSION_MT_REVISION 12
Expand All @@ -29,5 +28,3 @@
#ifndef IRRLICHT_API
#define IRRLICHT_API
#endif

#endif // __IRR_COMPILE_CONFIG_H_INCLUDED__
6 changes: 2 additions & 4 deletions include/Keycodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_KEY_CODES_H_INCLUDED__
#define __IRR_KEY_CODES_H_INCLUDED__
#pragma once

namespace irr
{
Expand Down Expand Up @@ -90,7 +89,7 @@ namespace irr
KEY_KEY_X = 0x58, // X key
KEY_KEY_Y = 0x59, // Y key
KEY_KEY_Z = 0x5A, // Z key
KEY_LWIN = 0x5B, // Left Windows key (MicrosoftŽ NaturalŽ keyboard)
KEY_LWIN = 0x5B, // Left Windows key (Microsoft� Natural� keyboard)
KEY_RWIN = 0x5C, // Right Windows key (Natural keyboard)
KEY_APPS = 0x5D, // Applications key (Natural keyboard)
KEY_SLEEP = 0x5F, // Computer Sleep key
Expand Down Expand Up @@ -185,5 +184,4 @@ namespace irr

} // end namespace irr

#endif

6 changes: 1 addition & 5 deletions include/aabbox3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_AABBOX_3D_H_INCLUDED__
#define __IRR_AABBOX_3D_H_INCLUDED__
#pragma once

#include "irrMath.h"
#include "plane3d.h"
Expand Down Expand Up @@ -364,6 +363,3 @@ class aabbox3d

} // end namespace core
} // end namespace irr

#endif

4 changes: 0 additions & 4 deletions include/coreutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_CORE_UTIL_H_INCLUDED__
#define __IRR_CORE_UTIL_H_INCLUDED__

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

Expand Down Expand Up @@ -202,4 +199,3 @@ inline bool isupper(s32 c) { return c >= 'A' && c <= 'Z'; }
} // end namespace core
} // end namespace irr

#endif
4 changes: 1 addition & 3 deletions include/dimension2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_DIMENSION2D_H_INCLUDED__
#define __IRR_DIMENSION2D_H_INCLUDED__
#pragma once

#include "irrTypes.h"
#include "irrMath.h" // for irr::core::equals()
Expand Down Expand Up @@ -220,5 +219,4 @@ namespace core
} // end namespace core
} // end namespace irr

#endif

5 changes: 1 addition & 4 deletions include/irrArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// This file is part of the "Irrlicht Engine" and the "irrXML" project.
// For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h

#ifndef __IRR_ARRAY_H_INCLUDED__
#define __IRR_ARRAY_H_INCLUDED__

#pragma once
#include <algorithm>
#include <iterator>
#include <vector>
Expand Down Expand Up @@ -438,5 +436,4 @@ class array
} // end namespace core
} // end namespace irr

#endif

4 changes: 1 addition & 3 deletions include/irrMath.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_MATH_H_INCLUDED__
#define __IRR_MATH_H_INCLUDED__
#pragma once

#include "irrTypes.h"
#include <math.h>
Expand Down Expand Up @@ -479,4 +478,3 @@ namespace core
using irr::core::IR;
using irr::core::FR;

#endif
4 changes: 1 addition & 3 deletions include/irrString.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine" and the "irrXML" project.
// For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h

#ifndef __IRR_STRING_H_INCLUDED__
#define __IRR_STRING_H_INCLUDED__
#pragma once

#include "irrTypes.h"
#include <string>
Expand Down Expand Up @@ -1025,5 +1024,4 @@ static size_t wStringToMultibyte(string<c8>& destination, const wchar_t* source,
} // end namespace core
} // end namespace irr

#endif

4 changes: 1 addition & 3 deletions include/irrTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_TYPES_H_INCLUDED__
#define __IRR_TYPES_H_INCLUDED__
#pragma once

#include <stdint.h>

Expand Down Expand Up @@ -120,4 +119,3 @@ code like 'code', but some generate warnings so we use this macro here */
((irr::u32)(irr::u8)(c0) | ((irr::u32)(irr::u8)(c1) << 8) | \
((irr::u32)(irr::u8)(c2) << 16) | ((irr::u32)(irr::u8)(c3) << 24 ))

#endif // __IRR_TYPES_H_INCLUDED__
4 changes: 1 addition & 3 deletions include/line2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_LINE_2D_H_INCLUDED__
#define __IRR_LINE_2D_H_INCLUDED__
#pragma once

#include "irrTypes.h"
#include "vector2d.h"
Expand Down Expand Up @@ -355,5 +354,4 @@ class line2d
} // end namespace core
} // end namespace irr

#endif

4 changes: 1 addition & 3 deletions include/line3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_LINE_3D_H_INCLUDED__
#define __IRR_LINE_3D_H_INCLUDED__
#pragma once

#include "irrTypes.h"
#include "vector3d.h"
Expand Down Expand Up @@ -140,5 +139,4 @@ class line3d
} // end namespace core
} // end namespace irr

#endif

4 changes: 1 addition & 3 deletions include/matrix4.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_MATRIX_H_INCLUDED__
#define __IRR_MATRIX_H_INCLUDED__
#pragma once

#include "irrMath.h"
#include "vector3d.h"
Expand Down Expand Up @@ -2363,5 +2362,4 @@ namespace core
} // end namespace core
} // end namespace irr

#endif

4 changes: 1 addition & 3 deletions include/path.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine" and the "irrXML" project.
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_PATH_H_INCLUDED__
#define __IRR_PATH_H_INCLUDED__
#pragma once

#include "irrString.h"

Expand Down Expand Up @@ -87,4 +86,3 @@ struct SNamedPath
} // io
} // irr

#endif // __IRR_PATH_H_INCLUDED__
4 changes: 1 addition & 3 deletions include/plane3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_PLANE_3D_H_INCLUDED__
#define __IRR_PLANE_3D_H_INCLUDED__
#pragma once

#include "irrMath.h"
#include "vector3d.h"
Expand Down Expand Up @@ -241,5 +240,4 @@ typedef plane3d<s32> plane3di;
} // end namespace core
} // end namespace irr

#endif

4 changes: 1 addition & 3 deletions include/position2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
//! As of Irrlicht 1.6, position2d is a synonym for vector2d.
/** You should consider position2d to be deprecated, and use vector2d by preference. */

#ifndef __IRR_POSITION_H_INCLUDED__
#define __IRR_POSITION_H_INCLUDED__
#pragma once

#include "vector2d.h"

Expand All @@ -28,5 +27,4 @@ typedef vector2d<s32> position2di;
// ...and use a #define to catch the rest, for (e.g.) position2d<f64>
#define position2d vector2d

#endif // __IRR_POSITION_H_INCLUDED__

4 changes: 1 addition & 3 deletions include/quaternion.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_QUATERNION_H_INCLUDED__
#define __IRR_QUATERNION_H_INCLUDED__
#pragma once

#include "irrTypes.h"
#include "irrMath.h"
Expand Down Expand Up @@ -754,5 +753,4 @@ inline core::quaternion& quaternion::rotationFromTo(const vector3df& from, const
} // end namespace core
} // end namespace irr

#endif

4 changes: 1 addition & 3 deletions include/rect.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_RECT_H_INCLUDED__
#define __IRR_RECT_H_INCLUDED__
#pragma once

#include "irrTypes.h"
#include "dimension2d.h"
Expand Down Expand Up @@ -284,5 +283,4 @@ namespace core
} // end namespace core
} // end namespace irr

#endif

4 changes: 1 addition & 3 deletions include/triangle3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_TRIANGLE_3D_H_INCLUDED__
#define __IRR_TRIANGLE_3D_H_INCLUDED__
#pragma once

#include "vector3d.h"
#include "line3d.h"
Expand Down Expand Up @@ -274,5 +273,4 @@ namespace core
} // end namespace core
} // end namespace irr

#endif

4 changes: 1 addition & 3 deletions include/vector2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_POINT_2D_H_INCLUDED__
#define __IRR_POINT_2D_H_INCLUDED__
#pragma once

#include "irrMath.h"
#include "dimension2d.h"
Expand Down Expand Up @@ -432,5 +431,4 @@ struct hash<irr::core::vector2d<T> >

}

#endif

4 changes: 1 addition & 3 deletions include/vector3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __IRR_POINT_3D_H_INCLUDED__
#define __IRR_POINT_3D_H_INCLUDED__
#pragma once

#include "irrMath.h"

Expand Down Expand Up @@ -485,5 +484,4 @@ struct hash<irr::core::vector3d<T> >

}

#endif

0 comments on commit 9fe7efd

Please sign in to comment.