aboutsummaryrefslogtreecommitdiffstats
path: root/src/common.h
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-03-05 19:30:05 +0100
committerMattias Andrée <m@maandree.se>2025-03-05 19:30:05 +0100
commit6e51f46781346a86d4862936ba8b7fa75ae58126 (patch)
tree91204d219102ae86d72c51f06011ffdec0fc5ed1 /src/common.h
parentCleanup and style update (avoid typedef) (diff)
downloadredshift-ng-6e51f46781346a86d4862936ba8b7fa75ae58126.tar.gz
redshift-ng-6e51f46781346a86d4862936ba8b7fa75ae58126.tar.bz2
redshift-ng-6e51f46781346a86d4862936ba8b7fa75ae58126.tar.xz
Nicer X macros
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/common.h b/src/common.h
index 895fedc..2633c83 100644
--- a/src/common.h
+++ b/src/common.h
@@ -158,19 +158,19 @@ struct location_provider {
};
-#define LIST_RAMPS_STOP_VALUE_TYPES\
- X(u8, uint8_t, UINT8_MAX + 1ULL, UINT8_MAX, 8)\
- X(u16, uint16_t, UINT16_MAX + 1ULL, UINT16_MAX, 16)\
- X(u32, uint32_t, UINT32_MAX + 1ULL, UINT32_MAX, 32)\
- X(u64, uint64_t, UINT64_MAX, UINT64_MAX, 64)\
- X(float, float, 1, 1, -1)\
+#define LIST_RAMPS_STOP_VALUE_TYPES(X, D)\
+ X(u8, uint8_t, UINT8_MAX + 1ULL, UINT8_MAX, 8) D\
+ X(u16, uint16_t, UINT16_MAX + 1ULL, UINT16_MAX, 16) D\
+ X(u32, uint32_t, UINT32_MAX + 1ULL, UINT32_MAX, 32) D\
+ X(u64, uint64_t, UINT64_MAX, UINT64_MAX, 64) D\
+ X(float, float, 1, 1, -1) D\
X(double, double, 1, 1, -2)
#define X(SUFFIX, TYPE, MAX, TRUE_MAX, DEPTH)\
void colorramp_fill_##SUFFIX(TYPE *gamma_r, TYPE *gamma_g, TYPE *gamma_b,\
size_t size_r, size_t size_g, size_t size_b,\
- const struct color_setting *setting);
-LIST_RAMPS_STOP_VALUE_TYPES
+ const struct color_setting *setting)
+LIST_RAMPS_STOP_VALUE_TYPES(X, ;);
#undef X