Merge pull request #1640 from rohit-n/switch-default
Silence some -Wswitch-default warnings.
This commit is contained in:
commit
d02eb3ca59
|
@ -453,7 +453,7 @@ bool FifoPlayer::ShouldLoadBP(u8 address)
|
||||||
case BPMEM_LOADTLUT1:
|
case BPMEM_LOADTLUT1:
|
||||||
case BPMEM_PERF1:
|
case BPMEM_PERF1:
|
||||||
return false;
|
return false;
|
||||||
}
|
default:
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -974,11 +974,11 @@ static unsigned ICmpInverseOp(unsigned op)
|
||||||
return ICmpSgt;
|
return ICmpSgt;
|
||||||
case ICmpSge:
|
case ICmpSge:
|
||||||
return ICmpSlt;
|
return ICmpSlt;
|
||||||
}
|
default:
|
||||||
|
|
||||||
PanicAlert("Bad opcode");
|
PanicAlert("Bad opcode");
|
||||||
return Nop;
|
return Nop;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
InstLoc IRBuilder::FoldXor(InstLoc Op1, InstLoc Op2)
|
InstLoc IRBuilder::FoldXor(InstLoc Op1, InstLoc Op2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,12 +46,8 @@ void Host_RefreshDSPDebuggerWindow() {}
|
||||||
static Common::Event updateMainFrameEvent;
|
static Common::Event updateMainFrameEvent;
|
||||||
void Host_Message(int Id)
|
void Host_Message(int Id)
|
||||||
{
|
{
|
||||||
switch (Id)
|
if (Id == WM_USER_STOP)
|
||||||
{
|
|
||||||
case WM_USER_STOP:
|
|
||||||
running = false;
|
running = false;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void* s_window_handle;
|
static void* s_window_handle;
|
||||||
|
|
|
@ -55,10 +55,11 @@ static std::string GetGLSLVersionString()
|
||||||
return "#version 140";
|
return "#version 140";
|
||||||
case GLSL_150:
|
case GLSL_150:
|
||||||
return "#version 150";
|
return "#version 150";
|
||||||
}
|
default:
|
||||||
// Shouldn't ever hit this
|
// Shouldn't ever hit this
|
||||||
return "#version ERROR";
|
return "#version ERROR";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SHADER::SetProgramVariables()
|
void SHADER::SetProgramVariables()
|
||||||
{
|
{
|
||||||
|
|
|
@ -347,9 +347,8 @@ static bool AlphaCompare(int alpha, int ref, AlphaTest::CompareMode comp)
|
||||||
case AlphaTest::GREATER: return alpha > ref;
|
case AlphaTest::GREATER: return alpha > ref;
|
||||||
case AlphaTest::EQUAL: return alpha == ref;
|
case AlphaTest::EQUAL: return alpha == ref;
|
||||||
case AlphaTest::NEQUAL: return alpha != ref;
|
case AlphaTest::NEQUAL: return alpha != ref;
|
||||||
|
default: return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool TevAlphaTest(int alpha)
|
static bool TevAlphaTest(int alpha)
|
||||||
|
@ -363,8 +362,8 @@ static bool TevAlphaTest(int alpha)
|
||||||
case 1: return comp0 || comp1; // or
|
case 1: return comp0 || comp1; // or
|
||||||
case 2: return comp0 ^ comp1; // xor
|
case 2: return comp0 ^ comp1; // xor
|
||||||
case 3: return !(comp0 ^ comp1); // xnor
|
case 3: return !(comp0 ^ comp1); // xnor
|
||||||
|
default: return true;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline s32 WrapIndirectCoord(s32 coord, int wrapMode)
|
static inline s32 WrapIndirectCoord(s32 coord, int wrapMode)
|
||||||
|
@ -385,9 +384,10 @@ static inline s32 WrapIndirectCoord(s32 coord, int wrapMode)
|
||||||
return (coord % (16 << 7));
|
return (coord % (16 << 7));
|
||||||
case ITW_0:
|
case ITW_0:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Tev::Indirect(unsigned int stageNum, s32 s, s32 t)
|
void Tev::Indirect(unsigned int stageNum, s32 s, s32 t)
|
||||||
{
|
{
|
||||||
|
|
|
@ -959,6 +959,9 @@ union AlphaTest
|
||||||
if ((comp0 == ALWAYS && comp1 == ALWAYS) || (comp0 == NEVER && comp1 == NEVER))
|
if ((comp0 == ALWAYS && comp1 == ALWAYS) || (comp0 == NEVER && comp1 == NEVER))
|
||||||
return PASS;
|
return PASS;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return UNDETERMINED;
|
||||||
}
|
}
|
||||||
return UNDETERMINED;
|
return UNDETERMINED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -571,6 +571,9 @@ void TexDecoder_DecodeTexel(u8 *dst, const u8 *src, int s, int t, int imageWidth
|
||||||
case 7:
|
case 7:
|
||||||
color = MakeRGBA(red2, green2, blue2, 0);
|
color = MakeRGBA(red2, green2, blue2, 0);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
color = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
*((u32*)dst) = color;
|
*((u32*)dst) = color;
|
||||||
|
|
Loading…
Reference in New Issue