Moved top() and bottom() to macros.h

This commit is contained in:
AnnaSnoeijs 2025-06-25 11:26:06 +02:00
parent 316fbbc66e
commit 8c41443935
2 changed files with 4 additions and 8 deletions

View file

@ -17,14 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
#include "logic.h" #include "logic.h"
#include "macros.h"
static int top( const int a, const int b ){
return a < b ? b : a;
}
static int bottom( const int a, const int b ){
return a < b ? a : b;
}
static int heightMask( const int a ){ static int heightMask( const int a ){
return ( 1 << a ) - 1; return ( 1 << a ) - 1;

View file

@ -1,5 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
#pragma once #pragma once
#define top( a, b ) ( a < b ? b : a )
#define bottom( a, b ) ( a < b ? a : b )
#define XSTR(s) STR(s) #define XSTR(s) STR(s)
#define STR(s) #s #define STR(s) #s