Skip to content

Commit b89ec66

Browse files
committed
Changed enum type.
1 parent f472e16 commit b89ec66

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

include/RhythmGameUtilities/Enums/Difficulty.hpp

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

8-
typedef enum Difficulty
8+
enum class Difficulty : uint8_t
99
{
1010

1111
// Easy Difficulty
@@ -26,13 +26,13 @@ inline std::string ToString(Difficulty difficulty)
2626
{
2727
switch (difficulty)
2828
{
29-
case Easy:
29+
case Difficulty::Easy:
3030
return "Easy";
31-
case Medium:
31+
case Difficulty::Medium:
3232
return "Medium";
33-
case Hard:
33+
case Difficulty::Hard:
3434
return "Hard";
35-
case Expert:
35+
case Difficulty::Expert:
3636
return "Expert";
3737
default:
3838
return "Unknown Difficulty";

include/RhythmGameUtilities/Enums/NamedSection.hpp

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

8-
typedef enum NamedSection
8+
enum class NamedSection : uint8_t
99
{
1010
/// Song information
1111
Song,
@@ -21,11 +21,11 @@ inline std::string ToString(NamedSection namedSection)
2121
{
2222
switch (namedSection)
2323
{
24-
case Song:
24+
case NamedSection::Song:
2525
return "Song";
26-
case SyncTrack:
26+
case NamedSection::SyncTrack:
2727
return "SyncTrack";
28-
case Events:
28+
case NamedSection::Events:
2929
return "Events";
3030
default:
3131
return "Unknown NamedSection";

include/RhythmGameUtilities/Enums/TypeCode.hpp

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

8-
typedef enum TypeCode
8+
enum class TypeCode : uint8_t
99
{
1010

1111
/// BPM Marker
@@ -26,13 +26,13 @@ inline std::string ToString(TypeCode typeCode)
2626
{
2727
switch (typeCode)
2828
{
29-
case BPM_Marker:
29+
case TypeCode::BPM_Marker:
3030
return "B";
31-
case TimeSignatureMarker:
31+
case TypeCode::TimeSignatureMarker:
3232
return "TS";
33-
case NoteMarker:
33+
case TypeCode::NoteMarker:
3434
return "N";
35-
case EventMarker:
35+
case TypeCode::EventMarker:
3636
return "E";
3737
default:
3838
return "Unknown TypeCode";

0 commit comments

Comments
 (0)