Skip to content

Commit

Permalink
chore: 消除 Dev-C++ 设置严格遵循 ISO C++ 时的部分警告
Browse files Browse the repository at this point in the history
  • Loading branch information
yixy-only committed Jul 23, 2024
1 parent 1ed83bf commit 08a6a5c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
38 changes: 19 additions & 19 deletions include/ege.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,13 @@ enum initmode_flag
INIT_UNICODE = 0x20, // equal to setunicodecharmessage(true)
INIT_HIDE = 0x40,
INIT_WITHLOGO = 0x100,
INIT_ANIMATION = INIT_DEFAULT | INIT_RENDERMANUAL | INIT_NOFORCEEXIT,
INIT_ANIMATION = INIT_DEFAULT | INIT_RENDERMANUAL | INIT_NOFORCEEXIT
};

enum rendermode_e
{
RENDER_AUTO,
RENDER_MANUAL,
RENDER_MANUAL
};

/* graphresult error return codes */
Expand Down Expand Up @@ -252,7 +252,7 @@ enum graphics_errors
grOutOfMemory = 0x13,
grNullPointer = 0x14,
grAllocError = 0x15,
grInvalidMemory = 0xCDCDCDCD,
grInvalidMemory = 0xCDCDCDCD
};

enum message_event
Expand All @@ -262,14 +262,14 @@ enum message_event
MSG_EVENT_CLICK = 0x01,
MSG_EVENT_DBCLICK = 0x02,
MSG_EVENT_MOVE = 0x04,
MSG_EVENT_WHEEL = 0x10,
MSG_EVENT_WHEEL = 0x10
};

enum message_mouse
{
MSG_MOUSE_LEFT = 0x01,
MSG_MOUSE_RIGHT = 0x02,
MSG_MOUSE_MID = 0x04,
MSG_MOUSE_MID = 0x04
};


Expand All @@ -281,7 +281,7 @@ typedef unsigned int color_t;
enum alpha_type
{
ALPHATYPE_STRAIGHT = 0,
ALPHATYPE_PREMULTIPLIED = 1,
ALPHATYPE_PREMULTIPLIED = 1
};

struct ege_point
Expand Down Expand Up @@ -448,7 +448,7 @@ enum COLORS
WHITE = EGERGB(0xFF, 0xFF, 0xFF),
WHITESMOKE = EGERGB(0xF5, 0xF5, 0xF5),
YELLOW = EGERGB(0xFF, 0xFF, 0x00),
YELLOWGREEN = EGERGB(0x9A, 0xCD, 0x32),
YELLOWGREEN = EGERGB(0x9A, 0xCD, 0x32)
};

/* Line styles for get/setlinestyle */
Expand All @@ -459,7 +459,7 @@ enum line_styles
DOTTED_LINE = PS_DOT,
DASHED_LINE = PS_DASHDOT,
NULL_LINE = PS_NULL,
USERBIT_LINE = PS_USERSTYLE, /* User defined line style */
USERBIT_LINE = PS_USERSTYLE /* User defined line style */
};

struct line_style_type
Expand All @@ -473,14 +473,14 @@ enum line_cap_type
{
LINECAP_FLAT = 0,
LINECAP_SQUARE,
LINECAP_ROUND,
LINECAP_ROUND
};

enum line_join_type
{
LINEJOIN_MITER = 0,
LINEJOIN_BEVEL,
LINEJOIN_ROUND,
LINEJOIN_ROUND
};

/* Fill patterns for get/set fillstyle */
Expand All @@ -505,7 +505,7 @@ enum fill_mode
{
FILLMODE_DEFAULT = 0,
FILLMODE_ALTERNATE = 1,
FILLMODE_WINDING = 2,
FILLMODE_WINDING = 2
};

/* Horizontal and vertical justification for settextjustify */
Expand Down Expand Up @@ -534,7 +534,7 @@ enum font_styles
FONTSTYLE_BOLD = 1,
FONTSTYLE_ITALIC = 2,
FONTSTYLE_UNDERLINE = 4,
FONTSTYLE_STRIKEOUT = 8,
FONTSTYLE_STRIKEOUT = 8
};

enum music_state_flag
Expand All @@ -545,7 +545,7 @@ enum music_state_flag
MUSIC_MODE_PLAY = 0x20E,
MUSIC_MODE_STOP = 0x20D,
MUSIC_MODE_OPEN = 0x212,
MUSIC_MODE_SEEK = 0x210,
MUSIC_MODE_SEEK = 0x210
};

#define MUSIC_ERROR 0xFFFFFFFF
Expand All @@ -559,7 +559,7 @@ enum key_msg_flag
KEYMSG_CHAR = 0x40000,
KEYMSG_DOWN = 0x10000,
KEYMSG_UP = 0x20000,
KEYMSG_FIRSTDOWN = 0x80000,
KEYMSG_FIRSTDOWN = 0x80000
};

enum key_code_e
Expand Down Expand Up @@ -688,21 +688,21 @@ enum key_code_e
key_rbrace = 0xdd,
key_quote = 0xde,

key_ime_process = 0xe5,
key_ime_process = 0xe5
};

enum key_msg_e
{
key_msg_down = 1,
key_msg_up = 2,
key_msg_char = 4,
key_msg_char = 4
};

enum key_flag_e
{
key_flag_shift = 0x100,
key_flag_ctrl = 0x200,
key_flag_first_down = 0x80000,
key_flag_first_down = 0x80000
};

struct key_msg
Expand All @@ -717,7 +717,7 @@ enum mouse_msg_e
mouse_msg_down = 0x10,
mouse_msg_up = 0x20,
mouse_msg_move = 0x40,
mouse_msg_wheel = 0x80,
mouse_msg_wheel = 0x80
};

enum mouse_flag_e
Expand All @@ -726,7 +726,7 @@ enum mouse_flag_e
mouse_flag_right = 2,
mouse_flag_mid = 4,
mouse_flag_shift = 0x100,
mouse_flag_ctrl = 0x200,
mouse_flag_ctrl = 0x200
};

struct mouse_msg
Expand Down
8 changes: 4 additions & 4 deletions include/ege/egecontrolbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PushTarget
} egecontrolbase_preinit_obj; \
enum inherit_e \
{ \
inherit_level_e = parent::inherit_level_e + 1, \
inherit_level_e = parent::inherit_level_e + 1 \
}; \
static void firstinit(ege::egeControlBase* This) \
{ \
Expand Down Expand Up @@ -61,18 +61,18 @@ class egeControlBase
COPY = SRCCOPY,
XOR = SRCINVERT,
AND = SRCAND,
OR = SRCPAINT,
OR = SRCPAINT
};

enum blendmode_e
{
SOLIDCOPY = 0,
ALPHABLEND = 1,
ALPHABLEND = 1
};

enum inherit_e
{
inherit_level_e = 0,
inherit_level_e = 0
};

egeControlBase();
Expand Down

0 comments on commit 08a6a5c

Please sign in to comment.