use modern construct 'override' in the derive class.
[platform/core/uifw/dali-core.git] / dali / internal / event / animation / property-input-indexer.h
index c19bf14..e9088af 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_PROPERTY_INPUT_INDEXER_H__
-#define __DALI_PROPERTY_INPUT_INDEXER_H__
+#ifndef DALI_PROPERTY_INPUT_INDEXER_H
+#define DALI_PROPERTY_INPUT_INDEXER_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -61,8 +61,11 @@ public:
    */
   PropertyInputIndexer& operator=( const PropertyInputIndexer& other )
   {
-    mBufferIndex = other.mBufferIndex;
-    mInput = other.mInput;
+    if( this != &other )
+    {
+      mBufferIndex = other.mBufferIndex;
+      mInput = other.mInput;
+    }
 
     return *this;
   }
@@ -70,14 +73,14 @@ public:
   /**
    * Virtual Destructor
    */
-  virtual ~PropertyInputIndexer()
+  ~PropertyInputIndexer() override
   {
   }
 
   /**
    * @copydoc Dali::Internal::PropertyInput::GetType()
    */
-  virtual Property::Type GetType() const
+  Property::Type GetType() const override
   {
     return mInput->GetType();
   }
@@ -85,7 +88,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInput::GetBoolean()
    */
-  virtual const bool& GetBoolean() const
+  const bool& GetBoolean() const override
   {
     return mInput->GetConstraintInputBoolean( mBufferIndex );
   }
@@ -93,7 +96,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInput::GetInteger()
    */
-  virtual const int& GetInteger() const
+  const int& GetInteger() const override
   {
     return mInput->GetConstraintInputInteger( mBufferIndex );
   }
@@ -101,7 +104,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInput::GetFloat()
    */
-  virtual const float& GetFloat() const
+  const float& GetFloat() const override
   {
     return mInput->GetConstraintInputFloat( mBufferIndex );
   }
@@ -109,7 +112,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInput::GetVector2()
    */
-  virtual const Vector2& GetVector2() const
+  const Vector2& GetVector2() const override
   {
     return mInput->GetConstraintInputVector2( mBufferIndex );
   }
@@ -117,7 +120,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInput::GetVector3()
    */
-  virtual const Vector3& GetVector3() const
+  const Vector3& GetVector3() const override
   {
     return mInput->GetConstraintInputVector3( mBufferIndex );
   }
@@ -125,7 +128,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInput::GetVector4()
    */
-  virtual const Vector4& GetVector4() const
+  const Vector4& GetVector4() const override
   {
     return mInput->GetConstraintInputVector4( mBufferIndex );
   }
@@ -133,7 +136,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInput::GetMatrix3()
    */
-  virtual const Matrix3& GetMatrix3() const
+  const Matrix3& GetMatrix3() const override
   {
     return mInput->GetConstraintInputMatrix3( mBufferIndex );
   }
@@ -141,7 +144,7 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInput::GetMatrix()
    */
-  virtual const Matrix& GetMatrix() const
+  const Matrix& GetMatrix() const override
   {
     return mInput->GetConstraintInputMatrix( mBufferIndex );
   }
@@ -149,14 +152,14 @@ public:
   /**
    * @copydoc Dali::Internal::PropertyInput::Quaternion()
    */
-  virtual const Quaternion& GetQuaternion() const
+  const Quaternion& GetQuaternion() const override
   {
     return mInput->GetConstraintInputQuaternion( mBufferIndex );
   }
 
 public:
 
-  unsigned int mBufferIndex;
+  BufferIndex mBufferIndex;
   const AccessorType* mInput;
 };
 
@@ -164,4 +167,4 @@ public:
 
 } // namespace Dali
 
-#endif // __DALI_PROPERTY_INPUT_INDEXER_H__
+#endif // DALI_PROPERTY_INPUT_INDEXER_H