wave: (fixes #2554) fix static analysis warning
This commit is contained in:
@@ -76,35 +76,19 @@ Wifi80211pHelper::EnableLogComponents (void)
|
||||
NetDeviceContainer
|
||||
Wifi80211pHelper::Install (const WifiPhyHelper &phyHelper, const WifiMacHelper &macHelper, NodeContainer c) const
|
||||
{
|
||||
bool isWaveMacHelper = false;
|
||||
try
|
||||
QosWaveMacHelper const * qosMac = dynamic_cast <QosWaveMacHelper const *> (&macHelper);
|
||||
if (qosMac == 0)
|
||||
{
|
||||
const QosWaveMacHelper& qosMac = dynamic_cast<const QosWaveMacHelper&> (macHelper);
|
||||
isWaveMacHelper = true;
|
||||
NS_UNUSED (qosMac);
|
||||
}
|
||||
catch (const std::bad_cast &)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
const NqosWaveMacHelper& nqosMac = dynamic_cast<const NqosWaveMacHelper&> (macHelper);
|
||||
isWaveMacHelper = true;
|
||||
NqosWaveMacHelper const * nqosMac = dynamic_cast <NqosWaveMacHelper const *> (&macHelper);
|
||||
if (nqosMac == 0)
|
||||
{
|
||||
NS_FATAL_ERROR ("the macHelper should be either QosWaveMacHelper or NqosWaveMacHelper"
|
||||
", or should be the subclass of QosWaveMacHelper or NqosWaveMacHelper");
|
||||
}
|
||||
NS_UNUSED (nqosMac);
|
||||
}
|
||||
catch (const std::bad_cast &)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
if (!isWaveMacHelper)
|
||||
{
|
||||
NS_FATAL_ERROR ("the macHelper should be either QosWaveMacHelper or NqosWaveMacHelper"
|
||||
", or should be the subclass of QosWaveMacHelper or NqosWaveMacHelper");
|
||||
}
|
||||
|
||||
NS_UNUSED (qosMac);
|
||||
return WifiHelper::Install (phyHelper, macHelper, c);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user