Tabs to spaces
This commit is contained in:
		
							parent
							
								
									0bc8a48dbd
								
							
						
					
					
						commit
						101037b856
					
				| @ -2,7 +2,6 @@ | |||||||
|     ColumnLimit: 100, |     ColumnLimit: 100, | ||||||
|     TabWidth: 4, |     TabWidth: 4, | ||||||
|     IndentWidth: 4, # 1 tab |     IndentWidth: 4, # 1 tab | ||||||
|     UseTab: ForIndentation, |  | ||||||
|     BreakBeforeBraces: Allman, |     BreakBeforeBraces: Allman, | ||||||
|     PointerBindsToType: false, |     PointerBindsToType: false, | ||||||
|     ### |     ### | ||||||
| @ -21,8 +20,8 @@ | |||||||
|     AllowShortIfStatementsOnASingleLine: true, |     AllowShortIfStatementsOnASingleLine: true, | ||||||
|     AllowShortLoopsOnASingleLine: false, |     AllowShortLoopsOnASingleLine: false, | ||||||
|     # |     # | ||||||
|     BinPackArguments: true, |     BinPackArguments: false, | ||||||
|     BinPackParameters: true, |     BinPackParameters: false, | ||||||
|     # |     # | ||||||
|     BreakConstructorInitializersBeforeComma: true, |     BreakConstructorInitializersBeforeComma: true, | ||||||
|     ConstructorInitializerIndentWidth: 0, |     ConstructorInitializerIndentWidth: 0, | ||||||
|  | |||||||
							
								
								
									
										41
									
								
								dqn.h
									
									
									
									
									
								
							
							
						
						
									
										41
									
								
								dqn.h
									
									
									
									
									
								
							| @ -110,7 +110,7 @@ | |||||||
| #include <stddef.h> // For standard types | #include <stddef.h> // For standard types | ||||||
| #include <string.h> // memmove | #include <string.h> // memmove | ||||||
| #include <stdarg.h> // va_list | #include <stdarg.h> // va_list | ||||||
| #include <float.h> | #include <float.h>  // FLT_MAX | ||||||
| #define LOCAL_PERSIST static | #define LOCAL_PERSIST static | ||||||
| #define FILE_SCOPE    static | #define FILE_SCOPE    static | ||||||
| 
 | 
 | ||||||
| @ -130,7 +130,9 @@ using i8  = int8_t; | |||||||
| using f64 = double; | using f64 = double; | ||||||
| using f32 = float; | using f32 = float; | ||||||
| 
 | 
 | ||||||
| #define DQN_F32_MIN -FLT_MAX | #define DQN_F32_MIN   -FLT_MAX; | ||||||
|  | #define DQN_I64_MAX  INT64_MAX; | ||||||
|  | #define DQN_U64_MAX UINT64_MAX; | ||||||
| 
 | 
 | ||||||
| #define DQN_TERABYTE(val) (DQN_GIGABYTE(val) * 1024LL) | #define DQN_TERABYTE(val) (DQN_GIGABYTE(val) * 1024LL) | ||||||
| 
 | 
 | ||||||
