Alignment: To use default copy constructor in the constraints 64/29864/1
authorXiangyin Ma <x1.ma@samsung.com>
Wed, 5 Nov 2014 11:10:53 +0000 (11:10 +0000)
committerXiangyin Ma <x1.ma@samsung.com>
Wed, 5 Nov 2014 11:12:01 +0000 (11:12 +0000)
[Problem] Klocwork issues

[Cause] Class defines a copy contructor, but not assignment operator

[Solution] The default copy contructor has the same behaviour with the current defined ones
           So remove them and use the default one instead

Change-Id: I0ff86d4b44d4ed07f2929b530359d83461712279

base/dali-toolkit/internal/controls/alignment/alignment-impl.cpp

index 095b278..48ae00e 100644 (file)
@@ -54,14 +54,6 @@ struct ScaleToFillConstraint
   {}
 
   /**
-   * CopyConstructor. Used by Boost.
-   * @param rhs Copying from.
-   */
-  ScaleToFillConstraint( const ScaleToFillConstraint& rhs )
-  : mPadding( rhs.mPadding )
-  {}
-
-  /**
    * Called by render thread
    */
   Vector3 operator()( const Vector3& currentSize,
@@ -100,16 +92,6 @@ struct ScaleToFitKeepAspectConstraint
   {}
 
   /**
-   * CopyConstructor. Used by Boost.
-   * @param rhs Copying from.
-   */
-  ScaleToFitKeepAspectConstraint( const ScaleToFitKeepAspectConstraint& rhs )
-  : mPadding( rhs.mPadding ),
-    mSizeStored( rhs.mSizeStored ),
-    mOriginalSize( rhs.mOriginalSize )
-  {}
-
-  /**
    * Called by render thread
    */
   Vector3 operator()( const Vector3& currentSize,
@@ -158,16 +140,6 @@ struct ScaleToFillKeepAspectConstraint
   { }
 
   /**
-   * CopyConstructor. Used by Boost.
-   * @param rhs Copying from.
-   */
-  ScaleToFillKeepAspectConstraint( const ScaleToFillKeepAspectConstraint& rhs )
-  : mPadding( rhs.mPadding ),
-    mSizeStored( rhs.mSizeStored ),
-    mOriginalSize( rhs.mOriginalSize )
-  {}
-
-  /**
    * Called by render thread
    */
   Vector3 operator()( const Vector3& currentSize,
@@ -216,16 +188,6 @@ struct ShrinkToFitConstraint
   {}
 
   /**
-   * CopyConstructor. Used by Boost.
-   * @param rhs Copying from.
-   */
-  ShrinkToFitConstraint( const ShrinkToFitConstraint& rhs )
-  : mPadding( rhs.mPadding ),
-    mSizeStored( rhs.mSizeStored ),
-    mOriginalSize( rhs.mOriginalSize )
-  { }
-
-  /**
    * Called by render thread
    */
   Vector3 operator()( const Vector3& currentSize,
@@ -277,16 +239,6 @@ struct ShrinkToFitKeepAspectConstraint
   {}
 
   /**
-   * CopyConstructor. Used by Boost.
-   * @param rhs Copying from.
-   */
-  ShrinkToFitKeepAspectConstraint( const ShrinkToFitKeepAspectConstraint& rhs )
-  : mPadding( rhs.mPadding ),
-    mSizeStored( rhs.mSizeStored ),
-    mOriginalSize( rhs.mOriginalSize )
-  { }
-
-  /**
    * Called by render thread
    */
   Vector3 operator()( const Vector3& currentSize,
@@ -340,16 +292,6 @@ struct PositionConstraint
   {}
 
   /**
-   * CopyConstructor. Used by Boost.
-   * @param rhs Copying from.
-   */
-  PositionConstraint( const PositionConstraint& rhs )
-  : mPadding( rhs.mPadding ),
-    mHorizontalAlignment( rhs.mHorizontalAlignment ),
-    mVerticalAlignment( rhs.mVerticalAlignment )
-  {}
-
-  /**
    * Called by render thread.
    */
   Vector3 operator()( const Vector3& currentPosition,