initial commit
This commit is contained in:
parent
81af403965
commit
573e1a9fa3
220 changed files with 150440 additions and 0 deletions
21
src/algorithm.h
Normal file
21
src/algorithm.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// SPDX-FileCopyrightText: 2025 Erin Catto
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define B3_TYPE_OF( A ) decltype( A )
|
||||
#else
|
||||
#define B3_TYPE_OF( A ) __typeof__( A )
|
||||
#endif
|
||||
|
||||
#define B3_SWAP( x, y ) \
|
||||
do \
|
||||
{ \
|
||||
B3_TYPE_OF( x ) B3_SWAP_TEMP = x; \
|
||||
x = y; \
|
||||
y = B3_SWAP_TEMP; \
|
||||
} \
|
||||
while ( 0 )
|
||||
Loading…
Reference in a new issue