Codechange: rename byte to uint8_t (#12308)

This commit is contained in:
Patric Stout
2024-03-16 23:59:32 +01:00
committed by GitHub
parent bd7120bae4
commit a3cfd23cf9
355 changed files with 1654 additions and 1656 deletions

View File

@@ -213,8 +213,8 @@ void DoPaletteAnimations()
/* Radio tower blinking */
{
byte i = (palette_animation_counter >> 1) & 0x7F;
byte v;
uint8_t i = (palette_animation_counter >> 1) & 0x7F;
uint8_t v;
if (i < 0x3f) {
v = 255;
@@ -300,7 +300,7 @@ TextColour GetContrastColour(uint8_t background, uint8_t threshold)
*/
struct ColourGradients
{
using ColourGradient = std::array<byte, SHADE_END>;
using ColourGradient = std::array<uint8_t, SHADE_END>;
static inline std::array<ColourGradient, COLOUR_END> gradient{};
};
@@ -311,7 +311,7 @@ struct ColourGradients
* @param shade Shade level from 1 to 7.
* @returns palette index of colour.
*/
byte GetColourGradient(Colours colour, ColourShade shade)
uint8_t GetColourGradient(Colours colour, ColourShade shade)
{
return ColourGradients::gradient[colour % COLOUR_END][shade % SHADE_END];
}
@@ -322,7 +322,7 @@ byte GetColourGradient(Colours colour, ColourShade shade)
* @param shade Shade level from 1 to 7.
* @param palette_index Palette index to set.
*/
void SetColourGradient(Colours colour, ColourShade shade, byte palette_index)
void SetColourGradient(Colours colour, ColourShade shade, uint8_t palette_index)
{
assert(colour < COLOUR_END);
assert(shade < SHADE_END);