mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-29 09:44:52 +01:00
Use enum type that guarantee to support its values
By default enumerators use type `int` which can store values up to `1 << 31 - 1`. The clang compiler generates this error for enums values that use the sign bit: `enumerator value is not representable in the underlying type 'int'.` To get rid of those warnings (and technically improve the code) the erroneous enums are now of type of `uint32`. Note: I've skipped peep.h to prevent conflicts with the peep refactor branch.
This commit is contained in:
committed by
Michael Steenbeek
parent
d240233671
commit
bf4f68fe33
@@ -15,6 +15,7 @@
|
||||
#pragma endregion
|
||||
|
||||
#include <algorithm>
|
||||
#include "../common.h"
|
||||
#include "../config/Config.h"
|
||||
#include "../drawing/Drawing.h"
|
||||
#include "../interface/Viewport.h"
|
||||
@@ -24,7 +25,8 @@
|
||||
#include "../util/Util.h"
|
||||
#include "TTF.h"
|
||||
|
||||
enum {
|
||||
enum : uint32
|
||||
{
|
||||
TEXT_DRAW_FLAG_INSET = 1 << 0,
|
||||
TEXT_DRAW_FLAG_OUTLINE = 1 << 1,
|
||||
TEXT_DRAW_FLAG_DARK = 1 << 2,
|
||||
|
||||
Reference in New Issue
Block a user