mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-06 13:14:21 +01:00
Common: refactors time formatting to use a shared buffer and utility macro
This commit is contained in:
+1
-11
@@ -15,6 +15,7 @@
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
|
||||
#include "util/arrayUtils.h"
|
||||
#include "util/FFstrbuf.h"
|
||||
#include "util/FFlist.h"
|
||||
#include "util/platform/FFPlatform.h"
|
||||
@@ -24,17 +25,6 @@
|
||||
#include "options/display.h"
|
||||
#include "options/general.h"
|
||||
|
||||
#ifdef __has_builtin
|
||||
#if __has_builtin(__is_array)
|
||||
#define ARRAY_SIZE(x) ({ static_assert(__is_array(__typeof__(x)), "Must be an array"); (uint32_t) (sizeof(x) / sizeof(*(x))); })
|
||||
#elif __has_builtin(__builtin_types_compatible_p)
|
||||
#define ARRAY_SIZE(x) ({ static_assert(!__builtin_types_compatible_p(__typeof__(x), __typeof__(&*(x))), "Must not be a pointer"); (uint32_t) (sizeof(x) / sizeof(*(x))); })
|
||||
#endif
|
||||
#endif
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(x) ((uint32_t) (sizeof(x) / sizeof(*(x))))
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct FFconfig
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user