*
*/
-// 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
{
// 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
{
*
*/
-// 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
{
* @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.
// CLASS HEADER
#include <dali/internal/common/image-sampler.h>
-#include <iostream>
+// EXTERNAL INCLUDES
+#include <iosfwd>
namespace Dali
{
*/
OwnerPointer()
{
- mObject = NULL;
+ mObject = 0;
}
/**
*/
T& operator*()
{
- DALI_ASSERT_DEBUG( mObject != NULL );
+ DALI_ASSERT_DEBUG( mObject != 0 );
return *mObject;
}
*/
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 );
*/
void Reset()
{
- if ( mObject != NULL )
+ if ( mObject != 0 )
{
delete mObject;
- mObject = NULL;
+ mObject = 0;
}
}
T* Release()
{
T* tmp = mObject;
- mObject = NULL;
+ mObject = 0;
return tmp;
}
/**
* 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:
void Init( OwnerPointer& ownerPointer )
{
mObject = ownerPointer.mObject;
- ownerPointer.mObject = NULL;
+ ownerPointer.mObject = 0;
}
// data
#include <dali/public-api/math/matrix.h>
#include <dali/internal/common/buffer-index.h>
+/// External Includes
+#include <iostream>
+
namespace Dali
{
* 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
{
// 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;
/**
* 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;
}
*/
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;
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 );
/**
* @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()
#include <dali/public-api/math/compile-time-math.h>
#include <dali/public-api/math/degree.h>
+// EXTERNAL INCLUDES
+#include <string>
+
namespace Dali
{
*/
// EXTERNAL INCLUDES
-#include <cstdio>
#ifdef EMSCRIPTEN
#include <emscripten/emscripten.h>
*
*/
-// 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.
*
*
*/
-// EXTERNAL INCLUDES
-#include <algorithm> // std::min & max
-
// INTERNAL INCLUDES
#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/common/constants.h>
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;
}
/**
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;
}
* @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;
}
// 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
*
*/
-// EXTERNAL INCLUDES
-#include <iostream>
-
// INTERNAL INCLUDES
#include <dali/public-api/math/vector4.h>
// 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
#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;
{
}
+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);
*
*/
-// EXTERNAL INCLUDES
-#include <iostream>
-#include <math.h>
-
// INTERNAL INCLUDES
#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/common/constants.h>
*
* @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.
// 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
{
*
*/
-// EXTERNAL INCLUDES
-#include <algorithm>
-#include <iostream>
-
// INTERNAL INCLUDES
#include <dali/public-api/common/dali-common.h>
+// EXTERNAL INCLUDES
+#include <iosfwd>
+
namespace Dali
{
*/
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 );
}
/**
*/
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 );
}
/**
#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;
*
*/
-// EXTERNAL INCLUDES
-#include <algorithm>
-#include <iostream>
-
// INTERNAL INCLUDES
#include <dali/public-api/common/dali-common.h>
+// EXTERNAL INCLUDES
+#include <iosfwd>
+
namespace Dali
{
*/
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 );
}
/**
*/
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 );
}
/**
// 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
{
*
*/
-// 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;
/**
* @brief Default constructor, initializes the vector to 0.
- *
*/
Vector4()
: x(0.0f),
*/
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 );
}
/**
*/
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 );
}
/**
#include <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/math/matrix.h>
+// EXTERNAL INCLUDES
+#include <string>
+
namespace Dali
{
*
*/
-// EXTERNAL INCLUDES
-#include <typeinfo> // operator typeid
-
-
// INTERNAL INCLUDES
#include <dali/public-api/common/dali-common.h>
+// EXTERNAL INCLUDES
+#include <typeinfo> // operator typeid
+
namespace Dali
{
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;
}
}
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 );
}
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.
/**
* @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 ) )
/**
* @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 ) )
*/
bool Empty() const
{
- return ( NULL == mContainer ) ? true : false;
+ return ( 0 == mContainer ) ? true : false;
}
struct AnyContainerBase; // Forward declaration for typedef
*/
/**
- * @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
*
}
/**
- * @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
*
// CallbackBase
CallbackBase::CallbackBase()
-: mImpl( NULL ),
- mFunction( NULL )
+: mImpl( 0 ),
+ mFunction( 0 )
{
}
}
CallbackBase::CallbackBase( Function function )
-: mImpl( NULL ),
+: mImpl( 0 ),
mFunction( function )
{
}
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 )
}
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 )
{
}
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);
{
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
*/
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 ) ) { }
};
*/
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 ) ) { }
};
*/
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 ) ) { }
};
*/
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 ) ) { }
};
*/
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 ) ) { }
};
*/
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 ) ) { }
};
*/
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 ) ) { }
};
*/
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 ) ) { }
};
}
SignalConnection::SignalConnection( CallbackBase* callback )
-: mSignalObserver( NULL ),
+: mSignalObserver( 0 ),
mCallback( callback )
{
}
{
// 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()
namespace Dali
{
-size_t Utf8SequenceLength(const unsigned char leadByte)
+unsigned int Utf8SequenceLength(const unsigned char leadByte)
{
return Internal::UTF8SequenceLength( leadByte );
}
* @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