Remove unused object creation

This commit is contained in:
Scott Giese
2019-12-15 02:39:43 -06:00
parent 1619df97f8
commit eb1afec22b
+5 -2
View File
@@ -32,20 +32,23 @@ class TestThreadRecipient : public simgear::Emesary::IReceiver
public: public:
TestThreadRecipient() : receiveCount(0) TestThreadRecipient() : receiveCount(0)
{ {
} }
std::atomic<int> receiveCount; std::atomic<int> receiveCount;
virtual simgear::Emesary::ReceiptStatus Receive(simgear::Emesary::INotification &n) virtual simgear::Emesary::ReceiptStatus Receive(simgear::Emesary::INotification &n)
{ {
if (n.GetType() == (const char*)this) if (n.GetType() == (const char*)this)
{ {
TestThreadNotification *tn = dynamic_cast<TestThreadNotification *>(&n); // Unused: TestThreadNotification *tn = dynamic_cast<TestThreadNotification *>(&n);
receiveCount++; receiveCount++;
TestThreadNotification onwardNotification("AL"); TestThreadNotification onwardNotification("AL");
simgear::Emesary::GlobalTransmitter::instance()->NotifyAll(onwardNotification); simgear::Emesary::GlobalTransmitter::instance()->NotifyAll(onwardNotification);
return simgear::Emesary::ReceiptStatusOK; return simgear::Emesary::ReceiptStatusOK;
} }
return simgear::Emesary::ReceiptStatusOK; return simgear::Emesary::ReceiptStatusOK;
} }
}; };