Enable assert always in Dali::Vector
[platform/core/uifw/dali-core.git] / dali / public-api / common / dali-vector.h
index 8564cec..fd4565e 100644 (file)
@@ -2,7 +2,7 @@
 #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
 {
@@ -843,11 +829,11 @@ public: // API
  * @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);
 }
@@ -859,11 +845,11 @@ inline void Erase(Dali::Vector<T>& vector, const U& value)
  * @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);
 }