/packaging/home*
compile_commands.json
file-list.cmake
+compile_commands.json
+.clangd
#include <iostream>
#include <type_traits>
+#include <utility>
using Dali::Mutex;
using Dali::Thread;
}
DALI_TEST_EQUALS(false, mutex3.IsLocked(), TEST_LOCATION);
+ {
+ Mutex mutex4;
+ Mutex mutex5(std::move(mutex4)); // move constructor
+ Mutex::ScopedLock lock(mutex5);
+ DALI_TEST_EQUALS(true, mutex5.IsLocked(), TEST_LOCATION);
+ }
+
+ {
+ Mutex mutex4, mutex5;
+ mutex5 = std::move(mutex4); // move assignment
+ Mutex::ScopedLock lock(mutex5);
+ DALI_TEST_EQUALS(true, mutex5.IsLocked(), TEST_LOCATION);
+ }
+
END_TEST;
}
ELSEIF( UNIX )
+ INCLUDE(CheckCXXCompilerFlag)
+
# Set up compiler flags and warnings
ADD_COMPILE_OPTIONS( -Wnon-virtual-dtor -Woverloaded-virtual -Wold-style-cast )
ADD_COMPILE_OPTIONS( -Werror )
ENDIF()
- ADD_COMPILE_OPTIONS( -Wall -Wextra -Wno-unused-parameter -Wfloat-equal -Wno-class-memaccess -Wno-cast-function-type )
+ ADD_COMPILE_OPTIONS( -Wall -Wextra -Wno-unused-parameter -Wfloat-equal )
+ CHECK_CXX_COMPILER_FLAG(-Wno-class-memaccess HAVE_NO_CLASS_MEMACCESS)
+ IF (HAVE_NO_CLASS_MEMACCESS)
+ ADD_COMPILE_OPTIONS( -Wno-class-memaccess )
+ ENDIF()
+
+ CHECK_CXX_COMPILER_FLAG(-Wno-cast-function-type HAVE_NO_CAST_FUNCTION_TYPE)
+ IF (HAVE_NO_CAST_FUNCTION_TYPE)
+ ADD_COMPILE_OPTIONS( -Wno-cast-function-type )
+ ENDIF()
+ CHECK_CXX_COMPILER_FLAG(-Wno-string-plus-int HAVE_NO_STRING_PLUS_INT)
+ IF (HAVE_NO_STRING_PLUS_INT)
+ ADD_COMPILE_OPTIONS( -Wno-string-plus-int )
+ ENDIF()
IF( ENABLE_COVERAGE OR "$ENV{CXXFLAGS}" MATCHES --coverage )
ADD_COMPILE_OPTIONS( --coverage )
SET(ENABLE_COVERAGE ON)
INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}-config.cmake DESTINATION share/${name} )
# Install the pdb file.
- IF( ENABLE_DEBUG )
+ IF( ENABLE_DEBUG AND WIN32 )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/${name}.pdb DESTINATION ${BIN_DIR} )
ENDIF()
ELSE()
delete mImpl;
}
+Mutex::Mutex(Mutex&& rhs) noexcept
+ : mImpl(rhs.mImpl)
+{
+ rhs.mImpl = nullptr;
+}
+
+Mutex &Mutex::operator=(Mutex&& rhs) noexcept
+{
+ if (mImpl != rhs.mImpl)
+ {
+ delete mImpl;
+ mImpl = rhs.mImpl;
+ rhs.mImpl = nullptr;
+ }
+
+ return *this;
+}
+
bool Mutex::IsLocked()
{
return mImpl->locked;
*/
~Mutex();
+ /**
+ * @brief Move constructor
+ */
+ Mutex(Mutex&& rhs) noexcept;
+
+ /**
+ * @brief Move assignment
+ */
+ Mutex &operator=(Mutex&& rhs) noexcept;
+
/**
* @brief Check if the mutex is locked
* @return true if the mutex is locked
#include <dali/public-api/math/matrix.h>
#include <dali/internal/common/buffer-index.h>
-#if defined (ANDROID) || defined(WIN32)
+#if defined (ANDROID) || defined(WIN32) || defined(__APPLE__)
namespace std
{
namespace Dali
{
-struct TouchEvent;
+class TouchEvent;
struct Radian;
namespace Internal
const float MINIMUM_MOTION_DISTANCE_BEFORE_PAN( 15.0f );
const float MINIMUM_MOTION_DISTANCE_BEFORE_PAN_SQUARED( MINIMUM_MOTION_DISTANCE_BEFORE_PAN * MINIMUM_MOTION_DISTANCE_BEFORE_PAN );
const float MINIMUM_MOTION_DISTANCE_TO_THRESHOLD_ADJUSTMENTS_RATIO( 2.0f / 3.0f );
-const unsigned long MAXIMUM_TIME_DIFF_ALLOWED( 500 );
const unsigned long MINIMUM_TIME_BEFORE_THRESHOLD_ADJUSTMENTS( 100 );
const unsigned int MINIMUM_MOTION_EVENTS_BEFORE_PAN(2);
} // unnamed namespace
namespace Dali
{
-class Vector2;
-class Vector4;
+struct Vector2;
+struct Vector4;
namespace Internal
{
#include <dali/public-api/rendering/vertex-buffer.h>
#include <dali/internal/update/manager/update-manager.h>
-#if defined (ANDROID) || defined(WIN32)
+#if defined (ANDROID) || defined(WIN32) || defined(__APPLE__)
namespace std
{
uint64_t _Hash_bytes(const void* bytes, uint64_t size, uint64_t seed)
FrameCallbackProcessor( const FrameCallbackProcessor& ) = delete; ///< Deleted copy constructor.
FrameCallbackProcessor( FrameCallbackProcessor&& ) = default; ///< Default move constructor.
FrameCallbackProcessor& operator=( const FrameCallbackProcessor& ) = delete; ///< Deleted copy assignment operator.
- FrameCallbackProcessor& operator=( FrameCallbackProcessor&& ) = default; ///< Default move assignment operator.
+ FrameCallbackProcessor& operator=( FrameCallbackProcessor&& ) = delete; ///< Deleted move assignment operator.
/**
* Adds an implementation of the FrameCallbackInterface.
UpdateProxy( const UpdateProxy& ) = delete; ///< Deleted copy constructor.
UpdateProxy( UpdateProxy&& ) = default; ///< Default move constructor.
UpdateProxy& operator=( const UpdateProxy& ) = delete; ///< Deleted copy assignment operator.
- UpdateProxy& operator=( UpdateProxy&& ) = default; ///< Default move assignment operator.
+ UpdateProxy& operator=( UpdateProxy&& ) = delete; ///< Deleted move assignment operator.
/**
* @copydoc Dali::UpdateProxy::GetPosition()