1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Remove irr namespace (#16309)

This commit is contained in:
Lars Müller 2025-07-09 10:35:52 +02:00 committed by GitHub
parent 7e22c72492
commit 61551cfc3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
381 changed files with 680 additions and 1632 deletions

View file

@ -7,9 +7,6 @@
#include <cstdint>
#include <cassert>
namespace irr
{
//! 8 bit unsigned variable.
typedef uint8_t u8;
@ -46,8 +43,6 @@ typedef float f32;
/** This is a typedef for double, it ensures portability of the engine. */
typedef double f64;
} // end namespace irr
//! Defines for snprintf_irr because snprintf method does not match the ISO C
//! standard on Windows platforms.
//! We want int snprintf_irr(char *str, size_t size, const char *format, ...);
@ -57,15 +52,10 @@ typedef double f64;
#define snprintf_irr snprintf
#endif // _MSC_VER
namespace irr
{
//! Type name for character type used by the file system (legacy).
typedef char fschar_t;
#define _IRR_TEXT(X) X
} // end namespace irr
// Invokes undefined behavior for unreachable code optimization
// Note: an assert(false) is included first to catch this in debug builds
#if defined(__cpp_lib_unreachable)
@ -86,5 +76,5 @@ typedef char fschar_t;
/** some compilers can create those by directly writing the
code like 'code', but some generate warnings so we use this macro here */
#define MAKE_IRR_ID(c0, c1, c2, c3) \
((irr::u32)(irr::u8)(c0) | ((irr::u32)(irr::u8)(c1) << 8) | \
((irr::u32)(irr::u8)(c2) << 16) | ((irr::u32)(irr::u8)(c3) << 24))
((u32)(u8)(c0) | ((u32)(u8)(c1) << 8) | \
((u32)(u8)(c2) << 16) | ((u32)(u8)(c3) << 24))