mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-09 05:25:01 +00:00
Adds exceptions for bad enumeration values.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "IntermediateShader.hpp"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
|
||||
@@ -21,6 +22,9 @@ std::string IntermediateShader::get_input_name(Input input) {
|
||||
case Input::OutputStart: return "outputStart";
|
||||
case Input::Ends: return "ends";
|
||||
case Input::PhaseTimeAndAmplitude: return "phaseTimeAndAmplitude";
|
||||
|
||||
// Intended to be unreachable.
|
||||
default: assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "OutputShader.hpp"
|
||||
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <sstream>
|
||||
|
||||
@@ -17,6 +18,9 @@ std::string OutputShader::get_input_name(Input input) {
|
||||
switch(input) {
|
||||
case Input::Horizontal: return "horizontal";
|
||||
case Input::Vertical: return "vertical";
|
||||
|
||||
// Intended to be unreachable.
|
||||
default: assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user