mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-02 00:00:26 +02:00
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:
@ -10,52 +10,43 @@ namespace irr
|
||||
{
|
||||
|
||||
//! 8 bit unsigned variable.
|
||||
typedef uint8_t u8;
|
||||
typedef uint8_t u8;
|
||||
|
||||
//! 8 bit signed variable.
|
||||
typedef int8_t s8;
|
||||
typedef int8_t s8;
|
||||
|
||||
//! 8 bit character variable.
|
||||
/** This is a typedef for char, it ensures portability of the engine. */
|
||||
typedef char c8;
|
||||
|
||||
|
||||
typedef char c8;
|
||||
|
||||
//! 16 bit unsigned variable.
|
||||
typedef uint16_t u16;
|
||||
typedef uint16_t u16;
|
||||
|
||||
//! 16 bit signed variable.
|
||||
typedef int16_t s16;
|
||||
|
||||
|
||||
typedef int16_t s16;
|
||||
|
||||
//! 32 bit unsigned variable.
|
||||
typedef uint32_t u32;
|
||||
typedef uint32_t u32;
|
||||
|
||||
//! 32 bit signed variable.
|
||||
typedef int32_t s32;
|
||||
|
||||
typedef int32_t s32;
|
||||
|
||||
//! 64 bit unsigned variable.
|
||||
typedef uint64_t u64;
|
||||
typedef uint64_t u64;
|
||||
|
||||
//! 64 bit signed variable.
|
||||
typedef int64_t s64;
|
||||
|
||||
|
||||
typedef int64_t s64;
|
||||
|
||||
//! 32 bit floating point variable.
|
||||
/** This is a typedef for float, it ensures portability of the engine. */
|
||||
typedef float f32;
|
||||
typedef float f32;
|
||||
|
||||
//! 64 bit floating point variable.
|
||||
/** This is a typedef for double, it ensures portability of the engine. */
|
||||
typedef double f64;
|
||||
|
||||
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, ...);
|
||||
@ -69,22 +60,25 @@ namespace irr
|
||||
{
|
||||
|
||||
//! Type name for character type used by the file system (legacy).
|
||||
typedef char fschar_t;
|
||||
#define _IRR_TEXT(X) X
|
||||
typedef char fschar_t;
|
||||
#define _IRR_TEXT(X) X
|
||||
|
||||
} // end namespace irr
|
||||
|
||||
//! define a break macro for debugging.
|
||||
#if defined(_DEBUG)
|
||||
#if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER)
|
||||
#include <crtdbg.h>
|
||||
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_CrtDbgBreak();}
|
||||
#include <crtdbg.h>
|
||||
#define _IRR_DEBUG_BREAK_IF(_CONDITION_) \
|
||||
if (_CONDITION_) { \
|
||||
_CrtDbgBreak(); \
|
||||
}
|
||||
#else
|
||||
#include <assert.h>
|
||||
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) assert( !(_CONDITION_) );
|
||||
#include <assert.h>
|
||||
#define _IRR_DEBUG_BREAK_IF(_CONDITION_) assert(!(_CONDITION_));
|
||||
#endif
|
||||
#else
|
||||
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ )
|
||||
#define _IRR_DEBUG_BREAK_IF(_CONDITION_)
|
||||
#endif
|
||||
|
||||
//! deprecated macro for virtual function override
|
||||
@ -94,7 +88,6 @@ namespace irr
|
||||
//! creates four CC codes used in Irrlicht for simple ids
|
||||
/** 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 ))
|
||||
|
||||
#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))
|
||||
|
Reference in New Issue
Block a user