#define DALI_VECTOR_H
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
#include <dali/public-api/common/type-traits.h>
#include <dali/public-api/math/math-utils.h>
-/**
- * @brief For DALi internal use, asserts are enabled in debug builds.
- *
- * For Application use, asserts can be enabled manually.
- * @SINCE_1_0.0
- */
-#if defined(DEBUG_ENABLED)
-#define ENABLE_VECTOR_ASSERTS
-#endif
-
-#if defined(ENABLE_VECTOR_ASSERTS)
#define DALI_ASSERT_VECTOR(cond) DALI_ASSERT_ALWAYS(cond)
-#else
-#define DALI_ASSERT_VECTOR(cond)
-#endif
namespace Dali
{
* @brief Empty constructor.
* @SINCE_1_0.0
*/
- VectorAlgorithms()
- {
- }
+ VectorAlgorithms() = default;
/**
* @brief Empty destructor.
* @SINCE_1_0.0
*/
- ~VectorAlgorithms()
- {
- }
+ ~VectorAlgorithms() = default;
/**
* @brief Copy vector contents.
class VectorAlgorithms<false> : public VectorBase
{
private:
- VectorAlgorithms()
- {
- }
- ~VectorAlgorithms()
- {
- }
+ VectorAlgorithms() = default;
+ ~VectorAlgorithms() = default;
};
/// @endcond
* @brief Default constructor. Does not allocate any space.
* @SINCE_1_0.0
*/
- Vector()
- {
- }
+ Vector() = default;
/**
* @brief Destructor. Releases the allocated space.
* @param[in] vector The vector
* @param[in] value The value to be removed.
*/
-template <class T, class U>
+template<class T, class U>
inline void Erase(Dali::Vector<T>& vector, const U& value)
{
auto begin = vector.Begin();
- auto end = vector.End();
+ auto end = vector.End();
vector.Erase(std::remove(begin, end, value), end);
}
* @param[in] vector The vector
* @param[in] predicate The predicate
*/
-template <class T, class Predicate>
+template<class T, class Predicate>
inline void EraseIf(Dali::Vector<T>& vector, Predicate predicate)
{
auto begin = vector.Begin();
- auto end = vector.End();
+ auto end = vector.End();
vector.Erase(std::remove_if(begin, end, predicate), end);
}