mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-28 01:28:30 +00:00
Prefer functions over macros.
This commit is contained in:
parent
2e6b3bdb8e
commit
3c9c4074b3
@ -65,8 +65,8 @@ long from_decimal_scale(long value, long max_value) {
|
||||
}
|
||||
|
||||
void scaled_rgb_to_scaled_hsv(long *const rgb, long *hsv) {
|
||||
long val = rgb[0] > rgb[1] ? MAX(rgb[0], rgb[2]) : MAX(rgb[1], rgb[2]);
|
||||
long cmin = rgb[0] < rgb[1] ? MIN(rgb[0], rgb[2]) : MIN(rgb[1], rgb[2]);
|
||||
long val = rgb[0] > rgb[1] ? std::max(rgb[0], rgb[2]) : std::max(rgb[1], rgb[2]);
|
||||
long cmin = rgb[0] < rgb[1] ? std::min(rgb[0], rgb[2]) : std::min(rgb[1], rgb[2]);
|
||||
long delta = val - cmin;
|
||||
|
||||
long hue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user