[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2024-05-22 10:15:49 +00:00
parent 1b567c5f66
commit 44d70b8b25
3 changed files with 4 additions and 5 deletions

View File

@ -9,6 +9,7 @@ The contents of this file are hereby released in the public domain (CC0)
Full text of the CC0 license:
https://creativecommons.org/publicdomain/zero/1.0/
"""
from __future__ import annotations
import struct

View File

@ -31,12 +31,12 @@ typedef struct {
#define BIT_MASK(bit_count) ((1 << (bit_count)) - 1)
#define SET_BITS(target, bit_offset, bit_count, value) \
target |= (((value)&BIT_MASK(bit_count)) << (bit_offset))
target |= (((value) & BIT_MASK(bit_count)) << (bit_offset))
#define GET_BITS(source, bit_offset, bit_count) \
((source) & (BIT_MASK(bit_count) << (bit_offset))) >> (bit_offset)
#define SWAP(TYPE, A, B) \
do { \
TYPE TMP = A; \
(A) = B; \
(B) = TMP; \
(A) = B; \
(B) = TMP; \
} while (0)

View File

@ -15,8 +15,6 @@
#include "Bcn.h"
#define LOAD16(p) (p)[0] | ((p)[1] << 8)
#define LOAD32(p) (p)[0] | ((p)[1] << 8) | ((p)[2] << 16) | ((p)[3] << 24)