| 45 | } // namespace |
| 46 | |
| 47 | std::string GetNoteString(note_t note, int octave) { |
| 48 | using namespace std::string_literals; |
| 49 | |
| 50 | switch (note) { |
| 51 | case note_t::none: |
| 52 | return "..."s; |
| 53 | case note_t::halt: |
| 54 | return "---"s; |
| 55 | case note_t::release: |
| 56 | return "==="s; |
| 57 | case note_t::echo: |
| 58 | return "^-"s + std::to_string(octave); |
| 59 | default: |
| 60 | if (is_note(note)) |
| 61 | #ifndef AFL_FUZZ_ENABLED |
| 62 | return std::string((FTEnv.GetSettings()->Appearance.bDisplayFlats ? NOTE_NAME_FLAT : NOTE_NAME)[value_cast(note) - 1]) + std::to_string(octave); |
| 63 | #else |
| 64 | return std::string((NOTE_NAME)[value_cast(note) - 1]) + std::to_string(octave); |
| 65 | #endif |
| 66 | return "..."s; |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | std::string GetNoteString(const stChanNote ¬e) { |
| 71 | return GetNoteString(note.Note, note.Octave); |
no test coverage detected