Skip to content

Commit 1ce7f41

Browse files
committed
avoid name collisions (max in arduino-avr)
1 parent f1e8844 commit 1ce7f41

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/jled_base.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ uint8_t lerp8by8(uint8_t val, uint8_t a, uint8_t b);
4949
uint8_t invlerp8by8(uint8_t val, uint8_t a, uint8_t b);
5050

5151
template <typename T>
52-
static constexpr T max(T a, T b) {
52+
static constexpr T __max(T a, T b) {
5353
return (a > b) ? a : b;
5454
}
5555

@@ -500,10 +500,10 @@ class TJLed {
500500
// this is where the BrightnessEvaluator object will be stored using
501501
// placment new. Set MAX_SIZE to class occupying most memory
502502
static constexpr auto MAX_SIZE =
503-
max(sizeof(CandleBrightnessEvaluator),
504-
max(sizeof(BreatheBrightnessEvaluator),
505-
max(sizeof(ConstantBrightnessEvaluator), // NOLINT
506-
sizeof(BlinkBrightnessEvaluator))));
503+
__max(sizeof(CandleBrightnessEvaluator),
504+
__max(sizeof(BreatheBrightnessEvaluator),
505+
__max(sizeof(ConstantBrightnessEvaluator), // NOLINT
506+
sizeof(BlinkBrightnessEvaluator))));
507507
alignas(alignof(
508508
CloneableBrightnessEvaluator)) char brightness_eval_buf_[MAX_SIZE];
509509

0 commit comments

Comments
 (0)