From 37b60a6aab4abb47bb052db6fb1b49fe277e4bdc Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 30 Jul 2021 19:47:14 +0200 Subject: FIC rate_increment_ms: fail instead of using randomly chosen default value --- src/fig/FIG.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/fig/FIG.cpp b/src/fig/FIG.cpp index 03f7451..e064a33 100644 --- a/src/fig/FIG.cpp +++ b/src/fig/FIG.cpp @@ -25,6 +25,7 @@ */ #include "FIG.h" +#include namespace FIC { @@ -42,7 +43,7 @@ int rate_increment_ms(FIG_rate rate) case FIG_rate::D: return 30000; case FIG_rate::E: return 120000; } - return 1000; //some default value, shouldn't be used + throw std::logic_error("Invalid FIG_rate"); } } // namespace FIC -- cgit v1.2.3