소스 검색

Use C++14 deprecate attribute

christophe 1 개월 전
부모
커밋
a624f74d97
2개의 변경된 파일12개의 추가작업 그리고 19개의 파일을 삭제
  1. 0 8
      glm/detail/setup.hpp
  2. 12 11
      glm/gtx/bit.hpp

+ 0 - 8
glm/detail/setup.hpp

@@ -355,20 +355,12 @@
 // Qualifiers
 
 #if (GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS))
-#	define GLM_DEPRECATED __declspec(deprecated)
 #	define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef __declspec(align(alignment)) type name
 #elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG | GLM_COMPILER_INTEL)
-#	if GLM_LANG & GLM_LANG_CXX14_FLAG
-#		define GLM_DEPRECATED [[deprecated]]
-#	else
-#		define GLM_DEPRECATED __attribute__((__deprecated__))
-#	endif
 #	define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name __attribute__((aligned(alignment)))
 #elif (GLM_COMPILER & GLM_COMPILER_CUDA) || (GLM_COMPILER & GLM_COMPILER_HIP)
-#	define GLM_DEPRECATED
 #	define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name __align__(x)
 #else
-#	define GLM_DEPRECATED
 #	define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name
 #endif
 

+ 12 - 11
glm/gtx/bit.hpp

@@ -41,12 +41,12 @@ namespace glm
 	GLM_FUNC_DECL vec<L, T, Q> highestBitValue(vec<L, T, Q> const& value);
 
 	/// Return the power of two number which value is just higher the input value.
-	/// Deprecated, use ceilPowerOfTwo from GTC_round instead
 	///
 	/// @see gtc_round
 	/// @see gtx_bit
 	template<typename genIUType>
-	GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoAbove(genIUType Value);
+	[[deprecated("Use ceilPowerOfTwo from GTC_round instead")]]
+	GLM_FUNC_DECL genIUType powerOfTwoAbove(genIUType Value);
 
 	/// Return the power of two number which value is just higher the input value.
 	/// Deprecated, use ceilPowerOfTwo from GTC_round instead
@@ -54,39 +54,40 @@ namespace glm
 	/// @see gtc_round
 	/// @see gtx_bit
 	template<length_t L, typename T, qualifier Q>
-	GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> powerOfTwoAbove(vec<L, T, Q> const& value);
+	[[deprecated("Use ceilPowerOfTwo from GTC_round instead")]]
+	GLM_FUNC_DECL vec<L, T, Q> powerOfTwoAbove(vec<L, T, Q> const& value);
 
 	/// Return the power of two number which value is just lower the input value.
-	/// Deprecated, use floorPowerOfTwo from GTC_round instead
 	///
 	/// @see gtc_round
 	/// @see gtx_bit
 	template<typename genIUType>
-	GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoBelow(genIUType Value);
+	[[deprecated("Use floorPowerOfTwo from GTC_round instead")]]
+	GLM_FUNC_DECL genIUType powerOfTwoBelow(genIUType Value);
 
 	/// Return the power of two number which value is just lower the input value.
-	/// Deprecated, use floorPowerOfTwo from GTC_round instead
 	///
 	/// @see gtc_round
 	/// @see gtx_bit
 	template<length_t L, typename T, qualifier Q>
-	GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> powerOfTwoBelow(vec<L, T, Q> const& value);
+	[[deprecated("Use floorPowerOfTwo from GTC_round instead")]]
+	GLM_FUNC_DECL vec<L, T, Q> powerOfTwoBelow(vec<L, T, Q> const& value);
 
 	/// Return the power of two number which value is the closet to the input value.
-	/// Deprecated, use roundPowerOfTwo from GTC_round instead
 	///
 	/// @see gtc_round
 	/// @see gtx_bit
 	template<typename genIUType>
-	GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoNearest(genIUType Value);
+	[[deprecated("Use roundPowerOfTwo from GTC_round instead")]]
+	GLM_FUNC_DECL genIUType powerOfTwoNearest(genIUType Value);
 
 	/// Return the power of two number which value is the closet to the input value.
-	/// Deprecated, use roundPowerOfTwo from GTC_round instead
 	///
 	/// @see gtc_round
 	/// @see gtx_bit
 	template<length_t L, typename T, qualifier Q>
-	GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> powerOfTwoNearest(vec<L, T, Q> const& value);
+	[[deprecated("Use roundPowerOfTwo from GTC_round instead")]]
+	GLM_FUNC_DECL vec<L, T, Q> powerOfTwoNearest(vec<L, T, Q> const& value);
 
 	/// @}
 } //namespace glm