diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-07-24 16:29:52 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-07-24 16:29:52 +0200 |
commit | 7dbb538a3ea139c0f8eecb06e260628572994496 (patch) | |
tree | 45c62cf37240001f144602ab00e75ae0df5d3a32 /src/fig | |
parent | bdde4ddf6963eed59d6830ca648edf3548ed7d7d (diff) | |
download | dabmux-7dbb538a3ea139c0f8eecb06e260628572994496.tar.gz dabmux-7dbb538a3ea139c0f8eecb06e260628572994496.tar.bz2 dabmux-7dbb538a3ea139c0f8eecb06e260628572994496.zip |
Minor FIGCarousel cleanup
Diffstat (limited to 'src/fig')
-rw-r--r-- | src/fig/FIGCarousel.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/fig/FIGCarousel.cpp b/src/fig/FIGCarousel.cpp index bfd87c8..415f197 100644 --- a/src/fig/FIGCarousel.cpp +++ b/src/fig/FIGCarousel.cpp @@ -44,7 +44,8 @@ void FIGCarouselElement::reduce_deadline() deadline -= 24; //ms if (deadline < 0) { - etiLog.level(debug) << "Could not respect repetition rate for FIG " << + etiLog.level(debug) << + "Could not respect repetition rate for FIG " << fig->name() << " (" << deadline << "ms late)"; } } @@ -187,17 +188,18 @@ size_t FIGCarousel::carousel( FIBAllocation fibix; - if (fib == 0) { - fibix = FIBAllocation::FIB0; - } - else if (fib == 1) { - fibix = FIBAllocation::FIB1; - } - else if (fib == 2) { - fibix = FIBAllocation::FIB2; - } - else { - throw std::invalid_argument("FIGCarousel::carousel called with invalid fib"); + switch (fib) { + case 0: + fibix = FIBAllocation::FIB0; + break; + case 1: + fibix = FIBAllocation::FIB1; + break; + case 2: + fibix = FIBAllocation::FIB2; + break; + default: + throw std::invalid_argument("FIGCarousel::carousel called with invalid fib"); } // Create our list of FIGs to consider for this FIB |