Trace use scope macro instead of begin-end
[platform/core/uifw/dali-core.git] / dali / internal / event / common / notification-manager.cpp
index 4764ed7..d20ec05 100644 (file)
@@ -170,24 +170,27 @@ void NotificationManager::ProcessMessages()
   const MessageContainer::Iterator end  = mImpl->eventMessageQueue.End();
   if(iter != end)
   {
-    DALI_TRACE_BEGIN(gTraceFilter, "DALI_PROCESS_NOTIFICATION_MESSAGE");
+    DALI_TRACE_SCOPE(gTraceFilter, "DALI_NOTIFICATION_PROCESS_MESSAGE");
     for(; iter != end; ++iter)
     {
       (*iter)->Process(0u /*ignored*/);
     }
-    DALI_TRACE_END(gTraceFilter, "DALI_PROCESS_NOTIFICATION_MESSAGE");
   }
   // release the processed messages from event side queue
   mImpl->eventMessageQueue.Clear();
 
   InterfaceContainer::Iterator       iter2 = mImpl->eventInterfaceQueue.Begin();
   const InterfaceContainer::Iterator end2  = mImpl->eventInterfaceQueue.End();
-  for(; iter2 != end2; ++iter2)
+  if(iter2 != end2)
   {
-    CompleteNotificationInterface* interface = *iter2;
-    if(interface)
+    DALI_TRACE_SCOPE(gTraceFilter, "DALI_NOTIFICATION_NOTIFY_COMPLETED");
+    for(; iter2 != end2; ++iter2)
     {
-      interface->NotifyCompleted();
+      CompleteNotificationInterface* interface = *iter2;
+      if(interface)
+      {
+        interface->NotifyCompleted();
+      }
     }
   }
   // just clear the container, we dont own the objects