use modern construct 'nullptr' instead of 'NULL' or '0' 21/243521/2
authorSubhransu Mohanty <sub.mohanty@samsung.com>
Tue, 8 Sep 2020 01:47:59 +0000 (10:47 +0900)
committerSubhransu Mohanty <sub.mohanty@samsung.com>
Tue, 8 Sep 2020 01:54:36 +0000 (10:54 +0900)
This patch is auto generated by clang-tidy with modernize-use-nullptr check.

Change-Id: Iafb79e884e79ec02ebdf32ea687f519aceb1f4dc

100 files changed:
dali/devel-api/scripting/scripting.h
dali/integration-api/bitmap.cpp
dali/integration-api/bitmap.h
dali/integration-api/core.cpp
dali/integration-api/debug.cpp
dali/internal/common/blending-options.cpp
dali/internal/common/fixed-size-memory-pool.cpp
dali/internal/common/memory-pool-object-allocator.h
dali/internal/common/message-buffer.cpp
dali/internal/common/message-buffer.h
dali/internal/event/actors/actor-impl.cpp
dali/internal/event/actors/camera-actor-impl.cpp
dali/internal/event/actors/layer-impl.cpp
dali/internal/event/actors/layer-list.cpp
dali/internal/event/animation/animation-impl.cpp
dali/internal/event/animation/constraint-base.cpp
dali/internal/event/animation/constraint-source-impl.h
dali/internal/event/animation/key-frames-impl.cpp
dali/internal/event/common/object-registry-impl.cpp
dali/internal/event/common/projection.cpp
dali/internal/event/common/property-metadata.h
dali/internal/event/common/property-notification-impl.cpp
dali/internal/event/common/stage-impl.cpp
dali/internal/event/common/type-info-impl.cpp
dali/internal/event/effects/shader-factory.cpp
dali/internal/event/events/actor-gesture-data.cpp
dali/internal/event/events/hit-test-algorithm-impl.cpp
dali/internal/event/events/hover-event-processor.cpp
dali/internal/event/events/long-press-gesture/long-press-gesture-processor.cpp
dali/internal/event/events/pinch-gesture/pinch-gesture-processor.cpp
dali/internal/event/events/rotation-gesture/rotation-gesture-processor.cpp
dali/internal/event/events/tap-gesture/tap-gesture-processor.cpp
dali/internal/event/events/touch-event-processor.cpp
dali/internal/event/images/bitmap-packed-pixel.cpp
dali/internal/event/images/bitmap-packed-pixel.h
dali/internal/event/images/pixel-data-impl.cpp
dali/internal/event/render-tasks/render-task-impl.cpp
dali/internal/event/rendering/frame-buffer-impl.cpp
dali/internal/event/rendering/geometry-impl.cpp
dali/internal/event/rendering/renderer-impl.cpp
dali/internal/event/rendering/sampler-impl.cpp
dali/internal/event/rendering/texture-impl.cpp
dali/internal/event/rendering/texture-set-impl.cpp
dali/internal/event/rendering/vertex-buffer-impl.cpp
dali/internal/render/common/render-instruction.cpp
dali/internal/render/common/render-item.cpp
dali/internal/render/common/render-list.h
dali/internal/render/common/render-manager.cpp
dali/internal/render/common/render-tracker.cpp
dali/internal/render/data-providers/render-data-provider.cpp
dali/internal/render/gl-resources/frame-buffer-state-cache.cpp
dali/internal/render/queue/render-queue.cpp
dali/internal/render/renderers/render-geometry.cpp
dali/internal/render/renderers/render-renderer.cpp
dali/internal/render/renderers/render-texture.cpp
dali/internal/render/renderers/render-vertex-buffer.cpp
dali/internal/render/shaders/program-controller.cpp
dali/internal/render/shaders/program.cpp
dali/internal/render/shaders/scene-graph-shader.cpp
dali/internal/update/common/property-condition-functions.cpp
dali/internal/update/common/property-condition-step-functions.cpp
dali/internal/update/common/property-condition-variable-step-functions.cpp
dali/internal/update/common/scene-graph-property-notification.cpp
dali/internal/update/common/uniform-map.cpp
dali/internal/update/common/uniform-map.h
dali/internal/update/gestures/scene-graph-pan-gesture.cpp
dali/internal/update/manager/render-instruction-processor.cpp
dali/internal/update/manager/render-instruction-processor.h
dali/internal/update/manager/render-task-processor.cpp
dali/internal/update/manager/transform-manager-property.h
dali/internal/update/manager/update-manager.cpp
dali/internal/update/manager/update-proxy-impl.cpp
dali/internal/update/nodes/node.cpp
dali/internal/update/nodes/node.h
dali/internal/update/nodes/scene-graph-layer.cpp
dali/internal/update/nodes/scene-graph-layer.h
dali/internal/update/queue/update-message-queue.cpp
dali/internal/update/render-tasks/scene-graph-camera.cpp
dali/internal/update/render-tasks/scene-graph-render-task-list.cpp
dali/internal/update/render-tasks/scene-graph-render-task.cpp
dali/internal/update/rendering/scene-graph-renderer.cpp
dali/internal/update/rendering/scene-graph-texture-set.cpp
dali/public-api/actors/custom-actor-impl.cpp
dali/public-api/actors/custom-actor-impl.h
dali/public-api/animation/alpha-function.cpp
dali/public-api/animation/constraint.h
dali/public-api/common/dali-vector.cpp
dali/public-api/common/intrusive-ptr.h
dali/public-api/images/native-image-interface.h
dali/public-api/math/random.h
dali/public-api/object/any.cpp
dali/public-api/object/any.h
dali/public-api/object/base-handle.cpp
dali/public-api/object/property-input.h
dali/public-api/object/property-map.cpp
dali/public-api/render-tasks/render-task.cpp
dali/public-api/rendering/texture-set.cpp
dali/public-api/signals/base-signal.cpp
dali/public-api/signals/callback.cpp
dali/public-api/signals/signal-slot-connections.cpp

index 3ebf6c8..c2f79d2 100644 (file)
@@ -226,7 +226,7 @@ const char* GetEnumerationName( T value, const StringEnum* table, uint32_t table
       }
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 /**
@@ -248,7 +248,7 @@ const char * GetLinearEnumerationName( T value, const StringEnum* table, uint32_
   {
     return table[value].string;
   }
-  return NULL;
+  return nullptr;
 }
 
 /**
index 3f50e12..794be95 100644 (file)
@@ -476,7 +476,7 @@ Bitmap* Bitmap::New( const Profile profile = BITMAP_2D_PACKED_PIXELS,
       return new Dali::Internal::BitmapCompressed( discardable );
     }
   }
-  return 0;
+  return nullptr;
 }
 
 
@@ -494,7 +494,7 @@ Bitmap::Bitmap( ResourcePolicy::Discardable discardable, Dali::Integration::Pixe
 PixelBuffer* Bitmap::GetBufferOwnership()
 {
   PixelBuffer* buffer = mData;
-  mData = NULL;
+  mData = nullptr;
   return buffer;
 }
 
@@ -521,7 +521,7 @@ void Bitmap::DeletePixelBuffer()
     return;
   }
   free ( mData );
-  mData = NULL;
+  mData = nullptr;
 }
 
 
index 80083b1..0b49ebd 100644 (file)
@@ -59,7 +59,7 @@ protected:
    * @param[in] discardable Flag to tell the bitmap if it can delete the buffer with the pixel data.
    * @param[in] pixBuf External buffer of pixel data or null.
    */
-  Bitmap( ResourcePolicy::Discardable discardable = ResourcePolicy::OWNED_RETAIN, Dali::Integration::PixelBuffer* pixBuf = 0 );
+  Bitmap( ResourcePolicy::Discardable discardable = ResourcePolicy::OWNED_RETAIN, Dali::Integration::PixelBuffer* pixBuf = nullptr );
 
   /**
    * Initializes internal class members
@@ -279,11 +279,11 @@ public:
   /**
    * Get interface to features that are active only if the Bitmap was created
    * with a BITMAP_2D_PACKED_PIXELS profile. */
-  virtual const PackedPixelsProfile* GetPackedPixelsProfile() const { return 0; }
+  virtual const PackedPixelsProfile* GetPackedPixelsProfile() const { return nullptr; }
   /**
    * Get interface to features that are active only if the Bitmap was created
    * with a BITMAP_2D_PACKED_PIXELS profile. */
-  virtual PackedPixelsProfile* GetPackedPixelsProfile() { return 0; }
+  virtual PackedPixelsProfile* GetPackedPixelsProfile() { return nullptr; }
 
   /**@}*/ ///< End of packed pixel features.
 
@@ -319,8 +319,8 @@ public:
     virtual ~CompressedProfile() {}
   };
 
-  virtual const CompressedProfile* GetCompressedProfile() const { return 0; }
-  virtual CompressedProfile* GetCompressedProfile() { return 0; }
+  virtual const CompressedProfile* GetCompressedProfile() const { return nullptr; }
+  virtual CompressedProfile* GetCompressedProfile() { return nullptr; }
   /**@}*/
 
 
index fffe519..ecac451 100644 (file)
@@ -154,7 +154,7 @@ ObjectRegistry Core::GetObjectRegistry() const
 }
 
 Core::Core()
-: mImpl( NULL )
+: mImpl( nullptr )
 {
 }
 
