From b78a12e283a91611b55308aa9a794de3f3321b82 Mon Sep 17 00:00:00 2001 From: taeyoon Date: Wed, 26 Aug 2015 16:19:49 +0900 Subject: [PATCH] Fix VD prevent issues - Add copy constructor & assignment operator (undefined, private member) - Add KeyFrameBaseSpec& operator=(...) Change-Id: I02677edba93b122fe59ad3d0e9ee2a4155d5b8fb --- dali/internal/common/fixed-size-memory-pool.cpp | 7 +++++++ dali/internal/common/fixed-size-memory-pool.h | 8 ++++++++ dali/internal/common/memory-pool-object-allocator.h | 8 ++++++++ dali/internal/event/animation/key-frames-impl.h | 12 ++++++++++++ dali/internal/event/common/notification-manager.h | 8 ++++++++ dali/internal/update/resources/resource-manager.h | 8 ++++++++ dali/public-api/object/property-value.cpp | 1 + 7 files changed, 52 insertions(+) diff --git a/dali/internal/common/fixed-size-memory-pool.cpp b/dali/internal/common/fixed-size-memory-pool.cpp index 5ee0377..8b69193 100644 --- a/dali/internal/common/fixed-size-memory-pool.cpp +++ b/dali/internal/common/fixed-size-memory-pool.cpp @@ -61,6 +61,13 @@ struct FixedSizeMemoryPool::Impl { ::operator delete( blockMemory ); } + + private: + // Undefined + Block( const Block& block ); + + // Undefined + Block& operator=( const Block& block ); }; /** diff --git a/dali/internal/common/fixed-size-memory-pool.h b/dali/internal/common/fixed-size-memory-pool.h index bec2c03..4389106 100644 --- a/dali/internal/common/fixed-size-memory-pool.h +++ b/dali/internal/common/fixed-size-memory-pool.h @@ -89,6 +89,14 @@ public: private: + // Undefined + FixedSizeMemoryPool( const FixedSizeMemoryPool& fixedSizeMemoryPool ); + + // Undefined + FixedSizeMemoryPool& operator=( const FixedSizeMemoryPool& fixedSizeMemoryPool ); + +private: + struct Impl; Impl* mImpl; diff --git a/dali/internal/common/memory-pool-object-allocator.h b/dali/internal/common/memory-pool-object-allocator.h index c110096..0349cf8 100644 --- a/dali/internal/common/memory-pool-object-allocator.h +++ b/dali/internal/common/memory-pool-object-allocator.h @@ -106,6 +106,14 @@ public: private: + // Undefined + MemoryPoolObjectAllocator( const MemoryPoolObjectAllocator& memoryPoolObjectAllocator ); + + // Undefined + MemoryPoolObjectAllocator& operator=( const MemoryPoolObjectAllocator& memoryPoolObjectAllocator ); + +private: + FixedSizeMemoryPool* mPool; ///< Memory pool from which allocations are made }; diff --git a/dali/internal/event/animation/key-frames-impl.h b/dali/internal/event/animation/key-frames-impl.h index cfd0be5..cc574ff 100644 --- a/dali/internal/event/animation/key-frames-impl.h +++ b/dali/internal/event/animation/key-frames-impl.h @@ -171,6 +171,18 @@ protected: mKeyFrames = new KeyFrameChannel(KeyFrameChannelBase::Translate, mPVs); } + KeyFrameBaseSpec& operator=( const KeyFrameBaseSpec& keyFrames ) + { + if( *this != keyFrames ) + { + mPVs.clear(); + mPVs = keyFrames.mPVs; + delete mKeyFrames; + mKeyFrames = new KeyFrameChannel(KeyFrameChannelBase::Translate, mPVs); + } + return *this; + } + /** * Destructor. Ensure progress value pairs are cleared down */ diff --git a/dali/internal/event/common/notification-manager.h b/dali/internal/event/common/notification-manager.h index 52775e2..a83efb5 100644 --- a/dali/internal/event/common/notification-manager.h +++ b/dali/internal/event/common/notification-manager.h @@ -81,6 +81,14 @@ public: private: + // Undefined + NotificationManager( const NotificationManager& notificationManager ); + + // Undefined + NotificationManager& operator=( const NotificationManager& notificationManager ); + +private: + struct Impl; Impl* mImpl; diff --git a/dali/internal/update/resources/resource-manager.h b/dali/internal/update/resources/resource-manager.h index 08aaad8..8a28390 100644 --- a/dali/internal/update/resources/resource-manager.h +++ b/dali/internal/update/resources/resource-manager.h @@ -353,6 +353,14 @@ public: void DiscardDeadResources( BufferIndex updateBufferIndex ); private: + + // Undefined + ResourceManager( const ResourceManager& resourceManager ); + + // Undefined + ResourceManager& operator=( const ResourceManager& rhs ); + +private: struct ResourceManagerImpl; ResourceManagerImpl* mImpl; }; diff --git a/dali/public-api/object/property-value.cpp b/dali/public-api/object/property-value.cpp index addc11b..85f407f 100644 --- a/dali/public-api/object/property-value.cpp +++ b/dali/public-api/object/property-value.cpp @@ -387,6 +387,7 @@ Property::Value::Value( Type type ) } } } + Property::Value::Value( const Property::Value& value ) : mImpl( NULL ) { -- 2.7.4