| @ -910,6 +912,23 @@ struct DqnMemStack | |||||||
|     void             TempRegionKeepChanges(TempRegion region); |     void             TempRegionKeepChanges(TempRegion region); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | inline bool                           DqnMemStack_Init                 (DqnMemStack *me, isize size, Dqn::ZeroClear clear, u32 flags_ = 0, DqnMemAPI *const api = DQN_DEFAULT_HEAP_ALLOCATOR) { return me->Init(size, clear, flags_, api); } | ||||||
|  | inline void                          *DqnMemStack_Push                 (DqnMemStack *me, isize size, u8 alignment = 4)                                                                        { return me->Push(size, alignment); } | ||||||
|  | inline void                          *DqnMemStack_PushOnTail           (DqnMemStack *me, isize size, u8 alignment = 4)                                                                        { return me->PushOnTail(size, alignment); } | ||||||
|  | inline void                           DqnMemStack_Pop                  (DqnMemStack *me, void *const ptr, Dqn::ZeroClear clear = Dqn::ZeroClear::False)                                       { me->Pop(ptr, clear); } | ||||||
|  | inline void                           DqnMemStack_PopOnTail            (DqnMemStack *me, void *const ptr, Dqn::ZeroClear clear = Dqn::ZeroClear::False)                                       { me->PopOnTail(ptr, clear); } | ||||||
|  | inline void                           DqnMemStack_Free                 (DqnMemStack *me)                                                                                                      { me->Free(); } | ||||||
|  | inline bool                           DqnMemStack_FreeMemBlock         (DqnMemStack *me, DqnMemStack::Block *memBlock)                                                                        { return me->FreeMemBlock(memBlock); } | ||||||
|  | inline bool                           DqnMemStack_FreeLastBlock        (DqnMemStack *me)                                                                                                      { return me->FreeLastBlock(); } | ||||||
|  | inline void                           DqnMemStack_Reset                (DqnMemStack *me)                                                                                                      { me->Reset(); } | ||||||
|  | inline void                           DqnMemStack_ResetTail            (DqnMemStack *me)                                                                                                      { me->ResetTail(); } | ||||||
|  | inline void                           DqnMemStack_ClearCurrBlock       (DqnMemStack *me, Dqn::ZeroClear clear)                                                                                { me->ClearCurrBlock(clear); } | ||||||
|  | inline DqnMemStack::Info              DqnMemStack_GetInfo              (DqnMemStack *me)                                                                                                      { return me->GetInfo(); } | ||||||
|  | inline DqnMemStack::TempRegion        DqnMemStack_TempRegionBegin      (DqnMemStack *me)                                                                                                      { return me->TempRegionBegin(); } | ||||||
|  | inline void                           DqnMemStack_TempRegionEnd        (DqnMemStack *me, DqnMemStack::TempRegion region)                                                                      { me->TempRegionEnd(region); } | ||||||
|  | inline DqnMemStack::TempRegionGuard_  DqnMemStack_TempRegionGuard      (DqnMemStack *me)                                                                                                      { return me->TempRegionGuard(); } | ||||||
|  | inline void                           DqnMemStack_TempRegionKeepChanges(DqnMemStack *me, DqnMemStack::TempRegion region)                                                                      { me->TempRegionKeepChanges(region); } | ||||||
|  | 
 | ||||||
| template <typename T> | template <typename T> | ||||||
| void DqnArray<T>::Init(DqnMemAPI *const memAPI_) | void DqnArray<T>::Init(DqnMemAPI *const memAPI_) | ||||||
| { | { | ||||||
| @ -1364,6 +1383,9 @@ DQN_FILE_SCOPE inline DqnV2i &operator+=(DqnV2i &a, DqnV2i b) { return (a = DqnV | |||||||
| // =================================================================================================
 | // =================================================================================================
 | ||||||
| union DqnV3 | union DqnV3 | ||||||
| { | { | ||||||
|  |     DqnV3() = default; | ||||||
|  |     DqnV3(f32 xyz) { this->x = xyz; this->y = xyz; this->z = xyz; } | ||||||
|  | 
 | ||||||
|     struct { f32 x, y, z; }; |     struct { f32 x, y, z; }; | ||||||
|     DqnV2 xy; |     DqnV2 xy; | ||||||
|     struct { f32 r, g, b; }; |     struct { f32 r, g, b; }; | ||||||
| @ -4512,19 +4534,28 @@ DQN_FILE_SCOPE bool DqnV2i_Equals(DqnV2i a, DqnV2i b) | |||||||
| // =================================================================================================
 | // =================================================================================================
 | ||||||
| DQN_FILE_SCOPE DqnV3 DqnV3_(f32 xyz) | DQN_FILE_SCOPE DqnV3 DqnV3_(f32 xyz) | ||||||
| { | { | ||||||
| 	DqnV3 result = {xyz, xyz, xyz}; |     DqnV3 result; | ||||||
|  |     result.x = xyz; | ||||||
|  |     result.y = xyz; | ||||||
|  |     result.z = xyz; | ||||||
|     return result; |     return result; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| DQN_FILE_SCOPE DqnV3 DqnV3_(f32 x, f32 y, f32 z) | DQN_FILE_SCOPE DqnV3 DqnV3_(f32 x, f32 y, f32 z) | ||||||
| { | { | ||||||
| 	DqnV3 result = {x, y, z}; |     DqnV3 result; | ||||||
|  |     result.x = x; | ||||||
|  |     result.y = y; | ||||||
|  |     result.z = z; | ||||||
|     return result; |     return result; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| DQN_FILE_SCOPE DqnV3 DqnV3_(i32 x, i32 y, i32 z) | DQN_FILE_SCOPE DqnV3 DqnV3_(i32 x, i32 y, i32 z) | ||||||
| { | { | ||||||
| 	DqnV3 result = {(f32)x, (f32)y, (f32)z}; |     DqnV3 result; | ||||||
|  |     result.x = (f32)x; | ||||||
|  |     result.y = (f32)y; | ||||||
|  |     result.z = (f32)z; | ||||||
|     return result; |     return result; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user