Skip to content

Commit 9bb381e

Browse files
committedNov 26, 2020
Change typedef to normal definitions in GUI code
1 parent 868749b commit 9bb381e

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed
 

‎src/gui/guiEngine.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,22 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2929
#include "util/enriched_string.h"
3030

3131
/******************************************************************************/
32-
/* Typedefs and macros */
32+
/* Structs and macros */
3333
/******************************************************************************/
3434
/** texture layer ids */
35-
typedef enum {
35+
enum texture_layer {
3636
TEX_LAYER_BACKGROUND = 0,
3737
TEX_LAYER_OVERLAY,
3838
TEX_LAYER_HEADER,
3939
TEX_LAYER_FOOTER,
4040
TEX_LAYER_MAX
41-
} texture_layer;
41+
};
4242

43-
typedef struct {
43+
struct image_definition {
4444
video::ITexture *texture = nullptr;
4545
bool tile;
4646
unsigned int minsize;
47-
} image_definition;
47+
};
4848

4949
/******************************************************************************/
5050
/* forward declarations */

‎src/gui/guiFormSpecMenu.h

+9-9
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Client;
4141
class GUIScrollContainer;
4242
class ISoundManager;
4343

44-
typedef enum {
44+
enum FormspecFieldType {
4545
f_Button,
4646
f_Table,
4747
f_TabHeader,
@@ -53,13 +53,13 @@ typedef enum {
5353
f_HyperText,
5454
f_AnimatedImage,
5555
f_Unknown
56-
} FormspecFieldType;
56+
};
5757

58-
typedef enum {
58+
enum FormspecQuitMode {
5959
quit_mode_no,
6060
quit_mode_accept,
6161
quit_mode_cancel
62-
} FormspecQuitMode;
62+
};
6363

6464
struct TextDest
6565
{
@@ -356,7 +356,7 @@ class GUIFormSpecMenu : public GUIModalMenu
356356
JoystickController *m_joystick;
357357
bool m_show_debug = false;
358358

359-
typedef struct {
359+
struct parserData {
360360
bool explicit_size;
361361
bool real_coordinates;
362362
u8 simple_field_count;
@@ -384,16 +384,16 @@ class GUIFormSpecMenu : public GUIModalMenu
384384

385385
// used to restore table selection/scroll/treeview state
386386
std::unordered_map<std::string, GUITable::DynamicData> table_dyndata;
387-
} parserData;
387+
};
388388

389-
typedef struct {
389+
struct fs_key_pending {
390390
bool key_up;
391391
bool key_down;
392392
bool key_enter;
393393
bool key_escape;
394-
} fs_key_pendig;
394+
};
395395

396-
fs_key_pendig current_keys_pending;
396+
fs_key_pending current_keys_pending;
397397
std::string current_field_enter_pending = "";
398398
std::vector<std::string> m_hovered_item_tooltips;
399399

0 commit comments

Comments
 (0)
Please sign in to comment.