Promote switch-exhaustiveness diagnostic to an error on pure libraries (MSVC + GCC/Clang)
MSVC's C4062 is off by default and GCC/Clang's -Wswitch only warns without -Werror; this repo sets no -Wall/-Werror anywhere. /we4062 and -Werror=switch now cover both, scoped to pure libraries only.
This commit is contained in:
@@ -199,9 +199,10 @@ bool isLiveDeckParam(DeckParam id) {
|
||||
case DeckParam::kFilterTrigAttackCurve:
|
||||
case DeckParam::kFilterTrigDecayCurve:
|
||||
return true;
|
||||
// Listed rather than defaulted so a newly added control is a COMPILE error here (the
|
||||
// -Wswitch gate is GCC/Clang; MSVC's C4062 is off at this project's warning level)
|
||||
// instead of silently defaulting to non-live. Reasons live in the header.
|
||||
// Listed rather than defaulted so a newly added control is a COMPILE error here on
|
||||
// every toolchain — /we4062 on MSVC, -Werror=switch on GCC/Clang, both set on this
|
||||
// library alone in cmake/reasampler_targets.cmake — instead of silently defaulting
|
||||
// to non-live. Reasons live in the header.
|
||||
case DeckParam::kPlayMode:
|
||||
case DeckParam::kPitchEngine:
|
||||
case DeckParam::kTrigLength:
|
||||
|
||||
Reference in New Issue
Block a user