Removed bogus consts and fixed out-of-line definitions. 63/33263/2
authorFrancisco Santos <f1.santos@samsung.com>
Wed, 7 Jan 2015 11:43:06 +0000 (11:43 +0000)
committerFrancisco Santos <f1.santos@samsung.com>
Wed, 7 Jan 2015 17:16:08 +0000 (09:16 -0800)
Change-Id: I7767b19450811bf0f5467fc7e64dc3a3ea592528

16 files changed:
dali/integration-api/shader-data.h
dali/internal/event/events/hover-event-processor.h
dali/internal/event/events/touch-event-processor.h
dali/internal/event/modeling/material-impl.cpp
dali/internal/event/modeling/material-impl.h
dali/internal/event/resources/archive.h
dali/internal/render/shaders/custom-uniform.cpp
dali/internal/render/shaders/custom-uniform.h
dali/public-api/actors/actor.cpp
dali/public-api/actors/actor.h
dali/public-api/geometry/spline.cpp
dali/public-api/geometry/spline.h
dali/public-api/modeling/entity-animator-map.h
dali/public-api/modeling/material.cpp
dali/public-api/modeling/material.h
dali/public-api/text/text-style.cpp

index 7cb75cf..1775204 100644 (file)
@@ -135,7 +135,7 @@ public: // API
    * Get the data that the buffer points to
    * @return raw pointer to the buffer data
    */
