summaryrefslogtreecommitdiffstats
path: root/src/MuxElements.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-02-13 10:30:59 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-02-13 10:30:59 +0100
commit8ff89e414770a922e45eee829b672aceb10ea609 (patch)
treeaccdab3630119096ce4f6361942a49152bd564b3 /src/MuxElements.cpp
parentfb6ab762301d5da6b0eb3293d19cf545c4caf6ad (diff)
downloaddabmux-8ff89e414770a922e45eee829b672aceb10ea609.tar.gz
dabmux-8ff89e414770a922e45eee829b672aceb10ea609.tar.bz2
dabmux-8ff89e414770a922e45eee829b672aceb10ea609.zip
Simplify and use isProgramme where possible
Diffstat (limited to 'src/MuxElements.cpp')
-rw-r--r--src/MuxElements.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/MuxElements.cpp b/src/MuxElements.cpp
index 809f09f..b7536b6 100644
--- a/src/MuxElements.cpp
+++ b/src/MuxElements.cpp
@@ -509,26 +509,17 @@ subchannel_type_t DabService::getType(
bool DabService::isProgramme(const std::shared_ptr<dabEnsemble>& ensemble) const
{
- bool ret = false;
switch (getType(ensemble)) {
- case subchannel_type_t::DABAudio: // DAB
- ret = true;
- break;
- case subchannel_type_t::DABPlusAudio: // DABPlus
- ret = true;
- break;
+ case subchannel_type_t::DABAudio:
+ case subchannel_type_t::DABPlusAudio:
+ return true;
case subchannel_type_t::DataDmb:
case subchannel_type_t::Packet:
- ret = false;
- break;
+ return false;
default:
- etiLog.log(error,
- "Error, unknown service type: %u",
- getType(ensemble));
- throw runtime_error("DabService::isProgramme unknown service type");
+ etiLog.log(error, "Error, unknown service type: %u", getType(ensemble));
+ throw logic_error("DabService::isProgramme unknown service type");
}
-
- return ret;
}