1
0
Fork 0

Maintainability: Anticipate future types

This commit is contained in:
Scott Giese 2019-12-15 16:38:45 -06:00
parent c97ad0182b
commit a14923cea0

View file

@ -20,6 +20,7 @@
#include "rnav_waypt_controller.hxx" #include "rnav_waypt_controller.hxx"
#include <cassert> #include <cassert>
#include <stdexcept>
#include <simgear/sg_inlines.h> #include <simgear/sg_inlines.h>
#include <simgear/structure/exception.hxx> #include <simgear/structure/exception.hxx>
@ -1016,6 +1017,8 @@ double HoldCtl::courseDeviationDeg() const
case HOLD_INBOUND: return "hold-inbound"; case HOLD_INBOUND: return "hold-inbound";
case HOLD_EXITING: return "hold-exiting"; case HOLD_EXITING: return "hold-exiting";
} }
throw std::domain_error("Unsupported HoldState.");
} }
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////