55
66#include " core/afv/audio/receiversampleprovider.h"
77
8- #include < QDebug>
98#include < QStringBuilder>
109
1110#include " misc/logmessage.h"
@@ -65,9 +64,8 @@ namespace swift::core::afv::audio
6564
6665 int CReceiverSampleProvider::activeCallsigns () const
6766 {
68- const int numberOfCallsigns =
69- static_cast <int >(std::count_if (m_voiceInputs.begin (), m_voiceInputs.end (),
70- [](const CCallsignSampleProvider *p) { return p->inUse () == true ; }));
67+ const int numberOfCallsigns = static_cast <int >(std::count_if (
68+ m_voiceInputs.begin (), m_voiceInputs.end (), [](const CCallsignSampleProvider *p) { return p->inUse (); }));
7169 return numberOfCallsigns;
7270 }
7371
@@ -92,11 +90,9 @@ namespace swift::core::afv::audio
9290
9391 if (m_doClickWhenAppropriate && numberOfInUseInputs == 0 )
9492 {
95- CResourceSoundSampleProvider *resourceSound =
96- new CResourceSoundSampleProvider (Samples::instance ().click (), m_mixer);
93+ auto *resourceSound = new CResourceSoundSampleProvider (Samples::instance ().click (), m_mixer);
9794 m_mixer->addMixerInput (resourceSound);
9895 m_doClickWhenAppropriate = false ;
99- // CLogMessage(this).debug(u"AFV Click...");
10096 }
10197
10298 // ! \todo KB 2020-04 not entirely correct, as it can be the number is the same, but changed callsign
@@ -132,7 +128,7 @@ namespace swift::core::afv::audio
132128 if (!voiceInput)
133129 {
134130 it = std::find_if (m_voiceInputs.begin (), m_voiceInputs.end (),
135- [](const CCallsignSampleProvider *p) { return p->inUse () == false ; });
131+ [](const CCallsignSampleProvider *p) { return ! p->inUse (); });
136132 if (it != m_voiceInputs.end ())
137133 {
138134 voiceInput = *it;
@@ -162,7 +158,7 @@ namespace swift::core::afv::audio
162158 if (!voiceInput)
163159 {
164160 it = std::find_if (m_voiceInputs.begin (), m_voiceInputs.end (),
165- [](const CCallsignSampleProvider *p) { return p->inUse () == false ; });
161+ [](const CCallsignSampleProvider *p) { return ! p->inUse (); });
166162 if (it != m_voiceInputs.end ())
167163 {
168164 voiceInput = *it;
0 commit comments