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