mirror of
https://github.com/Decompollaborate/rabbitizer.git
synced 2024-12-27 12:16:07 +00:00
clang tidy
This commit is contained in:
parent
502fe43959
commit
b2d6385e2d
@ -84,7 +84,7 @@ typedef enum RabTrinaryValue {
|
||||
#define RABUTILS_BUFFER_ADVANCE(buffer, totalSize, expression) \
|
||||
do { \
|
||||
size_t __tempSize = (size_t)(expression); \
|
||||
if (buffer != NULL) { \
|
||||
if ((buffer) != NULL) { \
|
||||
(buffer) += __tempSize; \
|
||||
} \
|
||||
(totalSize) += __tempSize; \
|
||||
@ -92,7 +92,7 @@ typedef enum RabTrinaryValue {
|
||||
|
||||
#define RABUTILS_BUFFER_WRITE_CHAR(buffer, totalSize, character) \
|
||||
do { \
|
||||
if (buffer != NULL) { \
|
||||
if ((buffer) != NULL) { \
|
||||
*(buffer) = (character); \
|
||||
} \
|
||||
RABUTILS_BUFFER_ADVANCE(buffer, totalSize, 1); \
|
||||
@ -113,13 +113,12 @@ typedef enum RabTrinaryValue {
|
||||
#define RABUTILS_BUFFER_CPY(buffer, totalSize, string) \
|
||||
do { \
|
||||
size_t _tempSize = strlen(string); \
|
||||
if (buffer != NULL) { \
|
||||
if ((buffer) != NULL) { \
|
||||
memcpy(buffer, string, _tempSize); \
|
||||
} \
|
||||
RABUTILS_BUFFER_ADVANCE(buffer, totalSize, _tempSize); \
|
||||
} while (0)
|
||||
|
||||
|
||||
CONST NODISCARD
|
||||
int32_t RabbitizerUtils_From2Complement(uint32_t number, int bits);
|
||||
NON_NULL(1)
|
||||
|
Loading…
Reference in New Issue
Block a user