From 93dc8fb108d7ca3b776207cade8ae8d3f9dfd0b0 Mon Sep 17 00:00:00 2001 From: Scott Doxey Date: Tue, 3 Sep 2024 10:03:39 -0400 Subject: [PATCH] Renamed TypeCodes to avoid name collisions with structs. --- includes/RhythmGameUtilities/Enums/TypeCode.h | 16 ++++++++-------- tests/RhythmGameUtilities/Enum.cpp | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/includes/RhythmGameUtilities/Enums/TypeCode.h b/includes/RhythmGameUtilities/Enums/TypeCode.h index aa96836..159ff69 100644 --- a/includes/RhythmGameUtilities/Enums/TypeCode.h +++ b/includes/RhythmGameUtilities/Enums/TypeCode.h @@ -9,16 +9,16 @@ typedef enum TypeCode { /// BPM Marker - BPM, + BPM_Marker, /// Time Signature Marker - TimeSignature, + TimeSignatureMarker, /// Note Marker - Note, + NoteMarker, /// Event Marker - Event + EventMarker } TypeCodeType; @@ -26,13 +26,13 @@ std::string ToString(TypeCode typeCode) { switch (typeCode) { - case BPM: + case BPM_Marker: return "B"; - case TimeSignature: + case TimeSignatureMarker: return "TS"; - case Note: + case NoteMarker: return "N"; - case Event: + case EventMarker: return "E"; } } diff --git a/tests/RhythmGameUtilities/Enum.cpp b/tests/RhythmGameUtilities/Enum.cpp index f2856e2..294741a 100644 --- a/tests/RhythmGameUtilities/Enum.cpp +++ b/tests/RhythmGameUtilities/Enum.cpp @@ -28,10 +28,10 @@ void testNamedSection() void testTypeCode() { - assert(ToString(TypeCode::BPM) == "B"); - assert(ToString(TypeCode::TimeSignature) == "TS"); - assert(ToString(TypeCode::Note) == "N"); - assert(ToString(TypeCode::Event) == "E"); + assert(ToString(TypeCode::BPM_Marker) == "B"); + assert(ToString(TypeCode::TimeSignatureMarker) == "TS"); + assert(ToString(TypeCode::NoteMarker) == "N"); + assert(ToString(TypeCode::EventMarker) == "E"); std::cout << "."; }