-  unsigned char* const GetBufferData()
+  unsigned char* GetBufferData()
   {
     DALI_ASSERT_DEBUG( mBuffer.size() > 0 );
     return &mBuffer[0];
index 2457551..d28989e 100644 (file)
@@ -37,7 +37,7 @@ struct HoverEvent;
 namespace Internal
 {
 
-class ActorObserver;
+struct ActorObserver;
 class Stage;
 
 /**
index c07a131..a7d64b9 100644 (file)
@@ -39,7 +39,7 @@ namespace Internal
 
 class Actor;
 class Stage;
-class ActorObserver;
+struct ActorObserver;
 
 /**
  * <h3>Multi-Touch Event Processing:</h3>
index 8d84f48..310ed1b 100644 (file)
@@ -433,7 +433,7 @@ void Material::SetMapU(const unsigned int map)
   SendPropertiesToSceneObject();
 }
 
-const unsigned int Material::GetMapU() const
+unsigned int Material::GetMapU() const
 {
   return mProperties.mMapU;
 }
@@ -444,7 +444,7 @@ void Material::SetMapV(const unsigned int map)
   SendPropertiesToSceneObject();
 }
 
-const unsigned int Material::GetMapV() const
+unsigned int Material::GetMapV() const
 {
   return mProperties.mMapV;
 }
@@ -455,7 +455,7 @@ void Material::SetDiffuseUVIndex(const int index)
   SendPropertiesToSceneObject();
 }
 
-const unsigned int Material::GetDiffuseUVIndex() const
+unsigned int Material::GetDiffuseUVIndex() const
 {
   return mProperties.mDiffuseUVIndex;
 }
@@ -466,7 +466,7 @@ void Material::SetOpacityUVIndex(const int index)
   SendPropertiesToSceneObject();
 }
 
-const unsigned int Material::GetOpacityUVIndex() const
+unsigned int Material::GetOpacityUVIndex() const
 {
   return mProperties.mOpacityUVIndex;
 }
@@ -477,7 +477,7 @@ void Material::SetNormalUVIndex(const int index)
   SendPropertiesToSceneObject();
 }
 
-const unsigned int Material::GetNormalUVIndex() const
+unsigned int Material::GetNormalUVIndex() const
 {
   return mProperties.mNormalUVIndex;
 }
@@ -488,7 +488,7 @@ void Material::SetHasHeightMap(const bool flag)
   SendPropertiesToSceneObject();
 }
 
-const bool Material::GetHasHeightMap() const
+bool Material::GetHasHeightMap() const
 {
   return mProperties.mHasHeightMap;
 }
index 44829af..c6f35b2 100644 (file)
@@ -262,7 +262,7 @@ public:
   /**
    * @copydoc Dali::Material::GetMapU
    */
-  const unsigned int GetMapU() const;
+  unsigned int GetMapU() const;
 
   /**
    * @copydoc Dali::Material::SetMapV
@@ -272,7 +272,7 @@ public:
   /**
    * @copydoc Dali::Material::GetMapV
    */
-  const unsigned int GetMapV() const;
+  unsigned int GetMapV() const;
 
   /**
    * @copydoc Dali::Material::SetDiffuseUVIndex
@@ -282,7 +282,7 @@ public:
   /**
    * @copydoc Dali::Material::GetDiffuseUVIndex
    */
-  const unsigned int GetDiffuseUVIndex() const;
+  unsigned int GetDiffuseUVIndex() const;
 
   /**
    * @copydoc Dali::Material::SetOpacityUVIndex
@@ -292,7 +292,7 @@ public:
   /**
    * @copydoc Dali::Material::GetOpacityUVIndex
    */
-  const unsigned int GetOpacityUVIndex() const;
+  unsigned int GetOpacityUVIndex() const;
 
   /**
    * @copydoc Dali::Material::SetNormalUVIndex
@@ -302,7 +302,7 @@ public:
   /**
    * @copydoc Dali::Material::GetNormalUVIndex
    */
-  const unsigned int GetNormalUVIndex() const;
+  unsigned int GetNormalUVIndex() const;
 
   /**
    * @copydoc Dali::Material::SetHasHeightMap
@@ -312,7 +312,7 @@ public:
   /**
    * @copydoc Dali::Material::GetHasHeightMap
    */
-  const bool GetHasHeightMap() const;
+  bool GetHasHeightMap() const;
 
   const MaterialProperties& GetProperties() const
   {
index 2f23f93..2cd0d93 100644 (file)
@@ -229,7 +229,7 @@ public:
   /**
    * Get the archive version number read from the archive
    */
-  const unsigned int GetFileVersion() const
+  unsigned int GetFileVersion() const
   {
     return mFileVersion;
   }
index 99ee76f..082fbb5 100644 (file)
@@ -46,7 +46,7 @@ void CustomUniform::Reset()
   mCacheIndex = 0;
 }
 
-const int CustomUniform::GetUniformLocation( Program& program, const char* name )
+int CustomUniform::GetUniformLocation( Program& program, const char* name )
 {
   if( 0 == mCacheIndex )
   {
index 836a71d..e718f7f 100644 (file)
@@ -63,7 +63,7 @@ public: // API
    * @param program to use
    * @param name of the uniform
    */
-  const int GetUniformLocation( Program& program, const char* name );
+  int GetUniformLocation( Program& program, const char* name );
 
 private: // Data
 
index 1e8abf1..61d5213 100644 (file)
@@ -549,7 +549,7 @@ DynamicsJoint Actor::AddDynamicsJoint( Actor attachedActor, const Vector3& offse
 #endif
 }
 
-const int Actor::GetNumberOfJoints() const
+int Actor::GetNumberOfJoints() const
 {
 #ifdef DYNAMICS_SUPPORT
   return GetImplementation(*this).GetNumberOfJoints();
index 28f5be1..bc01a5c 100644 (file)
@@ -1299,7 +1299,7 @@ public: // Dynamics
    *
    * @return The number of DynamicsJoint objects added to this actor
    */
-  const int GetNumberOfJoints() const;
+  int GetNumberOfJoints() const;
 
   /**
    * @brief Get a joint by index.
index 3e76abb..4bb3a1e 100644 (file)
@@ -215,7 +215,7 @@ const Vector3 Spline::GetPoint(unsigned int segmentIndex, float s) const
 // Given a parameter s (NOT x), return the Y value. Checks that the
 // segment index is valid. For bezier splines, the last segment is
 // only used to specify the end point, so is not valid.
-const float  Spline::GetY(unsigned int segmentIndex, float s) const
+float  Spline::GetY(unsigned int segmentIndex, float s) const
 {
   DALI_ASSERT_ALWAYS( segmentIndex+1 < mKnots.size() && segmentIndex < mKnots.size() && "segmentIndex out of bounds");
   DALI_ASSERT_ALWAYS( mOutTangents.size() == mKnots.size() && "Spline not fully initialized" );
@@ -257,7 +257,7 @@ float ClampToZeroOne(float v)
 // Use de Casteljau subdivision to approximate the parameter required to find x
 // on a Bezier spline
 // note, atX is already determined to be >= P0_X, <P1_X
-const float Spline::ApproximateCubicBezierParameter (
+float Spline::ApproximateCubicBezierParameter (
   float atX, float P0_X, float C0_X, float C1_X, float P1_X ) const
 {
   if (fabs(atX - P0_X) < GetRangedEpsilon(atX, P0_X) )
@@ -312,7 +312,7 @@ const float Spline::ApproximateCubicBezierParameter (
 }
 
 
-const bool Spline::FindSegment(float x, /*out*/ int& segmentIndex) const
+bool Spline::FindSegment(float x, /*out*/ int& segmentIndex) const
 {
   bool found = false;
   unsigned int index=0;
@@ -338,7 +338,7 @@ const bool Spline::FindSegment(float x, /*out*/ int& segmentIndex) const
   return found;
 }
 
-const float Spline::GetYFromMonotonicX(float x) const
+float Spline::GetYFromMonotonicX(float x) const
 {
   int segmentIndex=0;
   float yValue = 0.0f;
index 279c9fa..a03e821 100644 (file)
@@ -166,7 +166,7 @@ public:
    * @param[in] x The X
    * @return the Y value
    */
-  const float GetYFromMonotonicX(float x) const;
+  float GetYFromMonotonicX(float x) const;
 
   /**
    * @brief For a 2 dimensional curve (z=0), given a parameter 0.0 - 1.0, return the
@@ -181,7 +181,7 @@ public:
    * @param[in] parameter    - the parameter to use in the parametric formula
    * @return y value    - the interpolated point's Y value
    */
-  const float GetY(unsigned int segmentIndex, float parameter) const;
+  float GetY(unsigned int segmentIndex, float parameter) const;
 
 
 private:
@@ -193,7 +193,7 @@ private:
    * @param[out] segmentIndex - the returned segment index
    * @return True if the segment was found.
    */
-  const bool FindSegment(float x, int& segmentIndex) const;
+  bool FindSegment(float x, int& segmentIndex) const;
 
   /**
    * @brief Given two knots and control points, interpolate to find the
@@ -208,7 +208,7 @@ private:
    * @param[in] P1_X the ending knot's X.
    * @return         the corresponding parameter.
    */
-  const float ApproximateCubicBezierParameter (float atX, float P0_X, float C0_X, float C1_X, float P1_X ) const;
+  float ApproximateCubicBezierParameter (float atX, float P0_X, float C0_X, float C1_X, float P1_X ) const;
 
 private:
   std::vector<Vector3>   mKnots;          ///< The set of knot points
index a12597e..aad24cc 100644 (file)
@@ -162,7 +162,7 @@ public:
    *
    * @return the duration in seconds
    */
-  const float GetDuration() const { return mDuration; }
+  float GetDuration() const { return mDuration; }
 
 private:
   std::string   mEntityName;          ///< The entity name
index 805d576..fc66886 100644 (file)
@@ -178,7 +178,7 @@ void Material::SetMapU(const unsigned int map)
   GetImplementation(*this).SetMapU(map);
 }
 
-const unsigned int Material::GetMapU() const
+unsigned int Material::GetMapU() const
 {
   return GetImplementation(*this).GetMapU();
 }
@@ -188,7 +188,7 @@ void Material::SetMapV(const unsigned int map)
   GetImplementation(*this).SetMapV(map);
 }
 
-const unsigned int Material::GetMapV() const
+unsigned int Material::GetMapV() const
 {
   return GetImplementation(*this).GetMapV();
 }
@@ -198,7 +198,7 @@ void Material::SetDiffuseUVIndex(const int index)
   GetImplementation(*this).SetDiffuseUVIndex(index);
 }
 
-const unsigned int Material::GetDiffuseUVIndex() const
+unsigned int Material::GetDiffuseUVIndex() const
 {
   return GetImplementation(*this).GetDiffuseUVIndex();
 }
@@ -208,7 +208,7 @@ void Material::SetOpacityUVIndex(const int index)
   GetImplementation(*this).SetOpacityUVIndex(index);
 }
 
-const unsigned int Material::GetOpacityUVIndex() const
+unsigned int Material::GetOpacityUVIndex() const
 {
   return GetImplementation(*this).GetOpacityUVIndex();
 }
@@ -218,7 +218,7 @@ void Material::SetNormalUVIndex(const int index)
   GetImplementation(*this).SetNormalUVIndex(index);
 }
 
