Skip to content

Commit bbd3922

Browse files
committed
Changed typedef to using defines.
1 parent 9ef5a15 commit bbd3922

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

include/RhythmGameUtilities/Enums/Difficulty.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
namespace RhythmGameUtilities
66
{
77

8-
typedef enum Difficulty
9-
{
8+
using Difficulty = enum : uint8_t {
109
// Easy Difficulty
1110
Easy,
1211

@@ -18,7 +17,7 @@ typedef enum Difficulty
1817

1918
// Expert Difficulty
2019
Expert
21-
} DifficultyType;
20+
};
2221

2322
inline auto ToString(Difficulty difficulty) -> std::string
2423
{

include/RhythmGameUtilities/Enums/NamedSection.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
namespace RhythmGameUtilities
66
{
77

8-
typedef enum NamedSection
9-
{
8+
using NamedSection = enum : uint8_t {
109
/// Song information
1110
Song,
1211

@@ -15,7 +14,7 @@ typedef enum NamedSection
1514

1615
/// Track events
1716
Events
18-
} NamedSectionType;
17+
};
1918

2019
inline auto ToString(NamedSection namedSection) -> std::string
2120
{

include/RhythmGameUtilities/Enums/TypeCode.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
namespace RhythmGameUtilities
66
{
77

8-
typedef enum TypeCode
9-
{
8+
using TypeCode = enum : uint8_t {
109
/// BPM Marker
1110
BPM_Marker,
1211

@@ -18,7 +17,7 @@ typedef enum TypeCode
1817

1918
/// Event Marker
2019
EventMarker
21-
} TypeCodeType;
20+
};
2221

2322
inline auto ToString(TypeCode typeCode) -> std::string
2423
{

include/RhythmGameUtilities/Parsers.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@
1616
namespace RhythmGameUtilities
1717
{
1818

19-
typedef struct
19+
using KeyValuePairInternal = struct
2020
{
2121
char *key;
2222
char *values[10];
2323
int valueCount;
24-
} KeyValuePairInternal;
24+
};
2525

26-
typedef struct
26+
using ChartSectionInternal = struct
2727
{
2828
char *name;
2929
KeyValuePairInternal *lines;
3030
int lineCount;
31-
} ChartSectionInternal;
31+
};
3232

3333
std::regex CHART_SECTION_PATTERN(R"(\[([a-z]+)\]\s*\{([^\}]+)\})",
3434
std::regex_constants::icase);

0 commit comments

Comments
 (0)