Saving a bit of memory by using pretty function instead of full file name
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / alignment / alignment-impl.cpp
index 095b278..bd8dc04 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,
@@ -451,43 +393,31 @@ Toolkit::Alignment Alignment::New( Toolkit::Alignment::Type horizontal, Toolkit:
 void Alignment::SetAlignmentType( Toolkit::Alignment::Type type )
 {
   // Horizontal Alignment
-  bool horizontalSet(false);
-
+  if( type & Toolkit::Alignment::HorizontalRight )
+  {
+    mHorizontal = Toolkit::Alignment::HorizontalRight;
+  }
   if( type & Toolkit::Alignment::HorizontalLeft )
   {
     mHorizontal = Toolkit::Alignment::HorizontalLeft;
-    horizontalSet = true;
   }
   if( type & Toolkit::Alignment::HorizontalCenter )
   {
-    DALI_ASSERT_ALWAYS(!horizontalSet);
     mHorizontal = Toolkit::Alignment::HorizontalCenter;
-    horizontalSet = true;
-  }
-  if( type & Toolkit::Alignment::HorizontalRight )
-  {
-    DALI_ASSERT_ALWAYS(!horizontalSet);
-    mHorizontal = Toolkit::Alignment::HorizontalRight;
   }
 
   // Vertical Alignment
-  bool verticalSet(false);
-
+  if( type & Toolkit::Alignment::VerticalBottom )
+  {
+    mVertical = Toolkit::Alignment::VerticalBottom;
+  }
   if( type & Toolkit::Alignment::VerticalTop )
   {
     mVertical = Toolkit::Alignment::VerticalTop;
-    verticalSet = true;
   }
   if( type & Toolkit::Alignment::VerticalCenter )
   {
-    DALI_ASSERT_ALWAYS(!verticalSet);
     mVertical = Toolkit::Alignment::VerticalCenter;
-    verticalSet = true;
-  }
-  if( type & Toolkit::Alignment::VerticalBottom )
-  {
-    DALI_ASSERT_ALWAYS(!verticalSet);
-    mVertical = Toolkit::Alignment::VerticalBottom;
   }
 
   RelayoutRequest();