-const unsigned int Material::GetNormalUVIndex() const
+unsigned int Material::GetNormalUVIndex() const
 {
   return GetImplementation(*this).GetNormalUVIndex();
 }
@@ -228,7 +228,7 @@ void Material::SetHasHeightMap(const bool flag)
   GetImplementation(*this).SetHasHeightMap(flag);
 }
 
-const bool Material::GetHasHeightMap() const
+bool Material::GetHasHeightMap() const
 {
   return GetImplementation(*this).GetHasHeightMap();
 }
index e7f6d4d..ceb9df7 100644 (file)
@@ -309,7 +309,7 @@ public:
    *
    * @return The mapping mode
    */
-  const unsigned int GetMapU() const;
+  unsigned int GetMapU() const;
 
   /**
    * @brief Set the V mapping mode.
@@ -323,7 +323,7 @@ public:
    *
    * @return The mapping mode
    */
-  const unsigned int GetMapV() const;
+  unsigned int GetMapV() const;
 
   /**
    * @brief Set the index into the bound mesh's array of UV's for the diffuse texture coordinates.
@@ -337,7 +337,7 @@ public:
    *
    * @return The uv index
    */
-  const unsigned int GetDiffuseUVIndex() const;
+  unsigned int GetDiffuseUVIndex() const;
 
   /**
    * @brief Set the index into the bound mesh's array of UV's for the opacity texture coordinates.
@@ -351,7 +351,7 @@ public:
    *
    * @return The uv index
    */
