diff options
| author | Lioncash <mathew1800@gmail.com> | 2018-06-17 16:00:48 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2018-06-17 16:02:56 -0400 |
| commit | 8459d2bc5d64cf6aecaa46398b63f2526aa292f3 (patch) | |
| tree | 076856aa4b335a0c2ed039bc82910f1847470773 /Source/Core | |
| parent | 6bfbc1988ee059205f276af3228085394c950031 (diff) | |
DSPCore: Make DSPCore_SetException() take an enum type instead of a u8
Makes it more immediately indicative which values are intended to be
passed to this function.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/DSP/DSPCore.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/Core/DSP/DSPCore.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/Core/DSP/DSPCore.cpp b/Source/Core/Core/DSP/DSPCore.cpp index 4495cf9676..f0dc4419cc 100644 --- a/Source/Core/Core/DSP/DSPCore.cpp +++ b/Source/Core/Core/DSP/DSPCore.cpp @@ -202,9 +202,9 @@ void DSPCore_Reset() Analyzer::Analyze(); } -void DSPCore_SetException(u8 level) +void DSPCore_SetException(ExceptionType exception) { - g_dsp.exceptions |= 1 << level; + g_dsp.exceptions |= 1 << exception; } // Notify that an external interrupt is pending (used by thread mode) diff --git a/Source/Core/Core/DSP/DSPCore.h b/Source/Core/Core/DSP/DSPCore.h index 712bedfc2d..d838de0b45 100644 --- a/Source/Core/Core/DSP/DSPCore.h +++ b/Source/Core/Core/DSP/DSPCore.h @@ -208,7 +208,7 @@ enum : u16 }; // Exception vectors -enum : int +enum ExceptionType : int { EXP_STOVF = 1, // 0x0002 stack under/over flow EXP_2 = 2, // 0x0004 @@ -356,7 +356,7 @@ void DSPCore_CheckExceptions(); void DSPCore_SetExternalInterrupt(bool val); // sets a flag in the pending exception register. -void DSPCore_SetException(u8 level); +void DSPCore_SetException(ExceptionType exception); enum class State { |
