Merge "Clean up the code to build successfully on macOS" into devel/master
[platform/core/uifw/dali-core.git] / dali / internal / event / common / property-notification-manager.cpp
index 235fbd4..b879923 100644 (file)
  *
  */
 
-// INTERNAL INCLUDES
+// CLASS HEADER
 #include <dali/internal/event/common/property-notification-manager.h>
+
+// INTERNAL INCLUDES
 #include <dali/internal/event/common/property-notification-impl.h>
+#include <dali/internal/common/message.h>
 
 namespace Dali
 {
@@ -30,27 +33,25 @@ PropertyNotificationManager* PropertyNotificationManager::New()
   return new PropertyNotificationManager;
 }
 
-PropertyNotificationManager::~PropertyNotificationManager()
-{
-}
+PropertyNotificationManager::~PropertyNotificationManager() = default;
 
 void PropertyNotificationManager::PropertyNotificationCreated( PropertyNotification& propertyNotification )
 {
-  mPropertyNotifications.insert( &propertyNotification );
+  mPropertyNotifications.PushBack( &propertyNotification );
 }
 
 void PropertyNotificationManager::PropertyNotificationDestroyed( PropertyNotification& propertyNotification )
 {
-  std::set< PropertyNotification* >::iterator iter = std::find( mPropertyNotifications.begin(), mPropertyNotifications.end(), &propertyNotification );
-  DALI_ASSERT_ALWAYS( iter != mPropertyNotifications.end() && "PropertyNotification not found" );
+  Dali::Vector< PropertyNotification* >::Iterator iter = std::find( mPropertyNotifications.Begin(), mPropertyNotifications.End(), &propertyNotification );
+  DALI_ASSERT_ALWAYS( iter != mPropertyNotifications.End() && "PropertyNotification not found" );
 
-  mPropertyNotifications.erase( iter );
+  mPropertyNotifications.Remove( iter );
 }
 
 void PropertyNotificationManager::NotifyProperty( SceneGraph::PropertyNotification* propertyNotification, bool validity )
 {
-  std::set< PropertyNotification* >::iterator iter = mPropertyNotifications.begin();
-  std::set< PropertyNotification* >::iterator endIter = mPropertyNotifications.end();
+  Dali::Vector< PropertyNotification* >::Iterator iter = mPropertyNotifications.Begin();
+  const Dali::Vector< PropertyNotification* >::Iterator endIter = mPropertyNotifications.End();
 
   // walk the collection of PropertyNotifications
   for( ; iter != endIter; ++iter )
@@ -58,7 +59,7 @@ void PropertyNotificationManager::NotifyProperty( SceneGraph::PropertyNotificati
     // found one with the matching SceneGraph::PropertyNotification?
     if( (*iter)->CompareSceneObject( propertyNotification ) )
     {
-      // allow application to access the value that triggered this emit incase of NotifyOnChanged mode
+      // allow application to access the value that triggered this emit incase of NOTIFY_ON_CHANGED mode
       (*iter)->SetNotifyResult(validity);
       // yes..emit signal
       (*iter)->EmitSignalNotify();
@@ -67,9 +68,7 @@ void PropertyNotificationManager::NotifyProperty( SceneGraph::PropertyNotificati
   }
 }
 
-PropertyNotificationManager::PropertyNotificationManager()
-{
-}
+PropertyNotificationManager::PropertyNotificationManager() = default;
 
 } // namespace Internal