-  const unsigned int GetOpacityUVIndex() const;
+  unsigned int GetOpacityUVIndex() const;
 
   /**
    * @brief Set the index into the bound mesh's array of UV's for the normal/height map texture coordinates.
@@ -365,7 +365,7 @@ public:
    *
    * @return The uv index
    */
-  const unsigned int GetNormalUVIndex() const;
+  unsigned int GetNormalUVIndex() const;
 
   /**
    * @brief Set whether the normal texture contains a normal or height map.
@@ -379,7 +379,7 @@ public:
    *
    * @return true if the normal map contains a height map, false otherwise
    */
-  const bool GetHasHeightMap() const;
+  bool GetHasHeightMap() const;
 
 public: // Not intended for application developers
 
index aea843c..22a5567 100644 (file)
@@ -40,7 +40,7 @@ const uint64_t ONE = 1lu;
 const uint64_t PARAMETER_MASK =              ~( -1l << PARAMETER_BITS );
 
 // Shift values for attribute indices
-const unsigned int COMMON_INDEX_SHIFT =      0u;                                     // starts at bit 0
+const unsigned int COMMON_INDEX_SHIFT __attribute__((unused)) =      0u; // starts at bit 0
 const unsigned int WEIGHT_INDEX_SHIFT =      PARAMETER_BITS * 1; // starts at bit 3
 const unsigned int ITALICS_INDEX_SHIFT =     PARAMETER_BITS * 2; // starts at bit 6
 const unsigned int UNDERLINE_INDEX_SHIFT =   PARAMETER_BITS * 3; // starts at bit 9
@@ -82,7 +82,6 @@ const uint64_t DROP_SHADOW_EXISTS =          ONE << ( PARAMETER_FLAGS + 14 ); //
 const uint64_t GLOW_EXISTS =                 ONE << ( PARAMETER_FLAGS + 15 ); // bit 39
 const uint64_t OUTLINE_EXISTS =              ONE << ( PARAMETER_FLAGS + 16 ); // bit 40
 const uint64_t GRADIENT_EXISTS =             ONE << ( PARAMETER_FLAGS + 17 ); // bit 41
-const uint64_t ATTRIBUTE_END =               GRADIENT_EXISTS;
 
 const std::string DEFAULT_NAME;
 const Dali::PointSize DEFAULT_FONT_POINT_SIZE( 0.f );