Moved top() and bottom() to macros.h
This commit is contained in:
parent
316fbbc66e
commit
8c41443935
2 changed files with 4 additions and 8 deletions
9
logic.c
9
logic.c
|
|
@ -17,14 +17,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "logic.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;
|
||||
}
|
||||
#include "macros.h"
|
||||
|
||||
static int heightMask( const int a ){
|
||||
return ( 1 << a ) - 1;
|
||||
|
|
|
|||
3
macros.h
3
macros.h
|
|
@ -1,5 +1,8 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#pragma once
|
||||
|
||||
#define top( a, b ) ( a < b ? b : a )
|
||||
#define bottom( a, b ) ( a < b ? a : b )
|
||||
|
||||
#define XSTR(s) STR(s)
|
||||
#define STR(s) #s
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue