Removed unnecessary includes such as <iostream> and <algorithm> 96/35596/8
authorAndrew Cox <andrew.cox@partner.samsung.com>
Wed, 18 Feb 2015 21:45:39 +0000 (21:45 +0000)
committerAndrew Cox <andrew.cox@partner.samsung.com>
Mon, 23 Feb 2015 08:23:06 +0000 (08:23 +0000)
Patch reduced clean build time using `make -j 11` on desktop by 5% to
10% after a `make clean`. More improvements possible.

Signed-off-by: Andrew Cox <andrew.cox@partner.samsung.com>
Change-Id: I34d674edc02d2f477acb774ae1d913431269031c

33 files changed:
automated-tests/src/dali/dali-test-suite-utils/test-gl-abstraction.h
dali/integration-api/core.cpp
dali/integration-api/resource-types.h
dali/internal/common/event-to-update.h
dali/internal/common/image-sampler.cpp
dali/internal/common/owner-pointer.h
dali/internal/event/common/property-input-impl.h
dali/internal/event/modeling/model-logger.cpp
dali/internal/update/node-attachments/node-attachment.h
dali/internal/update/queue/update-message-queue.cpp
dali/internal/update/queue/update-message-queue.h
dali/public-api/common/constants.cpp
dali/public-api/common/dali-common.h
dali/public-api/common/dali-vector.h
dali/public-api/math/math-utils.h
dali/public-api/math/matrix.cpp
dali/public-api/math/matrix.h
dali/public-api/math/matrix3.cpp
dali/public-api/math/quaternion.cpp
dali/public-api/math/quaternion.h
dali/public-api/math/vector2.cpp
dali/public-api/math/vector2.h
dali/public-api/math/vector3.cpp
dali/public-api/math/vector3.h
dali/public-api/math/vector4.cpp
dali/public-api/math/vector4.h
dali/public-api/modeling/bone.h
dali/public-api/object/any.h
dali/public-api/signals/callback.cpp
dali/public-api/signals/callback.h
dali/public-api/signals/signal-slot-connections.cpp
dali/public-api/text/utf8.cpp
dali/public-api/text/utf8.h

index 919405a..fe3cfdc 100644 (file)
  *
  */
 
-// EXTERNAL INCLUDES
-#include <sstream>
-#include <string>
-#include <map>
-
 // INTERNAL INCLUDES
 #include <dali/public-api/dali-core.h>
 #include <dali/integration-api/core.h>
 #include <dali/integration-api/gl-defines.h>
 #include "test-trace-call-stack.h"
 
+// EXTERNAL INCLUDES
+#include <sstream>
+#include <string>
+#include <map>
+#include <cstdio>
+
 namespace Dali
 {
 
index 9824d8e..866897e 100644 (file)
 // CLASS HEADER
 #include <dali/integration-api/core.h>
 
-// EXTERNAL INCLUDES
-#include <iostream>
-#include <stdarg.h>
-
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 #include <dali/integration-api/events/event.h>
 #include <dali/integration-api/gl-sync-abstraction.h>
 #include <dali/internal/common/core-impl.h>
 
+// EXTERNAL INCLUDES
+#include <iosfwd>
+#include <stdarg.h>
+
 namespace Dali
 {
 
index 4174b0e..68ee185 100644 (file)
@@ -18,8 +18,6 @@
  *
  */
 
-// EXTERNAL INCLUDES
-#include <stdint.h>
 
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/images/image-attributes.h>
 #include <dali/integration-api/resource-declarations.h>
 
+// EXTERNAL INCLUDES
+#include <stdint.h>
+#include <string>
+
 namespace Dali
 {
 
index 8ca7f61..5a7dc08 100644 (file)
@@ -59,7 +59,7 @@ public:
    * @param[in] updateScene A flag, when true denotes that the message will cause the scene-graph node tree to require an update.
    * @return A pointer to the first char allocated for the message.
    */
-  virtual unsigned int* ReserveMessageSlot( std::size_t size, bool updateScene = true ) = 0;
+  virtual unsigned int* ReserveMessageSlot( unsigned int size, bool updateScene = true ) = 0;
 
   /**
    * Retrieve the current event-buffer index.
index 9c2ccc3..8dfa702 100644 (file)
@@ -18,7 +18,8 @@
 // CLASS HEADER
 #include <dali/internal/common/image-sampler.h>
 
-#include <iostream>
+// EXTERNAL INCLUDES
+#include <iosfwd>
 
 namespace Dali
 {
index 360b282..9316845 100644 (file)
@@ -36,7 +36,7 @@ public:
    */
   OwnerPointer()
   {
-    mObject = NULL;
+    mObject = 0;
   }
 
   /**
@@ -103,7 +103,7 @@ public:
    */
   T& operator*()
   {
-    DALI_ASSERT_DEBUG( mObject != NULL );
+    DALI_ASSERT_DEBUG( mObject != 0 );
 
     return *mObject;
   }
@@ -114,7 +114,7 @@ public:
    */
   T& operator*() const
   {
-    DALI_ASSERT_DEBUG( mObject != NULL );
+    DALI_ASSERT_DEBUG( mObject != 0 );
 
     // Pointer semantics: A const pointer does not mean const data.
     return const_cast< T& >( *mObject );
@@ -153,10 +153,10 @@ public:
    */
   void Reset()
   {
-    if ( mObject != NULL )
+    if ( mObject != 0 )
     {
       delete mObject;
-      mObject = NULL;
+      mObject = 0;
     }
   }
 
@@ -167,7 +167,7 @@ public:
   T* Release()
   {
     T* tmp = mObject;
-    mObject = NULL;
+    mObject = 0;
     return tmp;
   }
 
@@ -189,11 +189,11 @@ public:
 
   /**
    * Converts an object handle to a BooleanType.
-   * This is useful for checking whether the handle is NULL.
+   * This is useful for checking whether the handle is null.
    */
   operator BooleanType() const
   {
-    return (mObject != NULL) ? &OwnerPointer::ThisIsSaferThanReturningVoidStar : NULL;
+    return (mObject != 0) ? &OwnerPointer::ThisIsSaferThanReturningVoidStar : 0;
   }
 
 private:
@@ -213,7 +213,7 @@ private:
   void Init( OwnerPointer& ownerPointer )
   {
     mObject = ownerPointer.mObject;
-    ownerPointer.mObject = NULL;
+    ownerPointer.mObject = 0;
   }
 
   // data
index 367c28b..64d5022 100644 (file)
@@ -28,6 +28,9 @@
 #include <dali/public-api/math/matrix.h>
 #include <dali/internal/common/buffer-index.h>
 
+/// External Includes
+#include <iostream>
+
 namespace Dali
 {
 
@@ -311,6 +314,7 @@ public:
    * Print the property value using a stream.
    * @param[in] debugStream The output stream.
    * @param[in] bufferIndex The buffer to read from.
+   * @todo Place this far-too-large-to-be-inlined function in a cpp and remove <iostream> header dependency from this file.
    */
   void DebugPrint( std::ostream& debugStream, BufferIndex bufferIndex ) const
   {
index c77aa4b..bed6b61 100644 (file)
 // CLASS HEADER
 #include <dali/internal/event/modeling/model-logger.h>
 
-// EXTERNAL INCLUDES
-#include <iostream>
-#include <sstream>
-#include <iomanip>
-
 // INTERNAL INCLUDES
 #include <dali/public-api/modeling/bone.h>
 #include <dali/public-api/modeling/entity.h>
 #include <dali/internal/event/animation/key-frames-impl.h>
 #include <dali/internal/event/modeling/model-impl.h>
 
+// EXTERNAL INCLUDES
+#include <iostream>
+#include <sstream>
+#include <iomanip>
+
 using std::cout;
 using std::endl;
 using std::string;
index 43a9e2f..098aa69 100644 (file)
@@ -71,21 +71,21 @@ public:
 
   /**
    * Retrieve the parent node of a NodeAttachment.
-   * @return The parent node, or NULL if the NodeAttachment has not been added to the scene-graph.
+   * @return The parent node, or null if the NodeAttachment has not been added to the scene-graph.
    */
   Node& GetParent()
   {
-    DALI_ASSERT_DEBUG( mParent != NULL );
+    DALI_ASSERT_DEBUG( mParent != 0 );
     return *mParent;
   }
 
   /**
    * Retrieve the parent node of a NodeAttachment.
-   * @return The parent node, or NULL if the NodeAttachment has not been added to the scene-graph.
+   * @return The parent node, or null if the NodeAttachment has not been added to the scene-graph.
    */
   Node& GetParent() const
   {
-    DALI_ASSERT_DEBUG( mParent != NULL );
+    DALI_ASSERT_DEBUG( mParent != 0 );
     return *mParent;
   }
 
@@ -97,12 +97,12 @@ public:
    */
   bool IsRenderable()
   {
-    return (GetRenderable() != NULL);
+    return (GetRenderable() != 0);
   }
 
   /**
    * Convert an attachment to a renderable attachment.
-   * @return A pointer to the renderable attachment, or NULL.
+   * @return A pointer to the renderable attachment, or null.
    */
   virtual RenderableAttachment* GetRenderable() = 0;
 
index a89a760..c96835c 100644 (file)
@@ -147,7 +147,7 @@ void MessageQueue::EventProcessingStarted()
   mImpl->processingEvents = true;
 }
 
-unsigned int* MessageQueue::ReserveMessageSlot( std::size_t requestedSize, bool updateScene )
+unsigned int* MessageQueue::ReserveMessageSlot( unsigned int requestedSize, bool updateScene )
 {
   DALI_ASSERT_DEBUG( 0 != requestedSize );
 
index 56db217..7328c7d 100644 (file)
@@ -70,7 +70,7 @@ public:
   /**
    * @copydoc Dali::Internal::EventToUpdate::ReserveMessageSlot()
    */
-  virtual unsigned int* ReserveMessageSlot( std::size_t size, bool updateScene );
+  virtual unsigned int* ReserveMessageSlot( unsigned int size, bool updateScene );
 
   /**
    * @copydoc Dali::Internal::EventToUpdate::GetEventBufferIndex()
index 22fb14f..60781d3 100644 (file)
@@ -22,6 +22,9 @@
 #include <dali/public-api/math/compile-time-math.h>
 #include <dali/public-api/math/degree.h>
 
+// EXTERNAL INCLUDES
+#include <string>
+
 namespace Dali
 {
 
index c5920c1..a4d0c73 100644 (file)
@@ -19,7 +19,6 @@
  */
 
 // EXTERNAL INCLUDES
-#include <cstdio>
 
 #ifdef EMSCRIPTEN
 #include <emscripten/emscripten.h>
index c8ba06b..c677b5e 100644 (file)
  *
  */
 
-// EXTERNAL INCLUDES
-#include <cstddef>
-
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/math/math-utils.h>
 
+// EXTERNAL INCLUDES
+#include <cstddef>
+#include <algorithm>
+
 /**
  * @brief For DALi internal use asserts are enabled in debug builds.
  *
index 2c74ea3..cb56fd5 100644 (file)
@@ -18,9 +18,6 @@
  *
  */
 
-// EXTERNAL INCLUDES
-#include <algorithm> // std::min & max
-
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/common/constants.h>
@@ -76,7 +73,9 @@ inline bool IsPowerOfTwo( unsigned int i )
 template< typename T >
 inline const T& Clamp( const T& value, const T& min, const T& max )
 {
-  return std::max( std::min( value, max ), min );
+  const T& constrainedUpper = value < max ? value : max;
+  const T& constrainedUpperAndLower = constrainedUpper > min ? constrainedUpper : min;
+  return  constrainedUpperAndLower;
 }
 
 /**
@@ -89,7 +88,9 @@ inline const T& Clamp( const T& value, const T& min, const T& max )
 template< typename T >
 inline void ClampInPlace( T& value, const T& min, const T& max )
 {
-  value =  std::max( std::min( value, max ), min );
+  const T& constrainedUpper = value < max ? value : max;
+  const T& constrainedUpperAndLower = constrainedUpper > min ? constrainedUpper : min;
+  value = constrainedUpperAndLower;
 }
 
 
@@ -115,29 +116,31 @@ inline const T Lerp( const float offset, const T& low, const T& high )
  * @param[in] b the second value in the range.
  * @return a suitable epsilon
  */
-inline float GetRangedEpsilon(float a, float b)
+inline float GetRangedEpsilon( float a, float b )
 {
-  float abs_f = std::max(fabsf(a), fabsf(b));
-  int abs_i = (int) abs_f;
+  const float absA = fabsf( a );
+  const float absB = fabsf( b );
+  const float absF = absA > absB ? absA : absB;
+  const int absI = absF;
 
   float epsilon = Math::MACHINE_EPSILON_10000;
-  if (abs_f < 0.1f)
+  if (absF < 0.1f)
   {
     return Math::MACHINE_EPSILON_0;
   }
-  else if (abs_i < 2)
+  else if (absI < 2)
   {
     return Math::MACHINE_EPSILON_1;
   }
-  else if (abs_i < 20)
+  else if (absI < 20)
   {
     return Math::MACHINE_EPSILON_10;
   }
-  else if (abs_i < 200)
+  else if (absI < 200)
   {
     return Math::MACHINE_EPSILON_100;
   }
-  else if (abs_i < 2000)
+  else if (absI < 2000)
   {
     return Math::MACHINE_EPSILON_1000;
   }
index cdbc9f8..e2be143 100644 (file)
 // CLASS HEADERS
 #include <dali/public-api/math/matrix.h>
 
-// EXTERNAL INCLUDES
-#include <math.h>
-#include <string.h>
-
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/math/vector3.h>
 #include <dali/public-api/math/math-utils.h>
 #include <dali/internal/render/common/performance-monitor.h>
 
+// EXTERNAL INCLUDES
+#include <math.h>
+#include <string.h>
+#include <iostream>
+
 namespace
 {
 const float ROTATION_EPSILON = 0.003f; // Deliberately large
index 5e44903..15b8d7d 100644 (file)
@@ -18,9 +18,6 @@
  *
  */
 
-// EXTERNAL INCLUDES
-#include <iostream>
-
 // INTERNAL INCLUDES
 #include <dali/public-api/math/vector4.h>
 
index 773b6ee..bfc1a0a 100644 (file)
 // CLASS HEADER
 #include <dali/public-api/math/matrix3.h>
 
+// INTERNAL INCLUDES
+#include <dali/public-api/math/math-utils.h>
+
 // EXTERNAL INCLUDES
 #include <string.h>
+#include <iostream>
 
-// INTERNAL INCLUDES
-#include <dali/public-api/math/math-utils.h>
 
 #define S00 0
 #define S01 1
index 167f51a..05140df 100644 (file)
@@ -26,6 +26,9 @@
 #include <dali/public-api/math/math-utils.h>
 #include <dali/internal/render/common/performance-monitor.h>
 
+// EXTERNAL INCLUDES
+#include <iostream>
+
 namespace Dali
 {
 using Internal::PerformanceMonitor;
@@ -135,6 +138,16 @@ Quaternion::~Quaternion()
 {
 }
 
+bool Quaternion::IsIdentity() const
+{
+  // start from w as its unlikely that any real rotation has w == 1
+  // Uses a relaxed epsilon, as composition of rotation introduces error
+  return ( ( fabsf( mVector.w - 1.0f ) < Math::MACHINE_EPSILON_10 )&&
+           ( fabsf( mVector.x ) < Math::MACHINE_EPSILON_10 )&&
+           ( fabsf( mVector.y ) < Math::MACHINE_EPSILON_10 )&&
+           ( fabsf( mVector.z ) < Math::MACHINE_EPSILON_10 ) );
+}
+
 bool Quaternion::ToAxisAngle(Vector3 &axis, float &angle) const
 {
   angle = acosf(mVector.w);
index 98dbb3c..2a4ac8c 100644 (file)
  *
  */
 
-// EXTERNAL INCLUDES
-#include <iostream>
-#include <math.h>
-
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/common/constants.h>
@@ -136,15 +132,7 @@ public:
    *
    * @return true if this is identity quaternion
    */
-  bool IsIdentity() const
-  {
-    // start from w as its unlikely that any real rotation has w == 1
-    // Uses a relaxed epsilon, as composition of rotation introduces error
-    return ( ( fabsf( mVector.w - 1.0f ) < Math::MACHINE_EPSILON_10 )&&
-             ( fabsf( mVector.x ) < Math::MACHINE_EPSILON_10 )&&
-             ( fabsf( mVector.y ) < Math::MACHINE_EPSILON_10 )&&
-             ( fabsf( mVector.z ) < Math::MACHINE_EPSILON_10 ) );
-  }
+  bool IsIdentity() const;
 
   /**
    * @brief Convert the quaternion to an axis/angle pair.
index 52500ef..e50b073 100644 (file)
 // CLASS HEADER
 #include <dali/public-api/math/vector2.h>
 
-// EXTERNAL INCLUDES
-#include <math.h>
-
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/math/vector3.h>
 #include <dali/public-api/math/math-utils.h>
 #include <dali/internal/render/common/performance-monitor.h>
 
+// EXTERNAL INCLUDES
+#include <math.h>
+#include <iostream>
+
 namespace Dali
 {
 
index 267a8a4..b1df40d 100644 (file)
  *
  */
 
-// EXTERNAL INCLUDES
-#include <algorithm>
-#include <iostream>
-
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 
+// EXTERNAL INCLUDES
+#include <iosfwd>
+
 namespace Dali
 {
 
@@ -442,7 +441,7 @@ DALI_IMPORT_API std::ostream& operator<< (std::ostream& o, const Vector2& vector
  */
 inline Vector2 Min( const Vector2& a, const Vector2& b )
 {
-  return Vector2( std::min(a.x,b.x), std::min(a.y,b.y) );
+  return Vector2( a.x < b.x ? a.x : b.x , a.y < b.y ? a.y : b.y );
 }
 
 /**
@@ -455,7 +454,7 @@ inline Vector2 Min( const Vector2& a, const Vector2& b )
  */
 inline Vector2 Max( const Vector2& a, const Vector2& b )
 {
-  return Vector2( std::max(a.x,b.x), std::max(a.y,b.y) );
+  return Vector2( a.x > b.x ? a.x : b.x , a.y > b.y ? a.y : b.y );
 }
 
 /**
index 099a68c..9afb55b 100644 (file)
@@ -19,9 +19,6 @@
 #include <dali/public-api/math/vector3.h>
 #include <dali/public-api/math/quaternion.h>
 
-// EXTERNAL INCLUDES
-#include <math.h>
-
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/math/vector2.h>
 #include <dali/public-api/math/math-utils.h>
 #include <dali/internal/render/common/performance-monitor.h>
 
+// EXTERNAL INCLUDES
+#include <math.h>
+#include <iostream>
+
 namespace Dali
 {
 using Internal::PerformanceMonitor;
index d37217f..b6121ef 100644 (file)
  *
  */
 
-// EXTERNAL INCLUDES
-#include <algorithm>
-#include <iostream>
-
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 
+// EXTERNAL INCLUDES
+#include <iosfwd>
+
 namespace Dali
 {
 
@@ -526,7 +525,9 @@ DALI_IMPORT_API std::ostream& operator<< (std::ostream& o, const Vector3& vector
  */
 inline Vector3 Min( const Vector3& a, const Vector3& b )
 {
-  return Vector3( std::min(a.x,b.x), std::min(a.y,b.y), std::min(a.z,b.z) );
+  return Vector3( a.x < b.x ? a.x : b.x ,
+                  a.y < b.y ? a.y : b.y,
+                  a.z < b.z ? a.z : b.z );
 }
 
 /**
@@ -539,7 +540,9 @@ inline Vector3 Min( const Vector3& a, const Vector3& b )
  */
 inline Vector3 Max( const Vector3& a, const Vector3& b )
 {
-  return Vector3( std::max(a.x,b.x), std::max(a.y,b.y), std::max(a.z,b.z) );
+  return Vector3( a.x > b.x ? a.x : b.x,
+                  a.y > b.y ? a.y : b.y,
+                  a.z > b.z ? a.z : b.z );
 }
 
 /**
index 1dbe51b..e0cbb59 100644 (file)
@@ -18,9 +18,6 @@
 // CLASS HEADER
 #include <dali/public-api/math/vector4.h>
 
-// EXTERNAL INCLUDES
-#include <math.h>
-
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/math/vector2.h>
 #include <dali/public-api/math/math-utils.h>
 #include <dali/internal/render/common/performance-monitor.h>
 
+// EXTERNAL INCLUDES
+#include <math.h>
+#include <iostream>
+
 namespace Dali
 {
 
index 473d8a4..d0a5b85 100644 (file)
  *
  */
 
-// EXTERNAL INCLUDES
-#include <algorithm>
-#include <iostream>
-#include <math.h>
-
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 
+// EXTERNAL INCLUDES
+#include <iosfwd>
+
 namespace Dali
 {
 struct Vector2;
@@ -47,7 +45,6 @@ struct DALI_IMPORT_API Vector4
 
   /**
    * @brief Default constructor, initializes the vector to 0.
-   *
    */
   Vector4()
   : x(0.0f),
@@ -531,7 +528,10 @@ DALI_IMPORT_API std::ostream& operator<<(std::ostream& o, const Vector4& vector)
  */
 inline Vector4 Min( const Vector4& a, const Vector4& b )
 {
-  return Vector4( std::min(a.x,b.x), std::min(a.y,b.y), std::min(a.z,b.z), std::min(a.w,b.w) );
+  return Vector4( a.x < b.x ? a.x : b.x,
+                  a.y < b.y ? a.y : b.y,
+                  a.z < b.z ? a.z : b.z,
+                  a.w < b.w ? a.w : b.w );
 }
 
 /**
@@ -544,7 +544,10 @@ inline Vector4 Min( const Vector4& a, const Vector4& b )
  */
 inline Vector4 Max( const Vector4& a, const Vector4& b )
 {
-  return Vector4( std::max(a.x,b.x), std::max(a.y,b.y), std::max(a.z,b.z), std::max(a.w,b.w) );
+  return Vector4( a.x > b.x ? a.x : b.x,
+                  a.y > b.y ? a.y : b.y,
+                  a.z > b.z ? a.z : b.z,
+                  a.w > b.w ? a.w : b.w );
 }
 
 /**
index 7db2189..d90a7a8 100644 (file)
@@ -23,6 +23,9 @@
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/math/matrix.h>
 
+// EXTERNAL INCLUDES
+#include <string>
+
 namespace Dali
 {
 
index bede5f5..3268cb3 100644 (file)
  *
  */
 
-// EXTERNAL INCLUDES
-#include <typeinfo>   // operator typeid
-
-
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 
+// EXTERNAL INCLUDES
+#include <typeinfo>   // operator typeid
+
 namespace Dali
 {
 
@@ -79,14 +78,14 @@ public:
   Any( const Any& any )
   {
     // If container isn't empty then copy the container?
-    if ( NULL != any.mContainer )
+    if ( 0 != any.mContainer )
     {
       mContainer = any.mContainer->mCloneFunc( *any.mContainer );
     }
     else
     {
       // Otherwise mark new container as empty
-      mContainer = NULL;
+      mContainer = 0;
     }
   }
 
@@ -101,7 +100,7 @@ public:
   Any& operator=( const Type& value )
   {
     // If the container is empty then assign the new value
-    if ( NULL == mContainer )
+    if ( 0 == mContainer )
     {
       mContainer = new AnyContainerImpl< Type >( value );
     }
@@ -160,9 +159,9 @@ public:
   const Type& Get() const
   {
 
-    if ( NULL == mContainer )
+    if ( 0 == mContainer )
     {
-      AssertAlways( "Any::Get(). mContainer is NULL" );
+      AssertAlways( "Any::Get(). mContainer is null" );
     }
 
     // Check if the value has the same value than the Any type.
@@ -176,14 +175,14 @@ public:
   /**
    * @brief Return pointer of Type to the value stored
    *
-   * @return pointer to the value or NULL if no value is contained
+   * @return pointer to the value or null if no value is contained
    */
   template<typename Type>
   Type* GetPointer()
   {
-    if( NULL == mContainer )
+    if( 0 == mContainer )
     {
-      return NULL;
+      return 0;
     }
      // Check if the value has the same value than the Any type.
     if( mContainer->GetType() != typeid( Type ) )
@@ -196,14 +195,14 @@ public:
   /**
    * @brief Return pointer of Type to the value stored
    *
-   * @return pointer to the value or NULL if no value is contained
+   * @return pointer to the value or null if no value is contained
    */
   template<typename Type>
   const Type* GetPointer() const
   {
-    if( NULL == mContainer )
+    if( 0 == mContainer )
     {
-      return NULL;
+      return 0;
     }
      // Check if the value has the same value than the Any type.
     if( mContainer->GetType() != typeid( Type ) )
@@ -220,7 +219,7 @@ public:
    */
   bool Empty() const
   {
-    return ( NULL == mContainer ) ? true : false;
+    return ( 0 == mContainer ) ? true : false;
   }
 
   struct AnyContainerBase;    // Forward declaration for typedef
@@ -377,7 +376,7 @@ public:
  */
 
 /**
- * @brief Extract a pointer to the held type of an Any object from a pointer to that Any object (NULL if empty )
+ * @brief Extract a pointer to the held type of an Any object from a pointer to that Any object (null if empty )
  *
  * @param any Pointer to an Any object
  *
@@ -390,7 +389,7 @@ inline Type* AnyCast( Any* any )
 }
 
 /**
- * @brief Extract a const pointer to the held type of an Any object from a pointer to that Any object (NULL if empty )
+ * @brief Extract a const pointer to the held type of an Any object from a pointer to that Any object (null if empty )
  *
  * @param any const Pointer to an Any object
  *
index ca9044d..7b61117 100644 (file)
@@ -25,8 +25,8 @@ namespace Dali
 // CallbackBase
 
 CallbackBase::CallbackBase()
-: mImpl( NULL ),
-  mFunction( NULL )
+: mImpl( 0 ),
+  mFunction( 0 )
 {
 }
 
@@ -36,7 +36,7 @@ CallbackBase::~CallbackBase()
 }
 
 CallbackBase::CallbackBase( Function function )
-: mImpl( NULL ),
+: mImpl( 0 ),
   mFunction( function )
 {
 }
@@ -47,7 +47,7 @@ CallbackBase::CallbackBase( void* object, MemberFunction function, Dispatcher di
   mImpl = new CallbackBase::Impl;
   mImpl->mObjectPointer = object;
   mImpl->mMemberFunctionDispatcher = dispatcher;
-  mImpl->mDestructorDispatcher = NULL; // object is not owned
+  mImpl->mDestructorDispatcher = 0; // object is not owned
 }
 
 CallbackBase::CallbackBase( void* object, MemberFunction function, Dispatcher dispatcher, Destructor destructor )
@@ -72,18 +72,18 @@ void CallbackBase::Reset()
     }
 
     delete mImpl;
-    mImpl = NULL;
+    mImpl = 0;
   }
 
-  mFunction = NULL;
+  mFunction = 0;
 }
 
 // CallbackBase::Impl
 
 CallbackBase::Impl::Impl()
-: mObjectPointer( NULL ),
-  mMemberFunctionDispatcher( NULL ),
-  mDestructorDispatcher( NULL )
+: mObjectPointer( 0 ),
+  mMemberFunctionDispatcher( 0 ),
+  mDestructorDispatcher( 0 )
 {
 }
 
index ca266de..5dbb60b 100644 (file)
@@ -306,7 +306,7 @@ protected: // Constructors for deriving classes
   typedef void (*Dispatcher)( CallbackBase& base );
 
   /**
-   * @brief Used to destroy mObjectPointer (NULL if not mObjectPointer is not owned)
+   * @brief Used to destroy mObjectPointer (null if not mObjectPointer is not owned)
    */
   typedef void(*Destructor)(void* object);
 
@@ -354,9 +354,9 @@ public: // Data for deriving classes & Dispatchers
   {
     Impl();                               ///< Default constructor
 
-    void* mObjectPointer;                 ///< Object whose member function will be called. Not owned if mDestructorDispatcher is NULL.
+    void* mObjectPointer;                 ///< Object whose member function will be called. Not owned if mDestructorDispatcher is null.
     Dispatcher mMemberFunctionDispatcher; ///< Dispatcher for member functions
-    Destructor mDestructorDispatcher;     ///< Destructor for owned objects. NULL if mDestructorDispatcher is not owned.
+    Destructor mDestructorDispatcher;     ///< Destructor for owned objects. null if mDestructorDispatcher is not owned.
   };
   Impl* mImpl;                            ///< Implementation pointer
 
@@ -1081,7 +1081,7 @@ public:
    */
   CallbackFunctor0( const T& object )
   : CallbackBase( reinterpret_cast< void* >( new T( object ) ), // copy the object
-                  NULL, // uses operator() instead of member function
+                  0, // uses operator() instead of member function
                   reinterpret_cast< CallbackBase::Dispatcher >( &FunctorDispatcher0<T>::Dispatch ),
                   reinterpret_cast< CallbackBase::Destructor >( &Destroyer<T>::Delete ) ) { }
 };
@@ -1121,7 +1121,7 @@ public:
    */
   CallbackFunctor1( const T& object )
   : CallbackBase( reinterpret_cast< void* >( new T( object ) ), // copy the object
-                  NULL, // uses operator() instead of member function
+                  0, // uses operator() instead of member function
                   reinterpret_cast< CallbackBase::Dispatcher >( &FunctorDispatcher1<T,P1>::Dispatch ),
                   reinterpret_cast< CallbackBase::Destructor >( &Destroyer<T>::Delete ) ) { }
 };
@@ -1162,7 +1162,7 @@ public:
    */
   CallbackFunctor2( const T& object )
   : CallbackBase( reinterpret_cast< void* >( new T( object ) ), // copy the object
-                  NULL, // uses operator() instead of member function
+                  0, // uses operator() instead of member function
                   reinterpret_cast< CallbackBase::Dispatcher >( &FunctorDispatcher2<T,P1,P2>::Dispatch ),
                   reinterpret_cast< CallbackBase::Destructor >( &Destroyer<T>::Delete ) ) { }
 };
@@ -1203,7 +1203,7 @@ public:
    */
   CallbackFunctor3( const T& object )
   : CallbackBase( reinterpret_cast< void* >( new T( object ) ), // copy the object
-                  NULL, // uses operator() instead of member function
+                  0, // uses operator() instead of member function
                   reinterpret_cast< CallbackBase::Dispatcher >( &FunctorDispatcher3<T,P1,P2,P3>::Dispatch ),
                   reinterpret_cast< CallbackBase::Destructor >( &Destroyer<T>::Delete ) ) { }
 };
@@ -1245,7 +1245,7 @@ public:
    */
   CallbackFunctorReturn0( const T& object )
   : CallbackBase( reinterpret_cast< void* >( new T( object ) ), // copy the object
-                  NULL, // uses operator() instead of member function
+                  0, // uses operator() instead of member function
                   reinterpret_cast< CallbackBase::Dispatcher >( &FunctorDispatcherReturn0<T,R>::Dispatch ),
                   reinterpret_cast< CallbackBase::Destructor >( &Destroyer<T>::Delete ) ) { }
 };
@@ -1286,7 +1286,7 @@ public:
    */
   CallbackFunctorReturn1( const T& object )
   : CallbackBase( reinterpret_cast< void* >( new T( object ) ), // copy the object
-                  NULL, // uses operator() instead of member function
+                  0, // uses operator() instead of member function
                   reinterpret_cast< CallbackBase::Dispatcher >( &FunctorDispatcherReturn1<T,R,P1>::Dispatch ),
                   reinterpret_cast< CallbackBase::Destructor >( &Destroyer<T>::Delete ) ) { }
 };
@@ -1327,7 +1327,7 @@ public:
    */
   CallbackFunctorReturn2( const T& object )
   : CallbackBase( reinterpret_cast< void* >( new T( object ) ), // copy the object
-                  NULL, // uses operator() instead of member function
+                  0, // uses operator() instead of member function
                   reinterpret_cast< CallbackBase::Dispatcher >( &FunctorDispatcherReturn2<T,R,P1,P2>::Dispatch ),
                   reinterpret_cast< CallbackBase::Destructor >( &Destroyer<T>::Delete ) ) { }
 };
@@ -1368,7 +1368,7 @@ public:
    */
   CallbackFunctorReturn3( const T& object )
   : CallbackBase( reinterpret_cast< void* >( new T( object ) ), // copy the object
-                  NULL, // uses operator() instead of member function
+                  0, // uses operator() instead of member function
                   reinterpret_cast< CallbackBase::Dispatcher >( &FunctorDispatcherReturn3<T,R,P1,P2,P3>::Dispatch ),
                   reinterpret_cast< CallbackBase::Destructor >( &Destroyer<T>::Delete ) ) { }
 };
index 531d286..6007f69 100644 (file)
@@ -45,7 +45,7 @@ SlotObserver* SlotConnection::GetSlotObserver()
 }
 
 SignalConnection::SignalConnection( CallbackBase* callback )
-: mSignalObserver( NULL ),
+: mSignalObserver( 0 ),
   mCallback( callback )
 {
 }
@@ -68,12 +68,12 @@ void SignalConnection::Disconnect( SlotObserver* slotObserver )
   {
     // tell the slot the signal wants to disconnect
     mSignalObserver->SignalDisconnected( slotObserver, mCallback );
-    mSignalObserver = NULL;
+    mSignalObserver = 0;
   }
 
   // we own the callback, SignalObserver is expected to delete the SlotConnection on Disconnected so its pointer to our mCallback is no longer used
   delete mCallback;
-  mCallback = NULL;
+  mCallback = 0;
 }
 
 CallbackBase* SignalConnection::GetCallback()
index 5142c68..9688c39 100644 (file)
@@ -23,7 +23,7 @@
 namespace Dali
 {
 
-size_t Utf8SequenceLength(const unsigned char leadByte)
+unsigned int Utf8SequenceLength(const unsigned char leadByte)
 {
   return Internal::UTF8SequenceLength( leadByte );
 }
index 0183a90..1c3553a 100644 (file)
@@ -29,7 +29,7 @@ namespace Dali
  * @param[in] leadByte The lead byte of a UTF-8 character sequence
  * @return The length of the sequence, or zero if the UTF-8 character is invalid.
  */
-DALI_IMPORT_API size_t Utf8SequenceLength(const unsigned char leadByte);
+DALI_IMPORT_API unsigned int Utf8SequenceLength(const unsigned char leadByte);
 
 } // namespace Dali