diff options
author | Ryan <fauxpark@gmail.com> | 2020-09-27 04:42:40 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-26 19:42:40 +0100 |
commit | c16ee227843dbdb23907fec50fdcad327aa359d7 (patch) | |
tree | 8e0743fe37f5d2899fbcb485a61b17b4c28bc107 | |
parent | 1b7101f0654a4e6afd3998117bc5c040f86bb776 (diff) |
`setrgb()`: Use arrow operator (#10451)
-rw-r--r-- | keyboards/mxss/rgblight.c | 14 | ||||
-rw-r--r-- | quantum/rgblight.c | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/keyboards/mxss/rgblight.c b/keyboards/mxss/rgblight.c index ec4d70e17c..130945857f 100644 --- a/keyboards/mxss/rgblight.c +++ b/keyboards/mxss/rgblight.c @@ -110,9 +110,9 @@ extern LED_TYPE fleds[2]; hs_set fled_hs[2]; void copyrgb(LED_TYPE *src, LED_TYPE *dst) { - (*dst).r = (*src).r; - (*dst).g = (*src).g; - (*dst).b = (*src).b; + dst->r = src->r; + dst->g = src->g; + dst->b = src->b; } void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) { @@ -145,11 +145,11 @@ void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { sethsv_raw(hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, led1); } void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { - (*led1).r = r; - (*led1).g = g; - (*led1).b = b; + led1->r = r; + led1->g = g; + led1->b = b; #ifdef RGBW - (*led1).w = 0; + led1->w = 0; #endif } diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 211ec975a6..76bb6eb8cb 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -132,11 +132,11 @@ void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { sethsv_raw(hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, led1); } void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { - (*led1).r = r; - (*led1).g = g; - (*led1).b = b; + led1->r = r; + led1->g = g; + led1->b = b; #ifdef RGBW - (*led1).w = 0; + led1->w = 0; #endif } |