use modern construct 'override' in the derive class.
[platform/core/uifw/dali-core.git] / dali / internal / event / animation / key-frame-channel.h
index 548389c..05e5fde 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_KEY_FRAME_CHANNEL_H__
-#define __DALI_INTERNAL_KEY_FRAME_CHANNEL_H__
+#ifndef DALI_INTERNAL_KEY_FRAME_CHANNEL_H
+#define DALI_INTERNAL_KEY_FRAME_CHANNEL_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,7 +61,7 @@ template <typename V>
 class KeyFrameChannel : public KeyFrameChannelBase
 {
 public:
-  typedef std::vector<ProgressValue<V> > ProgressValues;
+  using ProgressValues = std::vector<ProgressValue<V> >;
 
   KeyFrameChannel(KeyFrameChannelId channel_id, ProgressValues& values )
   : KeyFrameChannelBase(channel_id),
@@ -70,11 +70,11 @@ public:
   }
 
 
-  virtual ~KeyFrameChannel()
+  ~KeyFrameChannel() override
   {
   }
 
-  bool IsActive (float progress);
+  bool IsActive (float progress) override;
 
   V GetValue(float progress, Dali::Animation::Interpolation interpolation) const;
 
@@ -155,7 +155,7 @@ V KeyFrameChannel<V>::GetValue (float progress, Dali::Animation::Interpolation i
   {
     float frameProgress = (progress - start->GetProgress()) / (end->GetProgress() - start->GetProgress());
 
-    if( interpolation == Dali::Animation::Linear )
+    if( interpolation == Dali::Animation::LINEAR )
     {
       Interpolate(interpolatedV, start->GetValue(), end->GetValue(), frameProgress);
     }
@@ -191,15 +191,14 @@ V KeyFrameChannel<V>::GetValue (float progress, Dali::Animation::Interpolation i
   return interpolatedV;
 }
 
-typedef KeyFrameChannel<float>      KeyFrameChannelNumber;
-typedef KeyFrameChannel<Vector2>    KeyFrameChannelVector2;
-typedef KeyFrameChannel<Vector3>    KeyFrameChannelVector3;
-typedef KeyFrameChannel<Vector4>    KeyFrameChannelVector4;
-typedef KeyFrameChannel<Quaternion> KeyFrameChannelQuaternion;
-typedef KeyFrameChannel<AngleAxis>  KeyFrameChannelAngleAxis;
-
+using KeyFrameChannelNumber     = KeyFrameChannel<float>;
+using KeyFrameChannelVector2    = KeyFrameChannel<Vector2>;
+using KeyFrameChannelVector3    = KeyFrameChannel<Vector3>;
+using KeyFrameChannelVector4    = KeyFrameChannel<Vector4>;
+using KeyFrameChannelQuaternion = KeyFrameChannel<Quaternion>;
+using KeyFrameChannelAngleAxis  = KeyFrameChannel<AngleAxis>;
 
 } // Internal
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_KEY_FRAME_CHANNEL_H__
+#endif // DALI_INTERNAL_KEY_FRAME_CHANNEL_H