Remove DALI_COMPILE_TIME_ASSERT macro (use static_assert instead) 40/240340/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Wed, 5 Aug 2020 12:40:30 +0000 (13:40 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Wed, 5 Aug 2020 12:40:30 +0000 (13:40 +0100)
Change-Id: If300adf97de686e9b65fa9ed97b5600c8109b5c1

dali/devel-api/object/property-helper-devel.h
dali/public-api/common/compile-time-assert.h [deleted file]
dali/public-api/dali-core.h
dali/public-api/file.list
dali/public-api/object/type-registry-helper.h

index f680306..fc93ecf 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_PROPERTY_HELPER_DEVEL_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
  */
 #define DALI_DEVEL_PROPERTY_REGISTRATION_INTERNAL( count, typeRegistrationObject, objectNamespace, objectType, develNamespace, text, valueType, enumIndex ) \
   Dali::PropertyRegistration DALI_TOKEN_PASTE( property, count ) ( typeRegistrationObject, text, objectNamespace:: develNamespace ::Property::enumIndex, Dali::Property::valueType, &objectType::SetProperty, &objectType::GetProperty ); \
-  DALI_COMPILE_TIME_ASSERT( ( objectNamespace:: develNamespace ::Property::enumIndex - objectNamespace::objectType::PROPERTY_START_INDEX ) == count );
+  static_assert( ( objectNamespace:: develNamespace ::Property::enumIndex - objectNamespace::objectType::PROPERTY_START_INDEX ) == count );
 
 #define DALI_DEVEL_PROPERTY_REGISTRATION_INTERNAL_READ_ONLY( count, typeRegistrationObject, objectNamespace, objectType, develNamespace, text, valueType, enumIndex ) \
   Dali::PropertyRegistration DALI_TOKEN_PASTE( property, count ) ( typeRegistrationObject, text, objectNamespace:: develNamespace ::Property::enumIndex, Dali::Property::valueType, NULL, &objectType::GetProperty ); \
-  DALI_COMPILE_TIME_ASSERT( ( objectNamespace:: develNamespace ::Property::enumIndex - objectNamespace::objectType::PROPERTY_START_INDEX ) == count );
+  static_assert( ( objectNamespace:: develNamespace ::Property::enumIndex - objectNamespace::objectType::PROPERTY_START_INDEX ) == count );
 
 /**
  * @brief These macros are used to define properties for implementations of CustomActor.
diff --git a/dali/public-api/common/compile-time-assert.h b/dali/public-api/common/compile-time-assert.h
deleted file mode 100644 (file)
index 7fd4098..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef DALI_COMPILE_TIME_ASSERT_H
-#define DALI_COMPILE_TIME_ASSERT_H
-
-/*
- * Copyright (c) 2019 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// INTERNAL INCLUDES
-#include <dali/public-api/common/dali-common.h>
-
-// EXTERNAL INCLUDES
-#include <cstddef>
-
-namespace Dali
-{
-/**
- * @addtogroup dali_core_common
- * @{
- */
-
-/**
- * @brief Use DALI_COMPILE_TIME_ASSERT to test expressions at compile time.
- *
- * @SINCE_1_0.0
- */
-#define DALI_COMPILE_TIME_ASSERT( x ) static_assert( x, #x );
-
-/**
- * @}
- */
-} // namespace Dali
-
-#endif // DALI_COMPILE_TIME_ASSERT_H
index f9ee620..39fc2f1 100644 (file)
@@ -37,7 +37,6 @@
 #include <dali/public-api/animation/path.h>
 #include <dali/public-api/animation/time-period.h>
 
-#include <dali/public-api/common/compile-time-assert.h>
 #include <dali/public-api/common/constants.h>
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/common/dali-vector.h>
index 5aff7d8..e40a700 100644 (file)
@@ -117,7 +117,6 @@ SET( public_api_core_animation_header_files
 
 
 SET( public_api_core_common_header_files
-  ${public_api_src_dir}/common/compile-time-assert.h
   ${public_api_src_dir}/common/constants.h
   ${public_api_src_dir}/common/dali-common.h
   ${public_api_src_dir}/common/dali-vector.h
index 9c184aa..27b53fb 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TYPE_REGISTRY_HELPER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -19,7 +19,6 @@
  */
 
 // INTERNAL INCLUDES
-#include <dali/public-api/common/compile-time-assert.h>
 #include <dali/public-api/object/type-registry.h>
 
 /**
 
 #define DALI_PROPERTY_REGISTRATION_INTERNAL( count, typeRegistrationObject, objectNamespace, objectType, text, valueType, enumIndex ) \
   Dali::PropertyRegistration DALI_TOKEN_PASTE( property, count ) ( typeRegistrationObject, text, objectNamespace::objectType::Property::enumIndex, Dali::Property::valueType, &objectType::SetProperty, &objectType::GetProperty ); \
-  DALI_COMPILE_TIME_ASSERT( ( objectNamespace::objectType::Property::enumIndex - objectNamespace::objectType::PROPERTY_START_INDEX ) == count );
+  static_assert( ( objectNamespace::objectType::Property::enumIndex - objectNamespace::objectType::PROPERTY_START_INDEX ) == count );
 
 #define DALI_PROPERTY_REGISTRATION_INTERNAL_READ_ONLY( count, typeRegistrationObject, objectNamespace, objectType, text, valueType, enumIndex ) \
   Dali::PropertyRegistration DALI_TOKEN_PASTE( property, count ) ( typeRegistrationObject, text, objectNamespace::objectType::Property::enumIndex, Dali::Property::valueType, NULL, &objectType::GetProperty ); \
-  DALI_COMPILE_TIME_ASSERT( ( objectNamespace::objectType::Property::enumIndex - objectNamespace::objectType::PROPERTY_START_INDEX ) == count );
+  static_assert( ( objectNamespace::objectType::Property::enumIndex - objectNamespace::objectType::PROPERTY_START_INDEX ) == count );
 
 #define DALI_ANIMATABLE_PROPERTY_REGISTRATION_INTERNAL( count, typeRegistrationObject, objectNamespace, objectType, text, valueType, enumIndex) \
   Dali::AnimatablePropertyRegistration DALI_TOKEN_PASTE( property, count ) ( typeRegistrationObject, text, objectNamespace::objectType::Property::enumIndex, Dali::Property::valueType );