index 3eda626..7e635d5 100644 (file)
@@ -236,9 +236,9 @@ TraceObj::~TraceObj()
 std::string ArgListToString(const char *format, va_list args)
 {
   std::string str; // empty string
-  if(format != NULL)
+  if(format != nullptr)
   {
-    char* buffer = NULL;
+    char* buffer = nullptr;
     int err = vasprintf(&buffer, format, args);
     if(err >= 0) // No error
     {
index b682fc4..d2255fa 100644 (file)
@@ -241,7 +241,7 @@ namespace Internal
 
 BlendingOptions::BlendingOptions()
 : mBitmask( 0u ),
-  mBlendColor( NULL )
+  mBlendColor( nullptr )
 {
   SetBlendFunc( BlendFactor::SRC_ALPHA, BlendFactor::ONE_MINUS_SRC_ALPHA,
                 BlendFactor::ONE,       BlendFactor::ONE_MINUS_SRC_ALPHA );
@@ -316,7 +316,7 @@ void BlendingOptions::SetBlendColor( const Vector4& color )
 {
   if( Color::TRANSPARENT == color )
   {
-    mBlendColor = NULL;
+    mBlendColor = nullptr;
   }
   else
   {
index 5da3ad0..29723b1 100644 (file)
@@ -51,7 +51,7 @@ struct FixedSizeMemoryPool::Impl
      * @param size The size of the memory block to allocate in bytes. Must be non-zero.
      */
     Block( SizeType size )
-    : nextBlock( NULL )
+    : nextBlock( nullptr )
 #ifdef DEBUG_ENABLED
       ,mBlockSize( size )
 #endif
@@ -87,7 +87,7 @@ struct FixedSizeMemoryPool::Impl
      mCurrentBlock( &mMemoryBlocks ),
      mCurrentBlockCapacity( initialCapacity ),
      mCurrentBlockSize( 0 ),
-     mDeletedObjects( NULL )
+     mDeletedObjects( nullptr )
   {
     // We need enough room to store the deleted list in the data
     DALI_ASSERT_DEBUG( mFixedSize >= sizeof( void* ) );
index 0a9f70e..96d729b 100644 (file)
@@ -43,7 +43,7 @@ public:
    * @brief Constructor
    */
   MemoryPoolObjectAllocator()
-  : mPool( NULL )
+  : mPool( nullptr )
   {
     ResetMemoryPool();
   }
index 2933619..5893f91 100644 (file)
@@ -50,8 +50,8 @@ namespace Internal
 
 MessageBuffer::MessageBuffer( std::size_t initialCapacity )
 : mInitialCapacity( initialCapacity / WORD_SIZE ),
-  mData( NULL ),
-  mNextSlot( NULL ),
+  mData( nullptr ),
+  mNextSlot( nullptr ),
   mCapacity( 0 ),
   mSize( 0 )
 {
@@ -112,7 +112,7 @@ MessageBuffer::Iterator MessageBuffer::Begin() const
     return Iterator( mData );
   }
 
-  return Iterator( NULL );
+  return Iterator( nullptr );
 }
 
 void MessageBuffer::Reset()
@@ -145,7 +145,7 @@ void MessageBuffer::IncreaseCapacity( std::size_t newCapacity )
   {
     mData = reinterpret_cast<WordType*>( malloc( newCapacity * WORD_SIZE ) );
   }
-  DALI_ASSERT_ALWAYS( NULL != mData );
+  DALI_ASSERT_ALWAYS( nullptr != mData );
 
   mCapacity = newCapacity;
   mNextSlot = mData + mSize;
@@ -155,7 +155,7 @@ MessageBuffer::Iterator::Iterator(WordType* current)
 : mCurrent(current),
   mMessageSize(0)
 {
-  if( NULL != mCurrent )
+  if( nullptr != mCurrent )
   {
     // The first word is the size of the following object
     mMessageSize = *mCurrent++;
index fc14928..c8cb1bc 100644 (file)
@@ -82,7 +82,7 @@ public:
     // Inlined for performance
     WordType* Get()
     {
-      return ( 0 != mMessageSize ) ? mCurrent : NULL;
+      return ( 0 != mMessageSize ) ? mCurrent : nullptr;
     }
 
     // Inlined for performance
index 70fce36..4911842 100644 (file)
@@ -462,7 +462,7 @@ Dali::Layer Actor::GetLayer()
   }
 
   // Find the immediate Layer parent
-  for( Actor* parent = mParent; !layer && parent != NULL; parent = parent->GetParent() )
+  for( Actor* parent = mParent; !layer && parent != nullptr; parent = parent->GetParent() )
   {
     if( parent->IsLayer() )
     {
@@ -549,7 +549,7 @@ void Actor::Remove( Actor& child )
       mChildren->erase( iter );
 
       DALI_ASSERT_DEBUG( actor->GetParent() == this );
-      actor->SetParent( NULL );
+      actor->SetParent( nullptr );
 
       break;
     }
@@ -582,7 +582,7 @@ void Actor::Unparent()
 
 uint32_t Actor::GetChildCount() const
 {
-  return ( NULL != mChildren ) ? static_cast<uint32_t>( mChildren->size() ) : 0; // only 4,294,967,295 children per actor
+  return ( nullptr != mChildren ) ? static_cast<uint32_t>( mChildren->size() ) : 0; // only 4,294,967,295 children per actor
 }
 
 ActorPtr Actor::GetChildAt( uint32_t index ) const
@@ -594,7 +594,7 @@ ActorPtr Actor::GetChildAt( uint32_t index ) const
 
 ActorPtr Actor::FindChildByName( const std::string& actorName )
 {
-  ActorPtr child = 0;
+  ActorPtr child = nullptr;
   if( actorName == mName )
   {
     child = this;
@@ -617,7 +617,7 @@ ActorPtr Actor::FindChildByName( const std::string& actorName )
 
 ActorPtr Actor::FindChildById( const uint32_t id )
 {
-  ActorPtr child = 0;
+  ActorPtr child = nullptr;
   if( id == GetId() )
   {
     child = this;
@@ -1810,7 +1810,7 @@ ActorGestureData& Actor::GetGestureData()
 {
   // Likely scenario is that once gesture-data is created for this actor, the actor will require
   // that gesture for its entire life-time so no need to destroy it until the actor is destroyed
-  if( NULL == mGestureData )
+  if( nullptr == mGestureData )
   {
     mGestureData = new ActorGestureData;
   }
@@ -2009,13 +2009,13 @@ bool Actor::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tra
 Actor::Actor( DerivedType derivedType, const SceneGraph::Node& node )
 : Object( &node ),
   mScene( nullptr ),
-  mParent( NULL ),
-  mChildren( NULL ),
-  mRenderers( NULL ),
-  mParentOrigin( NULL ),
-  mAnchorPoint( NULL ),
-  mRelayoutData( NULL ),
-  mGestureData( NULL ),
+  mParent( nullptr ),
+  mChildren( nullptr ),
+  mRenderers( nullptr ),
+  mParentOrigin( nullptr ),
+  mAnchorPoint( nullptr ),
+  mRelayoutData( nullptr ),
+  mGestureData( nullptr ),
   mTouchedSignal(),
   mHoveredSignal(),
   mWheelEventSignal(),
@@ -2075,7 +2075,7 @@ Actor::~Actor()
     ActorConstIter endIter = mChildren->end();
     for( ActorIter iter = mChildren->begin(); iter != endIter; ++iter )
     {
-      (*iter)->SetParent( NULL );
+      (*iter)->SetParent( nullptr );
     }
   }
   delete mChildren;
@@ -3300,7 +3300,7 @@ void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::In
 
 const PropertyBase* Actor::GetSceneObjectAnimatableProperty( Property::Index index ) const
 {
-  const PropertyBase* property( NULL );
+  const PropertyBase* property( nullptr );
 
   switch( index )
   {
@@ -3364,7 +3364,7 @@ const PropertyBase* Actor::GetSceneObjectAnimatableProperty( Property::Index ind
 
 const PropertyInputImpl* Actor::GetSceneObjectInputProperty( Property::Index index ) const
 {
-  const PropertyInputImpl* property( NULL );
+  const PropertyInputImpl* property( nullptr );
 
   switch( index )
   {
@@ -3518,9 +3518,9 @@ void Actor::SetParent( Actor* parent )
   }
   else // parent being set to NULL
   {
-    DALI_ASSERT_ALWAYS( mParent != NULL && "Actor should have a parent" );
+    DALI_ASSERT_ALWAYS( mParent != nullptr && "Actor should have a parent" );
 
-    mParent = NULL;
+    mParent = nullptr;
 
     if ( EventThreadServices::IsCoreRunning() && // Don't emit signals or send messages during Core destruction
          OnScene() )
index f73497a..fecea3c 100644 (file)
@@ -153,7 +153,7 @@ CameraActorPtr CameraActor::New( const Size& size )
 
 CameraActor::CameraActor( const SceneGraph::Node& node )
 : Actor( Actor::BASIC, node ),
-  mSceneObject( NULL ),
+  mSceneObject( nullptr ),
   mTarget( SceneGraph::Camera::DEFAULT_TARGET_POSITION ),
   mType( SceneGraph::Camera::DEFAULT_TYPE ),
   mProjectionMode( SceneGraph::Camera::DEFAULT_MODE ),
@@ -754,7 +754,7 @@ Property::Value CameraActor::GetDefaultPropertyCurrentValue( Property::Index ind
 
 const PropertyInputImpl* CameraActor::GetSceneObjectInputProperty( Property::Index index ) const
 {
-  const PropertyInputImpl* property( NULL );
+  const PropertyInputImpl* property( nullptr );
 
   switch( index )
   {
index be09fd9..dfb3011 100644 (file)
@@ -126,7 +126,7 @@ LayerPtr Layer::NewRoot( LayerList& layerList )
 
 Layer::Layer( Actor::DerivedType type, const SceneGraph::Layer& layer )
 : Actor( type, layer ),
-  mLayerList( NULL ),
+  mLayerList( nullptr ),
   mClippingBox( 0, 0, 0, 0 ),
   mSortFunction( Layer::ZValue ),
   mBehavior( Dali::Layer::LAYER_UI ),
@@ -337,7 +337,7 @@ void Layer::OnSceneConnectionInternal()
     DALI_ASSERT_DEBUG( NULL == mLayerList );
 
     // Find the ordered layer-list
-    for ( Actor* parent = mParent; parent != NULL; parent = parent->GetParent() )
+    for ( Actor* parent = mParent; parent != nullptr; parent = parent->GetParent() )
     {
       if( parent->IsLayer() )
       {
@@ -356,7 +356,7 @@ void Layer::OnSceneDisconnectionInternal()
   mLayerList->UnregisterLayer(*this);
 
   // mLayerList is only valid when on-stage
-  mLayerList = NULL;
+  mLayerList = nullptr;
 }
 
 const SceneGraph::Layer& Layer::GetSceneGraphLayer() const
index 8364a33..e378101 100644 (file)
@@ -236,7 +236,7 @@ void LayerList::MoveLayerBelow( const Layer& layer, const Layer& target )
 
 LayerList::LayerList( SceneGraph::UpdateManager& updateManager )
 : mUpdateManager( updateManager ),
-  mRoot( NULL )
+  mRoot( nullptr )
 {
 }
 
index 279874b..92791da 100644 (file)
@@ -156,7 +156,7 @@ AnimationPtr Animation::New(float durationSeconds)
 }
 
 Animation::Animation( EventThreadServices& eventThreadServices, AnimationPlaylist& playlist, float durationSeconds, EndAction endAction, EndAction disconnectAction, AlphaFunction defaultAlpha )
-: mAnimation( NULL ),
+: mAnimation( nullptr ),
   mEventThreadServices( eventThreadServices ),
   mPlaylist( playlist ),
   mFinishedSignal(),
@@ -214,11 +214,11 @@ void Animation::CreateSceneObject()
 
 void Animation::DestroySceneObject()
 {
-  if ( mAnimation != NULL )
+  if ( mAnimation != nullptr )
   {
     // Remove animation using a message to the update manager
     RemoveAnimationMessage( mEventThreadServices.GetUpdateManager(), *mAnimation );
-    mAnimation = NULL;
+    mAnimation = nullptr;
   }
 }
 
index c70b251..69b6929 100644 (file)
@@ -57,7 +57,7 @@ inline void AddUnique( SceneGraph::PropertyOwnerContainer& propertyOwners, Scene
 ConstraintBase::ConstraintBase( Object& object, Property::Index targetPropertyIndex, SourceContainer& sources )
 : mEventThreadServices( EventThreadServices::Get() ),
   mTargetObject( &object ),
-  mSceneGraphConstraint( NULL ),
+  mSceneGraphConstraint( nullptr ),
   mSources( sources ),
   mObservedObjects(),
   mTargetPropertyIndex( targetPropertyIndex ),
@@ -94,7 +94,7 @@ void ConstraintBase::AddSource( Source source )
   // Observe the object providing this property
   if ( OBJECT_PROPERTY == source.sourceType )
   {
-    if ( source.object != NULL )
+    if ( source.object != nullptr )
     {
       ObserveObject( *source.object );
     }
@@ -141,7 +141,7 @@ void ConstraintBase::RemoveInternal()
         // Remove from scene-graph
         RemoveConstraintMessage( GetEventThreadServices(), propertyOwner, *(mSceneGraphConstraint) );
         // mSceneGraphConstraint will be deleted in update-thread, remove dangling pointer
-        mSceneGraphConstraint = NULL;
+        mSceneGraphConstraint = nullptr;
       }
     }
   }
@@ -185,7 +185,7 @@ uint32_t ConstraintBase::GetTag() const
 void ConstraintBase::SceneObjectAdded( Object& object )
 {
   if ( mApplied &&
-       ( NULL == mSceneGraphConstraint ) &&
+       ( nullptr == mSceneGraphConstraint ) &&
        mTargetObject )
   {
     ConnectConstraint();
@@ -208,7 +208,7 @@ void ConstraintBase::SceneObjectRemoved( Object& object )
     }
 
     // mSceneGraphConstraint will be deleted in update-thread, remove dangling pointer
-    mSceneGraphConstraint = NULL;
+    mSceneGraphConstraint = nullptr;
   }
 }
 
@@ -229,8 +229,8 @@ void ConstraintBase::ObjectDestroyed( Object& object )
   mSources.clear();
 
   // Discard all object & scene-graph pointers
-  mSceneGraphConstraint = NULL;
-  mTargetObject = NULL;
+  mSceneGraphConstraint = nullptr;
+  mTargetObject = nullptr;
 }
 
 void ConstraintBase::ObserveObject( Object& object )
index 2747102..88c0eab 100644 (file)
@@ -44,7 +44,7 @@ struct Source
   Source()
   : sourceType( OBJECT_PROPERTY ),
     propertyIndex( Property::INVALID_INDEX ),
-    object( NULL )
+    object( nullptr )
   {
   }
 
@@ -56,7 +56,7 @@ struct Source
   Source( Dali::ConstraintSource& source )
   : sourceType( source.sourceType ),
     propertyIndex( source.propertyIndex ),
-    object( NULL )
+    object( nullptr )
   {
     if ( source.object )
     {
index ac1bd93..1e89e0f 100644 (file)
@@ -30,7 +30,7 @@ KeyFrames* KeyFrames::New()
 
 KeyFrames::KeyFrames()
   : mType(Property::NONE),
-    mKeyFrames(NULL)
+    mKeyFrames(nullptr)
 {
 }
 
index f2ca897..8ef38e1 100644 (file)
@@ -41,7 +41,7 @@ namespace
 const char* const SIGNAL_OBJECT_CREATED =   "objectCreated";
 const char* const SIGNAL_OBJECT_DESTROYED = "objectDestroyed";
 
-TypeRegistration mType( typeid( Dali::ObjectRegistry ), typeid( Dali::BaseHandle ), NULL );
+TypeRegistration mType( typeid( Dali::ObjectRegistry ), typeid( Dali::BaseHandle ), nullptr );
 
 SignalConnectorType signalConnector1( mType, SIGNAL_OBJECT_CREATED,   &ObjectRegistry::DoConnectSignal );
 SignalConnectorType signalConnector2( mType, SIGNAL_OBJECT_DESTROYED, &ObjectRegistry::DoConnectSignal );
index ffdd632..a89746f 100644 (file)
@@ -86,8 +86,8 @@ bool UnprojectFull( const Vector4& windowPos,
 
 bool XyPlaneIntersect( const Vector4& pointA, const Vector4& pointB, Vector4& intersect )
 {
-  const Vector4* near = NULL;
-  const Vector4* far = NULL;
+  const Vector4* near = nullptr;
+  const Vector4* far = nullptr;
 
   if ( pointA.z > 0.0f && pointB.z < 0.0f )
   {
index 432122e..e2d5ce2 100644 (file)
@@ -71,7 +71,7 @@ public:
    */
   bool IsAnimatable( void ) const
   {
-    return NULL != mSceneGraphProperty;
+    return nullptr != mSceneGraphProperty;
   }
 
   /**
@@ -285,7 +285,7 @@ public:
   CustomPropertyMetadata( const std::string& propertyName,
                           const Property::Value& propertyValue,
                           Property::AccessMode accessMode )
-  : PropertyMetadata( propertyValue, NULL, ( accessMode != Property::READ_ONLY ) ),
+  : PropertyMetadata( propertyValue, nullptr, ( accessMode != Property::READ_ONLY ) ),
     name( propertyName ),
     key( Property::INVALID_KEY ),
     childPropertyIndex( Property::INVALID_INDEX )
index 33222bf..15515b0 100644 (file)
@@ -62,7 +62,7 @@ PropertyNotification::PropertyNotification( UpdateManager& updateManager,
                                             int componentIndex,
                                             const Dali::PropertyCondition& condition )
 : mUpdateManager( updateManager ),
-  mPropertyNotification( NULL ),
+  mPropertyNotification( nullptr ),
   mPropertyNotificationManager( propertyNotificationManager ),
   mObjectPropertyIndex( target.propertyIndex ),
   mPropertyType( Property::NONE ),
@@ -229,11 +229,11 @@ void PropertyNotification::CreateSceneObject()
 
 void PropertyNotification::DestroySceneObject()
 {
-  if ( mPropertyNotification != NULL )
+  if ( mPropertyNotification != nullptr )
   {
     // Remove PropertyNotification using a message to the update manager
     RemovePropertyNotificationMessage( mUpdateManager, *mPropertyNotification );
-    mPropertyNotification = NULL;
+    mPropertyNotification = nullptr;
   }
 }
 
index f05b3f5..beae510 100644 (file)
@@ -71,7 +71,7 @@ const char* const SIGNAL_CONTEXT_LOST =              "contextLost";
 const char* const SIGNAL_CONTEXT_REGAINED =          "contextRegained";
 const char* const SIGNAL_SCENE_CREATED =             "sceneCreated";
 
-TypeRegistration mType( typeid(Dali::Stage), typeid(Dali::BaseHandle), NULL );
+TypeRegistration mType( typeid(Dali::Stage), typeid(Dali::BaseHandle), nullptr );
 
 SignalConnectorType signalConnector1( mType, SIGNAL_KEY_EVENT,                 &Stage::DoConnectSignal );
 SignalConnectorType signalConnector2( mType, SIGNAL_EVENT_PROCESSING_FINISHED, &Stage::DoConnectSignal );
@@ -101,7 +101,7 @@ void Stage::Initialize( Scene& scene )
 
 StagePtr Stage::GetCurrent()
 {
-  StagePtr stage( NULL );
+  StagePtr stage( nullptr );
   // no checking in this version
   ThreadLocalStorage* tls = ThreadLocalStorage::GetInternal();
   if( tls )
index 72e470d..8fd9fb8 100644 (file)
@@ -443,7 +443,7 @@ std::string TypeInfo::GetPropertyName( Property::Index index ) const
 
 void TypeInfo::AddActionFunction( const std::string &actionName, Dali::TypeInfo::ActionFunction function )
 {
-  if( NULL == function)
+  if( nullptr == function)
   {
     DALI_LOG_WARNING("Action function is empty\n");
   }
@@ -465,7 +465,7 @@ void TypeInfo::AddActionFunction( const std::string &actionName, Dali::TypeInfo:
 
 void TypeInfo::AddConnectorFunction( const std::string& signalName, Dali::TypeInfo::SignalConnectorFunction function )
 {
-  if( NULL == function)
+  if( nullptr == function)
   {
     DALI_LOG_WARNING("Connector function is empty\n");
   }
@@ -489,7 +489,7 @@ void TypeInfo::AddProperty( const std::string& name, Property::Index index, Prop
 {
   // The setter can be empty as a property can be read-only.
 
-  if ( NULL == getFunc )
+  if ( nullptr == getFunc )
   {
     DALI_ASSERT_ALWAYS( ! "GetProperty Function is empty" );
   }
@@ -514,7 +514,7 @@ void TypeInfo::AddProperty( const std::string& name, Property::Index index, Prop
 
   // The setter can be empty as a property can be read-only.
 
-  if ( NULL == getFunc )
+  if ( nullptr == getFunc )
   {
     DALI_ASSERT_ALWAYS( ! "GetProperty Function is empty" );
   }
index 13fda26..59832f9 100644 (file)
@@ -98,7 +98,7 @@ ShaderDataPtr ShaderFactory::Load( const std::string& vertexSource, const std::s
   }
 
   // If memory cache failed check the file system for a binary or return a source-only ShaderData:
-  if( shaderData.Get() == NULL )
+  if( shaderData.Get() == nullptr )
   {
     // Allocate the structure that returns the loaded shader:
     shaderData = new ShaderData( vertexSource, fragmentSource, hints );
index 24cc051..d35ce10 100644 (file)
@@ -48,7 +48,7 @@ void ActorGestureData::AddGestureDetector( GestureDetector& detector )
   const GestureType::Value type( detector.GetType() );
 
   GestureDetectorContainer*& containerPtr( GetContainerPtr( type ) );
-  if ( NULL == containerPtr )
+  if ( nullptr == containerPtr )
   {
     containerPtr = new GestureDetectorContainer;
   }
@@ -73,7 +73,7 @@ void ActorGestureData::RemoveGestureDetector( GestureDetector& detector )
   {
     gesturesRequired = GestureType::Value( gesturesRequired & ~type );
     delete containerPtr;
-    containerPtr = NULL;
+    containerPtr = nullptr;
   }
 }
 
@@ -113,7 +113,7 @@ GestureDetectorContainer*& ActorGestureData::GetContainerPtr( GestureType::Value
   }
 
   DALI_ASSERT_DEBUG( ! "Invalid Type" );
-  static GestureDetectorContainer* invalidType( NULL );
+  static GestureDetectorContainer* invalidType( nullptr );
   return invalidType;
 }
 
index 943c6cd..c71195f 100644 (file)
@@ -46,7 +46,7 @@ namespace
 struct HitActor
 {
   HitActor()
-  : actor( NULL ),
+  : actor( nullptr ),
     distance( std::numeric_limits<float>::max() ),
     depth( std::numeric_limits<int>::min() )
   {
index 64e969f..ac1d1af 100644 (file)
@@ -222,9 +222,9 @@ void HoverEventProcessor::ProcessHoverEvent( const Integration::HoverEvent& even
       AllocAndEmitHoverSignals( event.time, hoverStartConsumedActorHandle, currentPoint );
     }
 
-    mLastPrimaryHitActor.SetActor( NULL );
-    mLastConsumedActor.SetActor( NULL );
-    mHoverStartConsumedActor.SetActor( NULL );
+    mLastPrimaryHitActor.SetActor( nullptr );
+    mLastConsumedActor.SetActor( nullptr );
+    mHoverStartConsumedActor.SetActor( nullptr );
     mLastRenderTask.Reset();
 
     return; // No need for hit testing
@@ -355,8 +355,8 @@ void HoverEventProcessor::ProcessHoverEvent( const Integration::HoverEvent& even
 
   if ( primaryPointState == PointState::FINISHED )
   {
-    mLastPrimaryHitActor.SetActor( NULL );
-    mLastConsumedActor.SetActor( NULL );
+    mLastPrimaryHitActor.SetActor( nullptr );
+    mLastConsumedActor.SetActor( nullptr );
     mLastRenderTask.Reset();
   }
   else
@@ -373,15 +373,15 @@ void HoverEventProcessor::ProcessHoverEvent( const Integration::HoverEvent& even
       }
       else
       {
-        mLastConsumedActor.SetActor( NULL );
+        mLastConsumedActor.SetActor( nullptr );
       }
 
       mLastRenderTask = currentRenderTask;
     }
     else
     {
-      mLastPrimaryHitActor.SetActor( NULL );
-      mLastConsumedActor.SetActor( NULL );
+      mLastPrimaryHitActor.SetActor( nullptr );
+      mLastConsumedActor.SetActor( nullptr );
       mLastRenderTask.Reset();
     }
   }
@@ -411,7 +411,7 @@ void HoverEventProcessor::ProcessHoverEvent( const Integration::HoverEvent& even
           primaryPoint.SetState( primaryPointState );
         }
 
-        mHoverStartConsumedActor.SetActor( NULL );
+        mHoverStartConsumedActor.SetActor( nullptr );
       }
       // No break, Fallthrough
 
index e52e3ea..1090aab 100644 (file)
@@ -108,7 +108,7 @@ LongPressGestureProcessor::LongPressGestureProcessor()
   mCurrentRenderTask(),
   mMinTouchesRequired( 1 ),
   mMaxTouchesRequired( 1 ),
-  mCurrentLongPressEvent( NULL ),
+  mCurrentLongPressEvent( nullptr ),
   mMinimumHoldingTime( DEFAULT_MINIMUM_HOLDING_TIME )
 {
 }
@@ -150,7 +150,7 @@ void LongPressGestureProcessor::Process( Scene& scene, const LongPressGestureEve
           // Set mCurrentLongPressEvent to use inside overridden methods called from ProcessAndEmit()
           mCurrentLongPressEvent = &longPressEvent;
           ProcessAndEmit( hitTestResults );
-          mCurrentLongPressEvent = NULL;
+          mCurrentLongPressEvent = nullptr;
         }
         else
         {
index 9d5af7b..88172af 100644 (file)
@@ -108,7 +108,7 @@ PinchGestureProcessor::PinchGestureProcessor()
 : GestureProcessor( GestureType::PINCH ),
   mPinchGestureDetectors(),
   mCurrentPinchEmitters(),
-  mCurrentPinchEvent(NULL),
+  mCurrentPinchEvent(nullptr),
   mMinimumPinchDistance(-1.0f),
   mMinimumTouchEvents( MINIMUM_TOUCH_EVENTS_REQUIRED ),
   mMinimumTouchEventsAfterStart( MINIMUM_TOUCH_EVENTS_REQUIRED_AFTER_START )
@@ -188,7 +188,7 @@ void PinchGestureProcessor::Process( Scene& scene, const PinchGestureEvent& pinc
         // Set mCurrentPinchEvent to use inside overridden methods called from ProcessAndEmit()
         mCurrentPinchEvent = &pinchEvent;
         ProcessAndEmit( hitTestResults );
-        mCurrentPinchEvent = NULL;
+        mCurrentPinchEvent = nullptr;
       }
       break;
     }
index 9c6df9a..21848d7 100644 (file)
@@ -132,7 +132,7 @@ void RotationGestureProcessor::Process( Scene& scene, const RotationGestureEvent
         // Set mCurrentRotationEvent to use inside overridden methods called from ProcessAndEmit()
         mCurrentRotationEvent = &rotationEvent;
         ProcessAndEmit( hitTestResults );
-        mCurrentRotationEvent = NULL;
+        mCurrentRotationEvent = nullptr;
       }
       break;
     }
index 13a1427..e710f75 100644 (file)
@@ -81,7 +81,7 @@ TapGestureProcessor::TapGestureProcessor()
   mMaxTapsRequired( 1 ),
   mMinTouchesRequired( 1 ),
   mMaxTouchesRequired( 1 ),
-  mCurrentTapEvent( NULL ),
+  mCurrentTapEvent( nullptr ),
   mPossibleProcessed( false )
 {
 }
@@ -125,7 +125,7 @@ void TapGestureProcessor::Process( Scene& scene, const TapGestureEvent& tapEvent
           mCurrentTapEvent = &tapEvent;
           ProcessAndEmit( hitTestResults );
         }
-        mCurrentTapEvent = NULL;
+        mCurrentTapEvent = nullptr;
         mPossibleProcessed = false;
       }
       break;
index e1c8730..864ce8c 100644 (file)
@@ -420,7 +420,7 @@ bool TouchEventProcessor::ProcessTouchEvent( const Integration::TouchEvent& even
       }
       else
       {
-        mLastConsumedActor.SetActor( NULL );
+        mLastConsumedActor.SetActor( nullptr );
       }
 
       mLastRenderTask = currentRenderTask;
@@ -458,7 +458,7 @@ bool TouchEventProcessor::ProcessTouchEvent( const Integration::TouchEvent& even
           AllocAndEmitTouchSignals( event.time, touchDownConsumedActorHandle, currentPoint );
         }
 
-        mTouchDownConsumedActor.SetActor( NULL );
+        mTouchDownConsumedActor.SetActor( nullptr );
 
         DALI_FALLTHROUGH;
       }
@@ -506,7 +506,7 @@ void TouchEventProcessor::OnObservedActorDisconnected( Actor* actor )
 
     // Do not set mLastPrimaryHitActor to NULL we may be iterating through its observers
 
-    mLastConsumedActor.SetActor( NULL );
+    mLastConsumedActor.SetActor( nullptr );
     mLastRenderTask.Reset();
   }
 }
index 07536b1..a049380 100644 (file)
@@ -92,7 +92,7 @@ void BitmapPackedPixel::TestForTransparency()
   if(HasAlphaChannel())
   {
     uint8_t* pixelBuffer=GetBuffer();
-    if(pixelBuffer != NULL)
+    if(pixelBuffer != nullptr)
     {
       uint8_t* row = pixelBuffer;
 
index 3eeebdd..9c2ef69 100644 (file)
@@ -46,7 +46,7 @@ public:
    * Constructor
    * @param[in] discardable Flag to tell the bitmap if it can delete the buffer with the pixel data.
    */
-  BitmapPackedPixel( ResourcePolicy::Discardable discardable = ResourcePolicy::OWNED_RETAIN, Dali::Integration::PixelBuffer* pixBuf = 0 );
+  BitmapPackedPixel( ResourcePolicy::Discardable discardable = ResourcePolicy::OWNED_RETAIN, Dali::Integration::PixelBuffer* pixBuf = nullptr );
 
 public:
   virtual const Bitmap::PackedPixelsProfile* GetPackedPixelsProfile() const { return this; }
index 544e0d6..37c6bc2 100644 (file)
@@ -92,7 +92,7 @@ uint32_t PixelData::GetBufferSize() const
 DevelPixelData::PixelDataBuffer PixelData::ReleaseBuffer()
 {
   DevelPixelData::PixelDataBuffer pixelDataBuffer(mBuffer, mBufferSize, mReleaseFunction);
-  mBuffer = NULL;
+  mBuffer = nullptr;
   return pixelDataBuffer;
 }
 
index d20fff2..81147e4 100644 (file)
@@ -64,7 +64,7 @@ DALI_PROPERTY_TABLE_END( DEFAULT_OBJECT_PROPERTY_START_INDEX, RenderTaskDefaultP
 
 const char* const SIGNAL_FINISHED = "finished";
 
-TypeRegistration mType( typeid( Dali::RenderTask ), typeid( Dali::BaseHandle ), NULL, RenderTaskDefaultProperties );
+TypeRegistration mType( typeid( Dali::RenderTask ), typeid( Dali::BaseHandle ), nullptr, RenderTaskDefaultProperties );
 
 SignalConnectorType signalConnector1( mType, SIGNAL_FINISHED, &RenderTask::DoConnectSignal );
 
@@ -168,7 +168,7 @@ CameraActor* RenderTask::GetCameraActor() const
 void RenderTask::SetFrameBuffer( FrameBufferPtr frameBuffer )
 {
   mFrameBuffer = frameBuffer;
-  Render::FrameBuffer* renderFrameBufferPtr( NULL );
+  Render::FrameBuffer* renderFrameBufferPtr( nullptr );
   if( frameBuffer )
   {
     renderFrameBufferPtr = mFrameBuffer->GetRenderObject();
@@ -652,7 +652,7 @@ void RenderTask::OnNotifyDefaultPropertyAnimation( Animation& animation, Propert
 
 const SceneGraph::PropertyBase* RenderTask::GetSceneObjectAnimatableProperty( Property::Index index ) const
 {
-  const SceneGraph::PropertyBase* property( NULL );
+  const SceneGraph::PropertyBase* property( nullptr );
 
   switch ( index )
   {
index d7a4104..606537e 100644 (file)
@@ -41,7 +41,7 @@ Render::FrameBuffer* FrameBuffer::GetRenderObject() const
 
 FrameBuffer::FrameBuffer( uint32_t width, uint32_t height, Mask attachments )
 : mEventThreadServices( EventThreadServices::Get() ),
-  mRenderObject( NULL ),
+  mRenderObject( nullptr ),
   mColor{ nullptr },
   mDepth( nullptr ),
   mStencil( nullptr ),
index 5e7d540..cd8c900 100644 (file)
@@ -89,7 +89,7 @@ const Render::Geometry* Geometry::GetRenderObject() const
 
 Geometry::Geometry()
 : mEventThreadServices( EventThreadServices::Get() ),
-  mRenderObject( NULL ),
+  mRenderObject( nullptr ),
   mType(Dali::Geometry::TRIANGLES)
 {
 }
index c560bf4..ef47828 100644 (file)
@@ -687,7 +687,7 @@ void Renderer::OnNotifyDefaultPropertyAnimation( Animation& animation, Property:
 
 const SceneGraph::PropertyBase* Renderer::GetSceneObjectAnimatableProperty( Property::Index index ) const
 {
-  const SceneGraph::PropertyBase* property = NULL;
+  const SceneGraph::PropertyBase* property = nullptr;
 
   if( index == DevelRenderer::Property::OPACITY )
   {
index 79d1185..7b4f007 100644 (file)
@@ -37,7 +37,7 @@ SamplerPtr Sampler::New( )
 
 void Sampler::SetFilterMode( Dali::FilterMode::Type minFilter, Dali::FilterMode::Type magFilter )
 {
-  if( NULL != mRenderObject )
+  if( nullptr != mRenderObject )
   {
     SetFilterModeMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, static_cast< unsigned int >( minFilter ), static_cast< unsigned int >( magFilter ) );
   }
@@ -45,7 +45,7 @@ void Sampler::SetFilterMode( Dali::FilterMode::Type minFilter, Dali::FilterMode:
 
 void Sampler::SetWrapMode( Dali::WrapMode::Type rWrap, Dali::WrapMode::Type sWrap, Dali::WrapMode::Type tWrap )
 {
-  if( NULL != mRenderObject )
+  if( nullptr != mRenderObject )
   {
     SetWrapModeMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, static_cast< unsigned int >( rWrap ), static_cast< unsigned int >( sWrap ), static_cast< unsigned int >( tWrap ) );
   }
@@ -59,7 +59,7 @@ Render::Sampler* Sampler::GetSamplerRenderObject()
 
 Sampler::Sampler()
 :mEventThreadServices( EventThreadServices::Get() ),
- mRenderObject( NULL )
+ mRenderObject( nullptr )
 {
 }
 
index 02e7484..7dbc73d 100644 (file)
@@ -55,7 +55,7 @@ Render::Texture* Texture::GetRenderObject() const
 
 Texture::Texture(TextureType::Type type, Pixel::Format format, ImageDimensions size )
 : mEventThreadServices( EventThreadServices::Get() ),
-  mRenderObject( NULL ),
+  mRenderObject( nullptr ),
   mNativeImage(),
   mSize( size ),
   mType( type ),
@@ -65,7 +65,7 @@ Texture::Texture(TextureType::Type type, Pixel::Format format, ImageDimensions s
 
 Texture::Texture( NativeImageInterfacePtr nativeImageInterface )
 : mEventThreadServices( EventThreadServices::Get() ),
-  mRenderObject( NULL ),
+  mRenderObject( nullptr ),
   mNativeImage( nativeImageInterface ),
   mSize( nativeImageInterface->GetWidth(), nativeImageInterface->GetHeight() ),
   mType( TextureType::TEXTURE_2D ),
@@ -128,7 +128,7 @@ bool Texture::Upload( PixelDataPtr pixelData,
     else
     {
       unsigned int pixelDataSize = pixelData->GetWidth()*pixelData->GetHeight();
-      if( pixelData->GetBuffer() == NULL || pixelDataSize == 0 )
+      if( pixelData->GetBuffer() == nullptr || pixelDataSize == 0 )
       {
         DALI_LOG_ERROR( "PixelData is empty\n");
       }
index 56f9179..373daaf 100644 (file)
@@ -51,18 +51,18 @@ void TextureSet::SetTexture( uint32_t index, TexturePtr texture )
 
     for( uint32_t i(textureCount); i<=index; ++i )
     {
-      mTextures[i] = NULL;
+      mTextures[i] = nullptr;
 
       if( !samplerExist )
       {
-        mSamplers[i] = NULL;
+        mSamplers[i] = nullptr;
       }
     }
   }
 
   mTextures[index]= texture;
 
-  Render::Texture* renderTexture(0);
+  Render::Texture* renderTexture(nullptr);
   if( texture )
   {
     renderTexture = texture->GetRenderObject();
@@ -73,7 +73,7 @@ void TextureSet::SetTexture( uint32_t index, TexturePtr texture )
 
 Texture* TextureSet::GetTexture( uint32_t index ) const
 {
-  Texture* result(0);
+  Texture* result(nullptr);
   if( index < mTextures.size() )
   {
     result = mTextures[index].Get();
@@ -94,13 +94,13 @@ void TextureSet::SetSampler( uint32_t index, SamplerPtr sampler )
     mSamplers.resize( index + 1 );
     for( uint32_t i = samplerCount; i<=index; ++i )
     {
-      mSamplers[i] = NULL;
+      mSamplers[i] = nullptr;
     }
   }
 
   mSamplers[index] = sampler;
 
-  Render::Sampler* renderSampler(0);
+  Render::Sampler* renderSampler(nullptr);
   if( sampler )
   {
     renderSampler = sampler->GetSamplerRenderObject();
@@ -111,7 +111,7 @@ void TextureSet::SetSampler( uint32_t index, SamplerPtr sampler )
 
 Sampler* TextureSet::GetSampler( uint32_t index ) const
 {
-  Sampler* result(0);
+  Sampler* result(nullptr);
   if( index < mSamplers.size() )
   {
     result = mSamplers[index].Get();
@@ -136,7 +136,7 @@ const SceneGraph::TextureSet* TextureSet::GetTextureSetSceneObject() const
 
 TextureSet::TextureSet()
 :mEventThreadServices( EventThreadServices::Get() ),
- mSceneObject( NULL )
+ mSceneObject( nullptr )
 {
 }
 
index e8f8931..84f7f18 100644 (file)
@@ -185,7 +185,7 @@ VertexBuffer::~VertexBuffer()
 
 VertexBuffer::VertexBuffer()
 : mEventThreadServices( EventThreadServices::Get() ),
-  mRenderObject( NULL ),
+  mRenderObject( nullptr ),
   mBufferFormatSize( 0 ),
   mSize( 0 )
 {
index a001251..c4ec49a 100644 (file)
@@ -33,13 +33,13 @@ namespace SceneGraph
 {
 
 RenderInstruction::RenderInstruction()
-: mRenderTracker( NULL ),
+: mRenderTracker( nullptr ),
   mClearColor(),
   mIsViewportSet( false ),
   mIsClearColorSet( false ),
   mIgnoreRenderToFbo( false ),
-  mFrameBuffer( 0 ),
-  mCamera( 0 ),
+  mFrameBuffer( nullptr ),
+  mCamera( nullptr ),
   mNextFreeRenderList( 0 )
 {
   // reserve 6 lists, which is enough for three layers with opaque and transparent things on
@@ -99,7 +99,7 @@ const RenderList* RenderInstruction::GetRenderList( RenderListContainer::SizeTyp
   // Return null if the caller has passed an invalid index:
   if( index >= std::min( mNextFreeRenderList, mRenderLists.Size() ) )
   {
-    return 0;
+    return nullptr;
   }
 
   return mRenderLists[ index ];
@@ -112,10 +112,10 @@ void RenderInstruction::Reset( Camera*         camera,
 {
   mCamera = camera;
   mViewport = viewport ? *viewport : Viewport();
-  mIsViewportSet = NULL != viewport;
+  mIsViewportSet = nullptr != viewport;
   mClearColor = clearColor ? *clearColor : Color::BLACK;
-  mIsClearColorSet = NULL != clearColor;
-  mRenderTracker = NULL;
+  mIsClearColorSet = nullptr != clearColor;
+  mRenderTracker = nullptr;
   mNextFreeRenderList = 0;
   mFrameBuffer = frameBuffer;
 
index c218b25..b795530 100644 (file)
@@ -47,9 +47,9 @@ RenderItem::RenderItem()
   mModelViewMatrix( false ),
   mColor( Vector4::ZERO ),
   mSize(),
-  mRenderer( NULL ),
-  mNode( NULL ),
-  mTextureSet( NULL ),
+  mRenderer( nullptr ),
+  mNode( nullptr ),
+  mTextureSet( nullptr ),
   mDepthIndex( 0 ),
   mIsOpaque( true ),
   mIsUpdated( false )
index e3c4735..736702d 100644 (file)
@@ -60,8 +60,8 @@ public:
    */
   RenderList()
   : mNextFree( 0 ),
-    mClippingBox( NULL ),
-    mSourceLayer( NULL ),
+    mClippingBox( nullptr ),
+    mSourceLayer( nullptr ),
     mHasColorRenderItems( false )
   {
   }
@@ -84,7 +84,7 @@ public:
     mNextFree = 0;
 
     delete mClippingBox;
-    mClippingBox = NULL;
+    mClippingBox = nullptr;
   }
 
   /**
@@ -192,7 +192,7 @@ public:
    */
   bool IsClipping() const
   {
-    return ( NULL != mClippingBox );
+    return ( nullptr != mClippingBox );
   }
 
   /**
index 75415ed..d3db8f3 100644 (file)
@@ -244,7 +244,7 @@ RenderManager* RenderManager::New( Integration::GlAbstraction& glAbstraction,
 }
 
 RenderManager::RenderManager()
-: mImpl(NULL)
+: mImpl(nullptr)
 {
 }
 
@@ -954,7 +954,7 @@ void RenderManager::RenderScene( Integration::RenderStatus& status, Integration:
       clearMask |= GL_STENCIL_BUFFER_BIT;
     }
 
-    if( !instruction.mIgnoreRenderToFbo && ( instruction.mFrameBuffer != 0 ) )
+    if( !instruction.mIgnoreRenderToFbo && ( instruction.mFrameBuffer != nullptr ) )
     {
       // Offscreen buffer rendering
       if ( instruction.mIsViewportSet )
@@ -984,7 +984,7 @@ void RenderManager::RenderScene( Integration::RenderStatus& status, Integration:
     }
 
     bool clearFullFrameRect = true;
-    if( instruction.mFrameBuffer != 0 )
+    if( instruction.mFrameBuffer != nullptr )
     {
       Viewport frameRect( 0, 0, instruction.mFrameBuffer->GetWidth(), instruction.mFrameBuffer->GetHeight() );
       clearFullFrameRect = ( frameRect == viewportRect );
index a7a356e..ac4b16b 100644 (file)
@@ -34,8 +34,8 @@ namespace Render
 {
 
 RenderTracker::RenderTracker()
-: mGlSyncAbstraction( NULL ),
-  mSyncObject( NULL ),
+: mGlSyncAbstraction( nullptr ),
+  mSyncObject( nullptr ),
   mSyncTrigger( 0 )
 {
   TRACKER_LOG(Debug::Verbose);
@@ -47,7 +47,7 @@ RenderTracker::~RenderTracker()
   if( mSyncObject )
   {
     mGlSyncAbstraction->DestroySyncObject( mSyncObject );
-    mSyncObject = NULL;
+    mSyncObject = nullptr;
   }
 }
 
@@ -60,7 +60,7 @@ void RenderTracker::CreateSyncObject( Integration::GlSyncAbstraction& glSyncAbst
   if( mSyncObject )
   {
      mGlSyncAbstraction->DestroySyncObject( mSyncObject );
-     mSyncObject = NULL;
+     mSyncObject = nullptr;
   }
   ResetSyncFlag();
   mSyncObject = mGlSyncAbstraction->CreateSyncObject();
@@ -72,7 +72,7 @@ void RenderTracker::PollSyncObject()
   {
     SetSyncFlag();
     mGlSyncAbstraction->DestroySyncObject( mSyncObject );
-    mSyncObject = NULL;
+    mSyncObject = nullptr;
 
     TRACKER_LOG_FMT(Debug::General, " Synced\n");
     return;
index f6bde71..004044b 100644 (file)
@@ -25,8 +25,8 @@ namespace SceneGraph
 {
 
 RenderDataProvider::RenderDataProvider( AnimatableProperty< float >& opacity )
-: mUniformMapDataProvider( NULL ),
-  mShader( NULL ),
+: mUniformMapDataProvider( nullptr ),
+  mShader( nullptr ),
   mOpacity( opacity )
 {
 }
index 40fdac1..e9d3271 100644 (file)
@@ -201,7 +201,7 @@ FrameBufferStateCache::FrameBufferState* FrameBufferStateCache::GetFrameBufferSt
       return &state;
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 void FrameBufferStateCache::DeleteFrameBuffer( GLuint frameBufferId )
index 6d371f6..4258c93 100644 (file)
@@ -39,8 +39,8 @@ namespace SceneGraph
 {
 
 RenderQueue::RenderQueue()
-: container0( NULL ),
-  container1( NULL )
+: container0( nullptr ),
+  container1( nullptr )
 {
   container0 = new MessageBuffer( INITIAL_BUFFER_SIZE );
   container1 = new MessageBuffer( INITIAL_BUFFER_SIZE );
@@ -103,7 +103,7 @@ void RenderQueue::ProcessMessages( BufferIndex bufferIndex )
 
 MessageBuffer* RenderQueue::GetCurrentContainer( BufferIndex bufferIndex )
 {
-  MessageBuffer* container( NULL );
+  MessageBuffer* container( nullptr );
 
   /**
    * The update-thread queues messages with one container,
@@ -128,7 +128,7 @@ void RenderQueue::LimitBufferCapacity( BufferIndex bufferIndex )
     if( MAX_BUFFER_SIZE < container0->GetCapacity() )
     {
       delete container0;
-      container0 = NULL;
+      container0 = nullptr;
       container0 = new MessageBuffer( INITIAL_BUFFER_SIZE );
     }
   }
@@ -137,7 +137,7 @@ void RenderQueue::LimitBufferCapacity( BufferIndex bufferIndex )
     if( MAX_BUFFER_SIZE < container1->GetCapacity() )
     {
       delete container1;
-      container1 = NULL;
+      container1 = nullptr;
       container1 = new MessageBuffer( INITIAL_BUFFER_SIZE );
     }
   }
index 592ec6d..a24712a 100644 (file)
@@ -33,7 +33,7 @@ namespace Render
 
 Geometry::Geometry()
 : mIndices(),
-  mIndexBuffer(NULL),
+  mIndexBuffer(nullptr),
   mGeometryType( Dali::Geometry::TRIANGLES ),
   mIndicesChanged(false),
   mHasBeenUpdated(false),
@@ -118,11 +118,11 @@ void Geometry::Upload( Context& context )
     {
       if( mIndices.Empty() )
       {
-        mIndexBuffer = NULL;
+        mIndexBuffer = nullptr;
       }
       else
       {
-        if ( mIndexBuffer == NULL )
+        if ( mIndexBuffer == nullptr )
         {
           mIndexBuffer = new GpuBuffer( context );
         }
index 80449e8..2907da6 100644 (file)
@@ -134,7 +134,7 @@ Renderer::Renderer( SceneGraph::RenderDataProvider* dataProvider,
                     DepthFunction::Type depthFunction,
                     StencilParameters& stencilParameters )
 : mRenderDataProvider( dataProvider ),
-  mContext( NULL),
+  mContext( nullptr),
   mGeometry( geometry ),
   mUniformIndexMap(),
   mAttributesLocation(),
index 20eb465..73b73e2 100644 (file)
@@ -762,11 +762,11 @@ void Texture::Initialize(Context& context)
     {
       if( !mIsCompressed )
       {
-        context.TexImage2D(GL_TEXTURE_2D, 0, mGlInternalFormat, mWidth, mHeight, 0, mGlFormat, mPixelDataType, 0 );
+        context.TexImage2D(GL_TEXTURE_2D, 0, mGlInternalFormat, mWidth, mHeight, 0, mGlFormat, mPixelDataType, nullptr );
       }
       else
       {
-        context.CompressedTexImage2D(GL_TEXTURE_2D, 0, mGlInternalFormat, mWidth, mHeight, 0, 0, 0 );
+        context.CompressedTexImage2D(GL_TEXTURE_2D, 0, mGlInternalFormat, mWidth, mHeight, 0, 0, nullptr );
       }
     }
     else if( mType == TextureType::TEXTURE_CUBE )
@@ -775,14 +775,14 @@ void Texture::Initialize(Context& context)
       {
         for( uint32_t i(0); i<6; ++i )
         {
-          context.TexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, mGlInternalFormat, mWidth, mHeight, 0, mGlFormat, mPixelDataType, 0 );
+          context.TexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, mGlInternalFormat, mWidth, mHeight, 0, mGlFormat, mPixelDataType, nullptr );
         }
       }
       else
       {
         for( uint32_t i(0); i<6; ++i )
         {
-          context.CompressedTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, mGlInternalFormat, mWidth, mHeight, 0, 0, 0 );
+          context.CompressedTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, mGlInternalFormat, mWidth, mHeight, 0, 0, nullptr );
         }
       }
       context.TexParameteri( mTarget, GL_TEXTURE_WRAP_R, GL_WRAP_DEFAULT );
@@ -792,7 +792,7 @@ void Texture::Initialize(Context& context)
 
 void Texture::Upload( Context& context, PixelDataPtr pixelData, const Internal::Texture::UploadParams& params  )
 {
-  DALI_ASSERT_ALWAYS( mNativeImage == NULL );
+  DALI_ASSERT_ALWAYS( mNativeImage == nullptr );
 
   //Get pointer to the data of the PixelData object
   uint8_t* buffer( pixelData->GetBuffer() );
index 981dba7..cfec857 100644 (file)
@@ -117,9 +117,9 @@ namespace Render
 {
 
 VertexBuffer::VertexBuffer()
-:mFormat(NULL),
- mData(NULL),
- mGpuBuffer(NULL),
+:mFormat(nullptr),
+ mData(nullptr),
+ mGpuBuffer(nullptr),
  mSize(0),
  mDataChanged(true)
 {
index 87c268e..1245787 100644 (file)
@@ -31,9 +31,9 @@ namespace Internal
 {
 
 ProgramController::ProgramController( Integration::GlAbstraction& glAbstraction )
-: mShaderSaver( 0 ),
+: mShaderSaver( nullptr ),
   mGlAbstraction( glAbstraction ),
-  mCurrentProgram( NULL ),
+  mCurrentProgram( nullptr ),
   mProgramBinaryFormat( 0 ),
   mNumberOfProgramBinaryFormats( 0 )
 {
@@ -51,8 +51,8 @@ void ProgramController::ResetProgramMatrices()
   for ( ProgramIterator iter = mProgramCache.Begin(); iter != end; ++iter )
   {
     Program* program = (*iter)->GetProgram();
-    program->SetProjectionMatrix( NULL );
-    program->SetViewMatrix( NULL );
+    program->SetProjectionMatrix( nullptr );
+    program->SetViewMatrix( nullptr );
   }
 }
 
@@ -82,7 +82,7 @@ void ProgramController::GlContextDestroyed()
   mNumberOfProgramBinaryFormats = 0;
   mProgramBinaryFormat = 0;
 
-  SetCurrentProgram( NULL );
+  SetCurrentProgram( nullptr );
   // Inform programs they are no longer valid
   const ProgramIterator end = mProgramCache.End();
   for ( ProgramIterator iter = mProgramCache.Begin(); iter != end; ++iter )
@@ -98,7 +98,7 @@ Integration::GlAbstraction& ProgramController::GetGlAbstraction()
 
 Program* ProgramController::GetProgram( size_t shaderHash )
 {
-  Program* program = NULL;
+  Program* program = nullptr;
   const ProgramIterator end = mProgramCache.End();
   for ( ProgramIterator iter = mProgramCache.Begin(); iter != end; ++iter )
   {
@@ -144,7 +144,7 @@ void ProgramController::StoreBinary( Internal::ShaderDataPtr programData )
   DALI_ASSERT_DEBUG( programData->GetBufferSize() > 0 );
   DALI_ASSERT_DEBUG( mShaderSaver && "SetShaderSaver() should have been called during startup." );
 
-  if( mShaderSaver != NULL )
+  if( mShaderSaver != nullptr )
   {
     mShaderSaver->SaveBinary( programData );
   }
index e8e95e2..246d0fe 100755 (executable)
@@ -107,7 +107,7 @@ Program* Program::New( ProgramCache& cache, Internal::ShaderDataPtr shaderData,
   size_t shaderHash = shaderData->GetHashValue();
   Program* program = cache.GetProgram( shaderHash );
 
-  if( NULL == program )
+  if( nullptr == program )
   {
     // program not found so create it
     program = new Program( cache, shaderData, modifiesGeometry );
@@ -313,7 +313,7 @@ void Program::GetActiveSamplerUniforms()
   {
     char* outerToken = strtok_r( uniform + UNIFORM.mLength, ";", &uniform );
 
-    char* nextPtr = NULL;
+    char* nextPtr = nullptr;
     char* token = strtok_r( outerToken, DELIMITERS, &nextPtr );
     while ( token )
     {
@@ -323,7 +323,7 @@ void Program::GetActiveSamplerUniforms()
         if ( std::find(SAMPLER_TYPES, END_SAMPLER_TYPES, token) != END_SAMPLER_TYPES )
         {
           bool found( false );
-          token = strtok_r( NULL, DELIMITERS, &nextPtr );
+          token = strtok_r( nullptr, DELIMITERS, &nextPtr );
           for (uint32_t i=0; i < static_cast<uint32_t>( samplerUniformLocations.size() ); ++i)
           {
             if ( samplerUniformLocations[i].position == -1 &&
@@ -343,7 +343,7 @@ void Program::GetActiveSamplerUniforms()
         }
       }
 
-      token = strtok_r( NULL, DELIMITERS, &nextPtr );
+      token = strtok_r( nullptr, DELIMITERS, &nextPtr );
     }
 
     uniform = strstr( uniform, UNIFORM );
@@ -632,8 +632,8 @@ bool Program::ModifiesGeometry()
 Program::Program( ProgramCache& cache, Internal::ShaderDataPtr shaderData, bool modifiesGeometry )
 : mCache( cache ),
   mGlAbstraction( mCache.GetGlAbstraction() ),
-  mProjectionMatrix( NULL ),
-  mViewMatrix( NULL ),
+  mProjectionMatrix( nullptr ),
+  mViewMatrix( nullptr ),
   mLinked( false ),
   mVertexShaderId( 0 ),
   mFragmentShaderId( 0 ),
@@ -667,7 +667,7 @@ Program::~Program()
 
 void Program::Load()
 {
-  DALI_ASSERT_ALWAYS( NULL != mProgramData.Get() && "Program data is not initialized" );
+  DALI_ASSERT_ALWAYS( nullptr != mProgramData.Get() && "Program data is not initialized" );
   DALI_ASSERT_DEBUG( mProgramId == 0 && "mProgramId != 0, so about to leak a GL resource by overwriting it." );
 
   LOG_GL( "CreateProgram()\n" );
@@ -737,7 +737,7 @@ void Program::Load()
             // Allocate space for the bytecode in ShaderData
             mProgramData->AllocateBuffer(binaryLength);
             // Copy the bytecode to ShaderData
-            CHECK_GL( mGlAbstraction, mGlAbstraction.GetProgramBinary(mProgramId, binaryLength, NULL, &binaryFormat, mProgramData->GetBufferData()) );
+            CHECK_GL( mGlAbstraction, mGlAbstraction.GetProgramBinary(mProgramId, binaryLength, nullptr, &binaryFormat, mProgramData->GetBufferData()) );
             mCache.StoreBinary( mProgramData );
             DALI_LOG_INFO( Debug::Filter::gShader, Debug::General, "Saved binary.\n" );
           }
@@ -760,7 +760,7 @@ void Program::Unload()
   {
     CHECK_GL( mGlAbstraction, mGlAbstraction.UseProgram(0) );
 
-    mCache.SetCurrentProgram( NULL );
+    mCache.SetCurrentProgram( nullptr );
   }
 
   if (mProgramId)
@@ -785,7 +785,7 @@ bool Program::CompileShader( GLenum shaderType, GLuint& shaderId, const char* sr
   }
 
   LOG_GL( "ShaderSource(%d)\n", shaderId );
-  CHECK_GL( mGlAbstraction, mGlAbstraction.ShaderSource(shaderId, 1, &src, NULL ) );
+  CHECK_GL( mGlAbstraction, mGlAbstraction.ShaderSource(shaderId, 1, &src, nullptr ) );
 
   LOG_GL( "CompileShader(%d)\n", shaderId );
   CHECK_GL( mGlAbstraction, mGlAbstraction.CompileShader( shaderId ) );
index dc78aed..9998784 100644 (file)
@@ -37,7 +37,7 @@ namespace SceneGraph
 
 Shader::Shader( Dali::Shader::Hint::Value& hints )
 : mHints( hints ),
-  mProgram( NULL ),
+  mProgram( nullptr ),
   mConnectionObservers()
 {
   AddUniformMapObserver( *this );
index 006b817..fdcd0cf 100644 (file)
@@ -35,7 +35,7 @@ namespace SceneGraph
 
 ConditionFunction LessThan::GetFunction(Property::Type valueType)
 {
-  ConditionFunction function = NULL;
+  ConditionFunction function = nullptr;
 
   switch(valueType)
   {
@@ -124,7 +124,7 @@ bool LessThan::EvalDefault( const Dali::PropertyInput& value, PropertyNotificati
 
 ConditionFunction GreaterThan::GetFunction(Property::Type valueType)
 {
-  ConditionFunction function = NULL;
+  ConditionFunction function = nullptr;
 
   switch(valueType)
   {
@@ -213,7 +213,7 @@ bool GreaterThan::EvalDefault( const Dali::PropertyInput& value, PropertyNotific
 
 ConditionFunction Inside::GetFunction(Property::Type valueType)
 {
-  ConditionFunction function = NULL;
+  ConditionFunction function = nullptr;
 
   switch(valueType)
   {
@@ -302,7 +302,7 @@ bool Inside::EvalDefault( const Dali::PropertyInput& value, PropertyNotification
 
 ConditionFunction Outside::GetFunction(Property::Type valueType)
 {
-  ConditionFunction function = NULL;
+  ConditionFunction function = nullptr;
 
   switch(valueType)
   {
index f826341..b1a81d7 100644 (file)
@@ -45,7 +45,7 @@ const int32_t ARGINDEX_THIRD_VALUE = 5;
 
 ConditionFunction Step::GetFunction(Property::Type valueType)
 {
-  ConditionFunction function = NULL;
+  ConditionFunction function = nullptr;
 
   switch(valueType)
   {
@@ -86,7 +86,7 @@ ConditionFunction Step::GetFunction(Property::Type valueType)
 
 ConditionFunction Step::GetCompareFunction( Property::Type valueType )
 {
-    ConditionFunction function = NULL;
+    ConditionFunction function = nullptr;
     if( valueType == Property::VECTOR3 )
     {
       function = EvalAndCompareVector3;
index 583a4c1..b779cbf 100644 (file)
@@ -42,7 +42,7 @@ const int32_t ARGINDEX_LIST_START = 2;
 
 ConditionFunction VariableStep::GetFunction( Property::Type valueType )
 {
-  ConditionFunction function = NULL;
+  ConditionFunction function = nullptr;
 
   switch( valueType )
   {
index d2d32f3..ecc6ab9 100644 (file)
@@ -57,13 +57,13 @@ PropertyNotification::PropertyNotification(Object& object,
 : mObject(&object),
   mPropertyIndex(propertyIndex),
   mPropertyType(propertyType),
-  mProperty(NULL),
+  mProperty(nullptr),
   mComponentIndex(componentIndex),
   mConditionType(condition),
   mArguments(arguments),
   mValid(false),
   mNotifyMode( Dali::PropertyNotification::DISABLED ),
-  mConditionFunction(NULL)
+  mConditionFunction(nullptr)
 {
   SetNotifyMode(notifyMode);
 
index 72af02a..5045c2e 100644 (file)
@@ -148,7 +148,7 @@ const PropertyInputImpl* UniformMap::Find( const std::string& uniformName )
       }
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 UniformMap::SizeType UniformMap::Count() const
index 6dc0c9d..96e0fe9 100644 (file)
@@ -53,7 +53,7 @@ public:
   }
 
   UniformPropertyMapping()
-  : propertyPtr( NULL ),
+  : propertyPtr( nullptr ),
     uniformName( "" ),
     uniformNameHash( 0 )
   {
index f689501..d875158 100644 (file)
@@ -699,7 +699,7 @@ PanGesture::PanGesture()
   mInGesture( false ),
   mPredictionAmountOverridden( false ),
   mSmoothingAmountOverridden( false ),
-  mProfiling( NULL ),
+  mProfiling( nullptr ),
 
   // Set environment variable defaults:
   mPredictionMode( DEFAULT_PREDICTION_MODE ),
index 35a1839..4d1b55d 100644 (file)
@@ -458,7 +458,7 @@ void RenderInstructionProcessor::Prepare( BufferIndex updateBufferIndex,
     Layer& layer = **iter;
     const bool tryReuseRenderList( viewMatrixHasNotChanged && layer.CanReuseRenderers( &renderTask.GetCamera() ) );
     const bool isLayer3D = layer.GetBehavior() == Dali::Layer::LAYER_3D;
-    RenderList* renderList = NULL;
+    RenderList* renderList = nullptr;
 
     if( layer.IsRoot() && ( layer.GetDirtyFlags() != NodePropertyFlags::NOTHING ) )
     {
index 9040982..2e8b62b 100644 (file)
@@ -69,10 +69,10 @@ public:
   struct SortAttributes
   {
     SortAttributes()
-    : renderItem( NULL ),
-      shader( NULL ),
-      textureSet( NULL ),
-      geometry( NULL ),
+    : renderItem( nullptr ),
+      shader( nullptr ),
+      textureSet( nullptr ),
+      geometry( nullptr ),
       zValue( 0.0f )
     {
     }
index 5923331..73ea5cf 100644 (file)
@@ -68,10 +68,10 @@ bool CheckExclusivity( const Node& node, const RenderTask& task )
 Layer* FindLayer( Node& node )
 {
   Node* currentNode( &node );
-  Layer* layer( NULL );
+  Layer* layer( nullptr );
   while( currentNode )
   {
-    if( ( layer = currentNode->GetLayer() ) != NULL )
+    if( ( layer = currentNode->GetLayer() ) != nullptr )
     {
       return layer;
     }
@@ -79,7 +79,7 @@ Layer* FindLayer( Node& node )
     currentNode = currentNode->GetParent();
   }
 
-  return NULL;
+  return nullptr;
 }
 
 /**
@@ -233,7 +233,7 @@ bool ProcessTasks( BufferIndex updateBufferIndex,
   {
     RenderTask& renderTask = **iter;
 
-    const bool hasFrameBuffer = NULL != renderTask.GetFrameBuffer();
+    const bool hasFrameBuffer = nullptr != renderTask.GetFrameBuffer();
     const bool isDefaultRenderTask = isFirstRenderTask;
     isFirstRenderTask = false;
 
index 800a65a..9808409 100644 (file)
@@ -35,7 +35,7 @@ struct TransformManagerPropertyHandler : public AnimatablePropertyBase
    * Constructor
    */
   TransformManagerPropertyHandler()
-  :mTxManager(0),
+  :mTxManager(nullptr),
    mId( INVALID_TRANSFORM_ID )
   {}
 
@@ -302,7 +302,7 @@ public:
    * Create an TransformManagerVector3Input
    */
   TransformManagerVector3Input( TransformManagerProperty property, const Vector3& initialValue )
-  :mTxManager(0),
+  :mTxManager(nullptr),
    mId(INVALID_TRANSFORM_ID),
    mProperty(property),
    mValue(initialValue)
@@ -464,7 +464,7 @@ public:
    * Constructor
    */
   TransformManagerQuaternionInput()
-  :mTxManager(0),
+  :mTxManager(nullptr),
    mId(INVALID_TRANSFORM_ID),
    mValue(1.0f,0.0f,0.0f,0.0f)
   {
@@ -616,7 +616,7 @@ public:
    * Constructor
    */
   TransformManagerMatrixInput()
-  :mTxManager(0),
+  :mTxManager(nullptr),
    mId(INVALID_TRANSFORM_ID)
   {
   }
@@ -692,7 +692,7 @@ public:
    */
   Matrix& Get( BufferIndex bufferIndex )
   {
-    DALI_ASSERT_ALWAYS( mTxManager != 0 );
+    DALI_ASSERT_ALWAYS( mTxManager != nullptr );
     return mTxManager->GetWorldMatrix(mId);
   }
 
index 39e9f56..ca7c704 100644 (file)
@@ -167,10 +167,10 @@ struct UpdateManager::Impl
     transformManager(),
     animationPlaylist( animationPlaylist ),
     propertyNotifier( propertyNotifier ),
-    shaderSaver( NULL ),
+    shaderSaver( nullptr ),
     discardQueue( discardQueue ),
     renderController( renderController ),
-    sceneController( NULL ),
+    sceneController( nullptr ),
     renderManager( renderManager ),
     renderQueue( renderQueue ),
     renderTaskProcessor( renderTaskProcessor ),
@@ -178,9 +178,9 @@ struct UpdateManager::Impl
     renderers(),
     textureSets(),
     shaders(),
-    panGestureProcessor( NULL ),
+    panGestureProcessor( nullptr ),
     messageQueue( renderController, sceneGraphBuffers ),
-    frameCallbackProcessor( NULL ),
+    frameCallbackProcessor( nullptr ),
     keepRenderingSeconds( 0.0f ),
     nodeDirtyFlags( NodePropertyFlags::TRANSFORM ), // set to TransformFlag to ensure full update the first time through Update()
     frameCounter( 0 ),
@@ -194,7 +194,7 @@ struct UpdateManager::Impl
     sceneController = new SceneControllerImpl( renderMessageDispatcher, renderQueue, discardQueue );
 
     // create first 'dummy' node
-    nodes.PushBack(0u);
+    nodes.PushBack(nullptr);
   }
 
   ~Impl()
@@ -207,7 +207,7 @@ struct UpdateManager::Impl
         RenderTaskList::RenderTaskContainer& tasks = scene->taskList->GetTasks();
         for ( auto&& task : tasks )
         {
-          task->SetSourceNode( NULL );
+          task->SetSourceNode( nullptr );
         }
       }
     }
@@ -313,7 +313,7 @@ UpdateManager::UpdateManager( NotificationManager& notificationManager,
                               RenderManager& renderManager,
                               RenderQueue& renderQueue,
                               RenderTaskProcessor& renderTaskProcessor )
-  : mImpl(NULL)
+  : mImpl(nullptr)
 {
   mImpl = new Impl( notificationManager,
                     animationFinishedNotifier,
@@ -374,7 +374,7 @@ void UpdateManager::UninstallRoot( Layer* layer )
 
 void UpdateManager::AddNode( OwnerPointer<Node>& node )
 {
-  DALI_ASSERT_ALWAYS( NULL == node->GetParent() ); // Should not have a parent yet
+  DALI_ASSERT_ALWAYS( nullptr == node->GetParent() ); // Should not have a parent yet
 
   // Nodes must be sorted by pointer
   Node* rawNode = node.Release();
@@ -394,9 +394,9 @@ void UpdateManager::AddNode( OwnerPointer<Node>& node )
 
 void UpdateManager::ConnectNode( Node* parent, Node* node )
 {
-  DALI_ASSERT_ALWAYS( NULL != parent );
-  DALI_ASSERT_ALWAYS( NULL != node );
-  DALI_ASSERT_ALWAYS( NULL == node->GetParent() ); // Should not have a parent yet
+  DALI_ASSERT_ALWAYS( nullptr != parent );
+  DALI_ASSERT_ALWAYS( nullptr != node );
+  DALI_ASSERT_ALWAYS( nullptr == node->GetParent() ); // Should not have a parent yet
 
   DALI_LOG_INFO( gLogFilter, Debug::General, "[%x] ConnectNode\n", node );
 
@@ -414,7 +414,7 @@ void UpdateManager::DisconnectNode( Node* node )
   DALI_LOG_INFO( gLogFilter, Debug::General, "[%x] DisconnectNode\n", node );
 
   Node* parent = node->GetParent();
-  DALI_ASSERT_ALWAYS( NULL != parent );
+  DALI_ASSERT_ALWAYS( nullptr != parent );
   parent->SetDirtyFlag( NodePropertyFlags::CHILD_DELETED ); // make parent dirty so that render items dont get reused
 
   parent->DisconnectChild( mSceneGraphBuffers.GetUpdateBufferIndex(), *node );
@@ -428,8 +428,8 @@ void UpdateManager::DisconnectNode( Node* node )
 
 void UpdateManager::DestroyNode( Node* node )
 {
-  DALI_ASSERT_ALWAYS( NULL != node );
-  DALI_ASSERT_ALWAYS( NULL == node->GetParent() ); // Should have been disconnected
+  DALI_ASSERT_ALWAYS( nullptr != node );
+  DALI_ASSERT_ALWAYS( nullptr == node->GetParent() ); // Should have been disconnected
 
   DALI_LOG_INFO( gLogFilter, Debug::General, "[%x] DestroyNode\n", node );
 
index 22b45a3..11a5385 100644 (file)
@@ -32,7 +32,7 @@ namespace
 
 SceneGraph::Node* FindNodeInSceneGraph( uint32_t id, SceneGraph::Node& node )
 {
-  SceneGraph::Node* matchingNode = NULL;
+  SceneGraph::Node* matchingNode = nullptr;
 
   if( node.mId == id )
   {
@@ -57,7 +57,7 @@ SceneGraph::Node* FindNodeInSceneGraph( uint32_t id, SceneGraph::Node& node )
 
 UpdateProxy::UpdateProxy( SceneGraph::UpdateManager& updateManager, SceneGraph::TransformManager& transformManager, SceneGraph::Node& rootNode )
 : mNodeContainer(),
-  mLastCachedIdNodePair( { 0u, NULL } ),
+  mLastCachedIdNodePair( { 0u, nullptr } ),
   mCurrentBufferIndex( 0u ),
   mUpdateManager( updateManager ),
   mTransformManager( transformManager ),
@@ -233,14 +233,14 @@ bool UpdateProxy::BakeColor( uint32_t id, const Vector4& color )
 
 void UpdateProxy::NodeHierarchyChanged()
 {
-  mLastCachedIdNodePair = { 0u, NULL };
+  mLastCachedIdNodePair = { 0u, nullptr };
   mNodeContainer.clear();
   mPropertyModifier.reset();
 }
 
 SceneGraph::Node* UpdateProxy::GetNodeWithId( uint32_t id ) const
 {
-  SceneGraph::Node* node = NULL;
+  SceneGraph::Node* node = nullptr;
 
   // Cache the last accessed node so we don't have to traverse
   if( mLastCachedIdNodePair.node && mLastCachedIdNodePair.id == id )
index 32f6dee..189d18c 100755 (executable)
@@ -79,7 +79,7 @@ void Node::Delete( Node* node )
 }
 
 Node::Node()
-: mTransformManager( NULL ),
+: mTransformManager( nullptr ),
   mTransformId( INVALID_TRANSFORM_ID ),
   mParentOrigin( TRANSFORM_PROPERTY_PARENT_ORIGIN ),
   mAnchorPoint( TRANSFORM_PROPERTY_ANCHOR_POINT ),
@@ -98,8 +98,8 @@ Node::Node()
   mWorldColor( Color::WHITE ),
   mClippingSortModifier( 0u ),
   mId( ++mNodeCounter ),
-  mParent( NULL ),
-  mExclusiveRenderTask( NULL ),
+  mParent( nullptr ),
+  mExclusiveRenderTask( nullptr ),
   mChildren(),
   mClippingDepth( 0u ),
   mScissorDepth( 0u ),
@@ -223,8 +223,8 @@ void Node::PrepareRender( BufferIndex bufferIndex )
 void Node::ConnectChild( Node* childNode )
 {
   DALI_ASSERT_ALWAYS( this != childNode );
-  DALI_ASSERT_ALWAYS( IsRoot() || NULL != mParent ); // Parent should be connected first
-  DALI_ASSERT_ALWAYS( !childNode->IsRoot() && NULL == childNode->GetParent() ); // Child should be disconnected
+  DALI_ASSERT_ALWAYS( IsRoot() || nullptr != mParent ); // Parent should be connected first
+  DALI_ASSERT_ALWAYS( !childNode->IsRoot() && nullptr == childNode->GetParent() ); // Child should be disconnected
 
   childNode->SetParent( *this );
 
@@ -244,7 +244,7 @@ void Node::DisconnectChild( BufferIndex updateBufferIndex, Node& childNode )
   DALI_ASSERT_ALWAYS( childNode.GetParent() == this );
 
   // Find the childNode and remove it
-  Node* found( NULL );
+  Node* found( nullptr );
 
   const NodeIter endIter = mChildren.End();
   for ( NodeIter iter = mChildren.Begin(); iter != endIter; ++iter )
@@ -257,7 +257,7 @@ void Node::DisconnectChild( BufferIndex updateBufferIndex, Node& childNode )
       break; // iter is no longer valid
     }
   }
-  DALI_ASSERT_ALWAYS( NULL != found );
+  DALI_ASSERT_ALWAYS( nullptr != found );
 
   found->RecursiveDisconnectFromSceneGraph( updateBufferIndex );
 }
@@ -338,7 +338,7 @@ void Node::SetParent( Node& parentNode )
 {
   DALI_ASSERT_ALWAYS(this != &parentNode);
   DALI_ASSERT_ALWAYS(!mIsRoot);
-  DALI_ASSERT_ALWAYS(mParent == NULL);
+  DALI_ASSERT_ALWAYS(mParent == nullptr);
 
   mParent = &parentNode;
 
@@ -351,7 +351,7 @@ void Node::SetParent( Node& parentNode )
 void Node::RecursiveDisconnectFromSceneGraph( BufferIndex updateBufferIndex )
 {
   DALI_ASSERT_ALWAYS(!mIsRoot);
-  DALI_ASSERT_ALWAYS(mParent != NULL);
+  DALI_ASSERT_ALWAYS(mParent != nullptr);
 
   const NodeIter endIter = mChildren.End();
   for ( NodeIter iter = mChildren.Begin(); iter != endIter; ++iter )
@@ -363,7 +363,7 @@ void Node::RecursiveDisconnectFromSceneGraph( BufferIndex updateBufferIndex )
   PropertyOwner::DisconnectFromSceneGraph( updateBufferIndex );
 
   // Remove back-pointer to parent
-  mParent = NULL;
+  mParent = nullptr;
 
   // Remove all child pointers
   mChildren.Clear();
index 037f6ed..b080cbb 100644 (file)
@@ -113,7 +113,7 @@ public:
    */
   virtual Layer* GetLayer()
   {
-    return NULL;
+    return nullptr;
   }
 
   /**
@@ -1096,10 +1096,10 @@ inline void SetPositionUsesAnchorPointMessage( EventThreadServices& eventThreadS
 template <>
 inline void OwnerPointer<Dali::Internal::SceneGraph::Node>::Reset()
 {
-  if (mObject != NULL)
+  if (mObject != nullptr)
   {
     Dali::Internal::SceneGraph::Node::Delete(mObject);
-    mObject = NULL;
+    mObject = nullptr;
   }
 }
 } // namespace Internal
index 8f9ff00..0c3c641 100755 (executable)
@@ -42,7 +42,7 @@ Layer::Layer()
 : Node(),
   mSortFunction( Internal::Layer::ZValue ),
   mClippingBox( 0,0,0,0 ),
-  mLastCamera( NULL ),
+  mLastCamera( nullptr ),
   mBehavior( Dali::Layer::LAYER_UI ),
   mIsClipping( false ),
   mDepthTestDisabled( true ),
index 3a25f67..3af82db 100644 (file)
@@ -45,8 +45,8 @@ class Camera;
 struct Renderable
 {
   Renderable()
-  : mNode( 0 ),
-    mRenderer( 0 )
+  : mNode( nullptr ),
+    mRenderer( nullptr )
   {}
 
   Renderable( Node* node, Renderer* renderer )
@@ -335,10 +335,10 @@ inline void SetDepthTestDisabledMessage( EventThreadServices& eventThreadService
 template <>
 inline void OwnerPointer<Dali::Internal::SceneGraph::Layer>::Reset()
 {
-  if (mObject != NULL)
+  if (mObject != nullptr)
   {
     Dali::Internal::SceneGraph::Node::Delete(mObject);
-    mObject = NULL;
+    mObject = nullptr;
   }
 }
 } // namespace Internal
index bebc1dc..45e30ba 100644 (file)
@@ -69,7 +69,7 @@ struct MessageQueue::Impl
     queueWasEmpty(true),
     sceneUpdateFlag( false ),
     sceneUpdate( 0 ),
-    currentMessageBuffer(NULL)
+    currentMessageBuffer(nullptr)
   {
   }
 
@@ -137,7 +137,7 @@ struct MessageQueue::Impl
 };
 
 MessageQueue::MessageQueue( Integration::RenderController& controller, const SceneGraph::SceneGraphBuffers& buffers )
-: mImpl(NULL)
+: mImpl(nullptr)
 {
   mImpl = new Impl( controller, buffers );
 }
@@ -202,7 +202,7 @@ uint32_t* MessageQueue::ReserveMessageSlot( uint32_t requestedSize, bool updateS
 // Called from event thread
 bool MessageQueue::FlushQueue()
 {
-  const bool messagesToProcess = ( NULL != mImpl->currentMessageBuffer );
+  const bool messagesToProcess = ( nullptr != mImpl->currentMessageBuffer );
 
   // If there're messages to flush
   if ( messagesToProcess )
@@ -211,7 +211,7 @@ bool MessageQueue::FlushQueue()
     MessageQueueMutex::ScopedLock lock( mImpl->queueMutex );
 
     mImpl->processQueue.push_back( mImpl->currentMessageBuffer );
-    mImpl->currentMessageBuffer = NULL;
+    mImpl->currentMessageBuffer = nullptr;
 
     // Grab any recycled MessageBuffers
     while ( !mImpl->recycleQueue.empty() )
index aa44bd3..5a4a529 100644 (file)
@@ -161,7 +161,7 @@ const Vector3 Camera::DEFAULT_TARGET_POSITION( 0.0f, 0.0f, 0.0f );
 Camera::Camera()
 : mUpdateViewFlag( UPDATE_COUNT ),
   mUpdateProjectionFlag( UPDATE_COUNT ),
-  mNode( NULL ),
+  mNode( nullptr ),
   mType( DEFAULT_TYPE ),
   mProjectionMode( DEFAULT_MODE ),
   mInvertYAxis( DEFAULT_INVERT_Y_AXIS ),
index 70665a9..63d9118 100644 (file)
@@ -44,8 +44,8 @@ RenderTaskList* RenderTaskList::New()
 }
 
 RenderTaskList::RenderTaskList()
-: mNotificationObject( NULL ),
-  mRenderMessageDispatcher( NULL )
+: mNotificationObject( nullptr ),
+  mRenderMessageDispatcher( nullptr )
 {
 }
 
index 641e4e2..d6d45a9 100644 (file)
@@ -485,7 +485,7 @@ RenderTask::RenderTask()
   mSourceNode( nullptr ),
   mCameraNode( nullptr ),
   mCamera( nullptr ),
-  mFrameBuffer(0),
+  mFrameBuffer(nullptr),
   mRefreshRate( Dali::RenderTask::DEFAULT_REFRESH_RATE ),
   mFrameCounter( 0u ),
   mRenderedOnceCounter( 0u ),
index 4f94576..bbfa7ae 100644 (file)
@@ -125,13 +125,13 @@ Renderer* Renderer::New()
 }
 
 Renderer::Renderer()
-: mSceneController( 0 ),
-  mRenderer( NULL ),
-  mTextureSet( NULL ),
-  mGeometry( NULL ),
-  mShader( NULL ),
-  mRenderDataProvider( NULL ),
-  mBlendColor( NULL ),
+: mSceneController( nullptr ),
+  mRenderer( nullptr ),
+  mTextureSet( nullptr ),
+  mGeometry( nullptr ),
+  mShader( nullptr ),
+  mRenderDataProvider( nullptr ),
+  mBlendColor( nullptr ),
   mStencilParameters( RenderMode::AUTO, StencilFunction::ALWAYS, 0xFF, 0x00, 0xFF, StencilOperation::KEEP, StencilOperation::KEEP, StencilOperation::KEEP ),
   mIndexedDrawFirstElement( 0u ),
   mIndexedDrawElementsCount( 0u ),
@@ -160,12 +160,12 @@ Renderer::~Renderer()
   if( mTextureSet )
   {
     mTextureSet->RemoveObserver( this );
-    mTextureSet = NULL;
+    mTextureSet = nullptr;
   }
   if( mShader )
   {
     mShader->RemoveConnectionObserver( *this );
-    mShader = NULL;
+    mShader = nullptr;
   }
 }
 
@@ -452,7 +452,7 @@ void Renderer::SetBlendColor( const Vector4& blendColor )
 {
   if( blendColor == Color::TRANSPARENT )
   {
-    mBlendColor = NULL;
+    mBlendColor = nullptr;
   }
   else
   {
@@ -640,10 +640,10 @@ void Renderer::DisconnectFromSceneGraph( SceneController& sceneController, Buffe
   if( mRenderer )
   {
     mSceneController->GetRenderMessageDispatcher().RemoveRenderer( *mRenderer );
-    mRenderer = NULL;
+    mRenderer = nullptr;
   }
-  mSceneController = NULL;
-  mRenderDataProvider = NULL;
+  mSceneController = nullptr;
+  mRenderDataProvider = nullptr;
 }
 
 void Renderer::UpdateTextureSet()
@@ -738,7 +738,7 @@ void Renderer::TextureSetChanged()
 
 void Renderer::TextureSetDeleted()
 {
-  mTextureSet = NULL;
+  mTextureSet = nullptr;
 
   mRegenerateUniformMap = REGENERATE_UNIFORM_MAP;
 
@@ -767,7 +767,7 @@ void Renderer::ObservedObjectDestroyed(PropertyOwner& owner)
 {
   if( reinterpret_cast<PropertyOwner*>(mShader) == &owner )
   {
-    mShader = NULL;
+    mShader = nullptr;
   }
 }
 
index 3600892..e2e7e4b 100644 (file)
@@ -70,7 +70,7 @@ void TextureSet::SetSampler( uint32_t index, Render::Sampler* sampler )
     mSamplers.Resize( index + 1 );
     for( uint32_t i(samplerCount); i<=index; ++i )
     {
-      mSamplers[i] = NULL;
+      mSamplers[i] = nullptr;
     }
   }
 
@@ -94,11 +94,11 @@ void TextureSet::SetTexture( uint32_t index, Render::Texture* texture )
 
     for( uint32_t i(textureCount); i<=index; ++i )
     {
-      mTextures[i] = 0;
+      mTextures[i] = nullptr;
 
       if( !samplerExist )
       {
-        mSamplers[i] = 0;
+        mSamplers[i] = nullptr;
       }
     }
   }
index 19f03e9..292fec7 100644 (file)
@@ -35,7 +35,7 @@ void CustomActorImpl::OnPropertySet( Property::Index index, const Property::Valu
 }
 
 CustomActorImpl::CustomActorImpl( ActorFlags flags )
-: mOwner(NULL),
+: mOwner(nullptr),
   mFlags( flags )
 {
 }
index 9566e21..657cf01 100644 (file)
@@ -277,7 +277,7 @@ public:
    */
   virtual Extension* GetExtension()
   {
-    return NULL;
+    return nullptr;
   }
 
 protected: // For derived classes
index 28f7c41..b5aad8d 100755 (executable)
@@ -34,14 +34,14 @@ constexpr uint32_t BitMaskOfN( uint32_t bits )
 
 AlphaFunction::AlphaFunction()
 :mBezierControlPoints(Vector4::ZERO),
- mCustom(0),
+ mCustom(nullptr),
  mBuiltin(DEFAULT),
  mMode(BUILTIN_FUNCTION)
 {}
 
 AlphaFunction::AlphaFunction( BuiltinFunction function)
 :mBezierControlPoints(Vector4::ZERO),
- mCustom(0),
+ mCustom(nullptr),
  mBuiltin(function),
  mMode(BUILTIN_FUNCTION)
 {}
@@ -56,7 +56,7 @@ AlphaFunction::AlphaFunction( AlphaFunctionPrototype function)
 AlphaFunction::AlphaFunction( const Vector2& controlPoint0, const Vector2& controlPoint1 )
 :mBezierControlPoints(Vector4(Clamp(controlPoint0.x,0.0f,1.0f),controlPoint0.y,
                               Clamp(controlPoint1.x,0.0f,1.0f),controlPoint1.y)),
- mCustom(0),
+ mCustom(nullptr),
  mBuiltin(DEFAULT),
  mMode(BEZIER)
 {
index 52008ac..d63fd7a 100644 (file)
@@ -131,7 +131,7 @@ public:
     template< class T >
     Function( const T& object )
     : CallbackBase( reinterpret_cast< void* >( new T( object ) ), // copy the object
-                    NULL, // uses operator() instead of member function
+                    nullptr, // uses operator() instead of member function
                     reinterpret_cast< CallbackBase::Dispatcher >( &FunctorDispatcher2< T, P&, const PropertyInputContainer& >::Dispatch ),
                     reinterpret_cast< CallbackBase::Destructor >( &Destroyer< T >::Delete ) ),
       mCopyConstructorDispatcher( reinterpret_cast< CopyConstructorDispatcher >( &ObjectCopyConstructorDispatcher< T >::Copy ) )
@@ -171,7 +171,7 @@ public:
      */
     CallbackBase* Clone()
     {
-      CallbackBase* callback = NULL;
+      CallbackBase* callback = nullptr;
       if ( mImpl && mImpl->mObjectPointer && mCopyConstructorDispatcher )
       {
         callback = new Function( mCopyConstructorDispatcher( reinterpret_cast< UndefinedClass* >( mImpl->mObjectPointer ) ) /* Copy the object */,
@@ -258,7 +258,7 @@ public:
      */
     Function( CallbackBase::Function function )
     : CallbackBase( function ),
-      mCopyConstructorDispatcher( NULL )
+      mCopyConstructorDispatcher( nullptr )
     {
     }
 
index bae8522..4acbe52 100644 (file)
@@ -25,7 +25,7 @@ namespace Dali
 {
 
 VectorBase::VectorBase()
-  : mData( NULL )
+  : mData( nullptr )
 {
 }
 
@@ -53,7 +53,7 @@ void VectorBase::Release()
     SizeType* metadata = reinterpret_cast< SizeType* >( mData );
 
     delete [] ( metadata - 2u );
-    mData = 0u;
+    mData = nullptr;
   }
 }
 
@@ -131,7 +131,7 @@ void VectorBase::Erase( char* address, SizeType elementSize )
 
 char* VectorBase::Erase( char* first, char* last, SizeType elementSize )
 {
-  char* next = NULL;
+  char* next = nullptr;
 
   if( mData )
   {
index d629382..87fc5f7 100644 (file)
@@ -45,7 +45,7 @@ public:
    * @brief Standard constructor to unassigned object.
    * @SINCE_1_0.0
    */
-  IntrusivePtr() : mPtr( 0 ) {}
+  IntrusivePtr() : mPtr( nullptr ) {}
 
   /**
    * @brief Constructor to attach existing object.
@@ -264,7 +264,7 @@ public:
    */
   operator BooleanType() const
   {
-    return mPtr ? &IntrusivePtr::ThisIsSaferThanReturningVoidStar : 0;
+    return mPtr ? &IntrusivePtr::ThisIsSaferThanReturningVoidStar : nullptr;
   }
 
   /**
@@ -277,7 +277,7 @@ public:
   T* Detach()
   {
     T* ptr = mPtr;
-    mPtr = 0;
+    mPtr = nullptr;
     return ptr;
   }
 
index 606864d..d425419 100644 (file)
@@ -154,7 +154,7 @@ public:
    */
   virtual Extension* GetExtension()
   {
-    return NULL;
+    return nullptr;
   }
 
 protected:
index c5cf47e..c9d5377 100644 (file)
@@ -54,7 +54,7 @@ inline float Range(float f0, float f1)
   static bool initialized( false );
   if( !initialized )
   {
-    uint32_t seed = static_cast<uint32_t>( time( NULL ) );
+    uint32_t seed = static_cast<uint32_t>( time( nullptr ) );
     srand( seed );
     initialized = true;
   }
index 9930271..8e8dfde 100644 (file)
@@ -25,7 +25,7 @@ namespace Dali
 {
 
 Any::Any()
-: mContainer( NULL )
+: mContainer( nullptr )
 {
 }
 
@@ -33,10 +33,10 @@ Any::~Any()
 {
   // Call the implementation deletion function, which will invalidate mContainer
 
-  if ( NULL != mContainer )
+  if ( nullptr != mContainer )
   {
     mContainer->mDeleteFunc( mContainer );
-    mContainer = NULL;
+    mContainer = nullptr;
   }
 }
 
@@ -44,16 +44,16 @@ Any& Any::operator=( const Any& any )
 {
   if( &any != this )
   {
-    if( NULL == any.mContainer )
+    if( nullptr == any.mContainer )
     {
       delete mContainer;
-      mContainer = NULL;
+      mContainer = nullptr;
     }
     else
     {
       AnyContainerBase* tmp = mContainer;
 
-      if( NULL != mContainer )
+      if( nullptr != mContainer )
       {
         // Check if two Any types have the same type. Avoids assignments of values with different types.
         if( mContainer->GetType() != any.GetType() )
index bacab90..d0ca1e2 100644 (file)
@@ -89,14 +89,14 @@ public:
   Any( const Any& any )
   {
     // If container isn't empty then copy the container?
-    if ( NULL != any.mContainer )
+    if ( nullptr != any.mContainer )
     {
       mContainer = any.mContainer->mCloneFunc( *any.mContainer );
     }
     else
     {
       // Otherwise mark new container as empty
-      mContainer = NULL;
+      mContainer = nullptr;
     }
   }
 
@@ -113,7 +113,7 @@ public:
   Any& operator=( const Type& value )
   {
     // If the container is empty then assign the new value
-    if ( NULL == mContainer )
+    if ( nullptr == mContainer )
     {
       mContainer = new AnyContainerImpl< Type >( value );
     }
@@ -176,7 +176,7 @@ public:
   template<typename Type>
   const Type& Get() const
   {
-    if ( NULL == mContainer )
+    if ( nullptr == mContainer )
     {
       AssertAlways( "Any::Get(). mContainer is NULL" );
     }
@@ -196,7 +196,7 @@ public:
   template<typename Type>
   Type* GetPointer()
   {
-    if( NULL == mContainer )
+    if( nullptr == mContainer )
     {
       return NULL;
     }
@@ -217,7 +217,7 @@ public:
   template<typename Type>
   const Type* GetPointer() const
   {
-    if( NULL == mContainer )
+    if( nullptr == mContainer )
     {
       return NULL;
     }
@@ -237,7 +237,7 @@ public:
    */
   bool Empty() const
   {
-    return ( NULL == mContainer ) ? true : false;
+    return ( nullptr == mContainer ) ? true : false;
   }
 
   struct AnyContainerBase;    // Forward declaration for typedef
index 775e599..c339c63 100644 (file)
@@ -77,12 +77,12 @@ const BaseObject& BaseHandle::GetBaseObject() const
 
 void BaseHandle::Reset()
 {
-  mObjectHandle = NULL;
+  mObjectHandle = nullptr;
 }
 
 BaseHandle::operator BaseHandle::BooleanType() const
 {
-  return mObjectHandle ? &BaseHandle::ThisIsSaferThanReturningVoidStar : NULL;
+  return mObjectHandle ? &BaseHandle::ThisIsSaferThanReturningVoidStar : nullptr;
 }
 
 bool BaseHandle::operator==(const BaseHandle& rhs) const
index 84a752b..e5d6f6a 100644 (file)
@@ -148,7 +148,7 @@ public:
    */
   virtual Extension* GetExtension()
   {
-    return NULL;
+    return nullptr;
   }
 };
 
index a45cb3e..d458109 100644 (file)
@@ -212,7 +212,7 @@ Property::Value* Property::Map::Find( const char* key ) const
       return &iter.second;
     }
   }
-  return NULL; // Not found
+  return nullptr; // Not found
 }
 
 Property::Value* Property::Map::Find( const std::string& key ) const
@@ -231,7 +231,7 @@ Property::Value* Property::Map::Find( Property::Index key ) const
       return &iter.second;
     }
   }
-  return NULL; // Not found
+  return nullptr; // Not found
 }
 
 Property::Value* Property::Map::Find( Property::Index indexKey, const std::string& stringKey ) const
@@ -255,7 +255,7 @@ Property::Value* Property::Map::Find( const std::string& key, Property::Type typ
       return &iter.second;
     }
   }
-  return NULL; // Not found
+  return nullptr; // Not found
 }
 
 Property::Value* Property::Map::Find( Property::Index key, Property::Type type ) const
@@ -269,7 +269,7 @@ Property::Value* Property::Map::Find( Property::Index key, Property::Type type )
       return &iter.second;
     }
   }
-  return NULL; // Not found
+  return nullptr; // Not found
 }
 
 void Property::Map::Clear()
index 7e76dda..d0726dc 100644 (file)
@@ -73,7 +73,7 @@ RenderTask& RenderTask::operator=( RenderTask&& rhs ) =  default;
 void RenderTask::SetSourceActor( Actor actor )
 {
   // NULL handle is allowed
-  Internal::Actor* actorImpl( NULL );
+  Internal::Actor* actorImpl( nullptr );
   if ( actor )
   {
     actorImpl = &GetImplementation( actor );
@@ -100,7 +100,7 @@ bool RenderTask::IsExclusive() const
 void RenderTask::SetCameraActor( CameraActor cameraActor )
 {
   // NULL handle is allowed
-  Internal::CameraActor* actorImpl( NULL );
+  Internal::CameraActor* actorImpl( nullptr );
   if ( cameraActor )
   {
     actorImpl = &GetImplementation( cameraActor );
@@ -116,7 +116,7 @@ CameraActor RenderTask::GetCameraActor() const
 
 void RenderTask::SetFrameBuffer( FrameBuffer frameBuffer )
 {
-  Internal::FrameBuffer* frameBufferPtr( NULL );
+  Internal::FrameBuffer* frameBufferPtr( nullptr );
   if( frameBuffer )
   {
     frameBufferPtr = &GetImplementation( frameBuffer );
index ae3440d..127533a 100644 (file)
@@ -62,7 +62,7 @@ void TextureSet::SetTexture( size_t index, Texture texture )
   }
   else
   {
-    GetImplementation(*this).SetTexture( static_cast<uint32_t>( index ), NULL ); // only support 4,294,967,295 textures
+    GetImplementation(*this).SetTexture( static_cast<uint32_t>( index ), nullptr ); // only support 4,294,967,295 textures
   }
 }
 
@@ -81,7 +81,7 @@ void TextureSet::SetSampler( size_t index, Sampler sampler )
   }
   else
   {
-    GetImplementation(*this).SetSampler( static_cast<uint32_t>( index ), NULL ); // only support 4,294,967,295 samplers
+    GetImplementation(*this).SetSampler( static_cast<uint32_t>( index ), nullptr ); // only support 4,294,967,295 samplers
   }
 }
 
index b03f9d0..a26a0c8 100644 (file)
@@ -78,7 +78,7 @@ std::size_t BaseSignal::GetConnectionCount() const
   for( std::size_t i = 0; i < size; ++i )
   {
     // Note that values are set to NULL in DeleteConnection
-    if ( NULL != mSignalConnections[i] )
+    if ( nullptr != mSignalConnections[i] )
     {
       ++count;
     }
@@ -118,7 +118,7 @@ void BaseSignal::Emit()
 
 void BaseSignal::OnConnect( CallbackBase* callback )
 {
-  DALI_ASSERT_ALWAYS( NULL != callback && "Invalid member function pointer passed to Connect()" );
+  DALI_ASSERT_ALWAYS( nullptr != callback && "Invalid member function pointer passed to Connect()" );
 
   int32_t index = FindCallback( callback );
 
@@ -139,7 +139,7 @@ void BaseSignal::OnConnect( CallbackBase* callback )
 
 void BaseSignal::OnDisconnect( CallbackBase* callback )
 {
-  DALI_ASSERT_ALWAYS( NULL != callback && "Invalid member function pointer passed to Disconnect()" );
+  DALI_ASSERT_ALWAYS( nullptr != callback && "Invalid member function pointer passed to Disconnect()" );
 
   int32_t index = FindCallback( callback );
 
@@ -154,8 +154,8 @@ void BaseSignal::OnDisconnect( CallbackBase* callback )
 
 void BaseSignal::OnConnect( ConnectionTrackerInterface* tracker, CallbackBase* callback )
 {
-  DALI_ASSERT_ALWAYS( NULL != tracker  && "Invalid ConnectionTrackerInterface pointer passed to Connect()" );
-  DALI_ASSERT_ALWAYS( NULL != callback && "Invalid member function pointer passed to Connect()" );
+  DALI_ASSERT_ALWAYS( nullptr != tracker  && "Invalid ConnectionTrackerInterface pointer passed to Connect()" );
+  DALI_ASSERT_ALWAYS( nullptr != callback && "Invalid member function pointer passed to Connect()" );
 
   int32_t index = FindCallback( callback );
 
@@ -179,8 +179,8 @@ void BaseSignal::OnConnect( ConnectionTrackerInterface* tracker, CallbackBase* c
 
 void BaseSignal::OnDisconnect( ConnectionTrackerInterface* tracker, CallbackBase* callback )
 {
-  DALI_ASSERT_ALWAYS( NULL != tracker  && "Invalid ConnectionTrackerInterface pointer passed to Disconnect()" );
-  DALI_ASSERT_ALWAYS( NULL != callback && "Invalid member function pointer passed to Disconnect()" );
+  DALI_ASSERT_ALWAYS( nullptr != tracker  && "Invalid ConnectionTrackerInterface pointer passed to Disconnect()" );
+  DALI_ASSERT_ALWAYS( nullptr != callback && "Invalid member function pointer passed to Disconnect()" );
 
   int32_t index = FindCallback( callback );
 
@@ -226,7 +226,7 @@ CallbackBase* BaseSignal::GetCallback( std::size_t connectionIndex ) const
 {
   DALI_ASSERT_ALWAYS( connectionIndex < mSignalConnections.Count() && "GetCallback called with invalid index" );
 
-  CallbackBase* callback( NULL );
+  CallbackBase* callback( nullptr );
 
   SignalConnection* connection( mSignalConnections[ connectionIndex ] );
 
@@ -275,7 +275,7 @@ void BaseSignal::DeleteConnection( std::size_t connectionIndex )
     // IMPORTANT - do not remove from items from mSignalConnections, set to NULL instead.
     // Signal Emit() methods require that connection count is not reduced while iterating
     // i.e. DeleteConnection can be called from within callbacks, while iterating through mSignalConnections.
-    mSignalConnections[ connectionIndex ] = NULL;
+    mSignalConnections[ connectionIndex ] = nullptr;
   }
   else
   {
@@ -295,7 +295,7 @@ void BaseSignal::CleanupConnections()
     // process the whole vector
     for( std::size_t i = 0; i < total; ++i )
     {
-      if( mSignalConnections[ index ] == NULL )
+      if( mSignalConnections[ index ] == nullptr )
       {
         // items will be moved so don't increase index (erase will decrease the count of vector)
         mSignalConnections.Erase( mSignalConnections.Begin() + index );
@@ -312,7 +312,7 @@ void BaseSignal::CleanupConnections()
 // BaseSignal::EmitGuard
 
 BaseSignal::EmitGuard::EmitGuard( bool& flag )
-: mFlag( NULL )
+: mFlag( nullptr )
 {
   if( !flag )
   {
@@ -337,7 +337,7 @@ BaseSignal::EmitGuard::~EmitGuard()
 bool BaseSignal::EmitGuard::ErrorOccurred()
 {
   // mFlag is NULL when Emit() is called during Emit()
-  return (NULL == mFlag);
+  return (nullptr == mFlag);
 }
 
 } // namespace Dali
index 6bbf33f..bd3787c 100644 (file)
@@ -25,8 +25,8 @@ namespace Dali
 // CallbackBase
 
 CallbackBase::CallbackBase()
-: mImpl( NULL ),
-  mFunction( NULL )
+: mImpl( nullptr ),
+  mFunction( nullptr )
 {
 }
 
@@ -36,7 +36,7 @@ CallbackBase::~CallbackBase()
 }
 
 CallbackBase::CallbackBase( Function function )
-: mImpl( NULL ),
+: mImpl( nullptr ),
   mFunction( function )
 {
 }
@@ -49,7 +49,7 @@ CallbackBase::CallbackBase( void* object, MemberFunction function, Dispatcher di
   {
     mImpl->mObjectPointer = object;
     mImpl->mMemberFunctionDispatcher = dispatcher;
-    mImpl->mDestructorDispatcher = NULL; // object is not owned
+    mImpl->mDestructorDispatcher = nullptr; // object is not owned
   }
 }
 
@@ -78,18 +78,18 @@ void CallbackBase::Reset()
     }
 
     delete mImpl;
-    mImpl = NULL;
+    mImpl = nullptr;
   }
 
-  mFunction = NULL;
+  mFunction = nullptr;
 }
 
 // CallbackBase::Impl
 
 CallbackBase::Impl::Impl()
-: mObjectPointer( NULL ),
-  mMemberFunctionDispatcher( NULL ),
-  mDestructorDispatcher( NULL )
+: mObjectPointer( nullptr ),
+  mMemberFunctionDispatcher( nullptr ),
+  mDestructorDispatcher( nullptr )
 {
 }
 
index a4bb208..aaef473 100644 (file)
@@ -48,7 +48,7 @@ SlotObserver* SlotConnection::GetSlotObserver()
 }
 
 SignalConnection::SignalConnection( CallbackBase* callback )
-: mSignalObserver( NULL ),
+: mSignalObserver( nullptr ),
   mCallback( callback )
 {
 }
@@ -71,12 +71,12 @@ void SignalConnection::Disconnect( SlotObserver* slotObserver )
   {
     // tell the slot the signal wants to disconnect
     mSignalObserver->SignalDisconnected( slotObserver, mCallback );
-    mSignalObserver = NULL;
+    mSignalObserver = nullptr;
   }
 
   // we own the callback, SignalObserver is expected to delete the SlotConnection on Disconnected so its pointer to our mCallback is no longer used
   delete mCallback;
-  mCallback = NULL;
+  mCallback = nullptr;
 }
 
 CallbackBase* SignalConnection::GetCallback()