From e1cda6be1c93d171a30a80f338a6bf94260da607 Mon Sep 17 00:00:00 2001 From: Guenter Obiltschnig Date: Tue, 14 Apr 2009 11:03:48 +0000 Subject: [PATCH] updated NotificationQueue sample --- .../samples/NotificationQueue/src/NotificationQueue.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Foundation/samples/NotificationQueue/src/NotificationQueue.cpp b/Foundation/samples/NotificationQueue/src/NotificationQueue.cpp index 7e130f760..a5d103b8b 100644 --- a/Foundation/samples/NotificationQueue/src/NotificationQueue.cpp +++ b/Foundation/samples/NotificationQueue/src/NotificationQueue.cpp @@ -1,7 +1,7 @@ // // NotificationQueue.cpp // -// $Id: //poco/svn/Foundation/samples/NotificationQueue/src/NotificationQueue.cpp#1 $ +// $Id: //poco/Main/Foundation/samples/NotificationQueue/src/NotificationQueue.cpp#12 $ // // This sample demonstrates the NotificationQueue, ThreadPool, // FastMutex and ScopedLock classes. @@ -58,6 +58,8 @@ class WorkNotification: public Notification // The notification sent to worker threads. { public: + typedef AutoPtr Ptr; + WorkNotification(int data): _data(data) { @@ -89,10 +91,10 @@ public: Random rnd; for (;;) { - AutoPtr pNf(_queue.waitDequeueNotification()); + Notification::Ptr pNf(_queue.waitDequeueNotification()); if (pNf) { - WorkNotification* pWorkNf = dynamic_cast(pNf.get()); + WorkNotification::Ptr pWorkNf = pNf.cast(); if (pWorkNf) { {