diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-11-09 09:05:35 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-11-09 14:11:21 +0100 |
commit | 771b3c583da1574c25f5aa49c5390a66f8ac1b3e (patch) | |
tree | ec0379d410d3a24be5d8c7de8303d22131c02369 /scene/2d/joints_2d.h | |
parent | 593e35346ab182c36068c3dcfc741eeb7311a19e (diff) |
Color: Fix -Wtype-limits GCC warning after refactoring
Warning from GCC 10.2.0 with `warnings=extra`:
```
./core/math/color.h: In member function 'int32_t Color::get_r8() const':
./core/typedefs.h:107:42: error: comparison of unsigned expression in '< 0' is always false [-Werror=type-limits]
107 | #define CLAMP(m_a, m_min, m_max) (((m_a) < (m_min)) ? (m_min) : (((m_a) > (m_max)) ? m_max : m_a))
| ~~~~~~^~~~~~~~~
./core/math/color.h:201:49: note: in expansion of macro 'CLAMP'
201 | _FORCE_INLINE_ int32_t get_r8() const { return CLAMP(uint32_t(r * 255.0), 0, 255); }
| ^~~~~
```
Also some code consistency changes while at it.
Diffstat (limited to 'scene/2d/joints_2d.h')
0 files changed, 0 insertions, 0 deletions