Merge pull request #649 from mocabe/assert-on-result
Add VULKAN_HPP_ASSERT_ON_RESULT
This commit is contained in:
@@ -57,6 +57,10 @@
|
||||
# define VULKAN_HPP_ASSERT assert
|
||||
#endif
|
||||
|
||||
#if !defined( VULKAN_HPP_ASSERT_ON_RESULT )
|
||||
# define VULKAN_HPP_ASSERT_ON_RESULT VULKAN_HPP_ASSERT
|
||||
#endif
|
||||
|
||||
#if !defined( VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL )
|
||||
# define VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL 1
|
||||
#endif
|
||||
@@ -16144,7 +16148,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
#ifdef VULKAN_HPP_NO_EXCEPTIONS
|
||||
ignore( message );
|
||||
VULKAN_HPP_ASSERT( result == Result::eSuccess );
|
||||
VULKAN_HPP_ASSERT_ON_RESULT( result == Result::eSuccess );
|
||||
return result;
|
||||
#else
|
||||
if ( result != Result::eSuccess )
|
||||
@@ -16159,7 +16163,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
#ifdef VULKAN_HPP_NO_EXCEPTIONS
|
||||
ignore( message );
|
||||
VULKAN_HPP_ASSERT( result == Result::eSuccess );
|
||||
VULKAN_HPP_ASSERT_ON_RESULT( result == Result::eSuccess );
|
||||
return ResultValue<T>( result, std::move( data ) );
|
||||
#else
|
||||
if ( result != Result::eSuccess )
|
||||
@@ -16176,7 +16180,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
#ifdef VULKAN_HPP_NO_EXCEPTIONS
|
||||
ignore( message );
|
||||
VULKAN_HPP_ASSERT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() );
|
||||
VULKAN_HPP_ASSERT_ON_RESULT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() );
|
||||
#else
|
||||
if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() )
|
||||
{
|
||||
@@ -16192,7 +16196,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
#ifdef VULKAN_HPP_NO_EXCEPTIONS
|
||||
ignore( message );
|
||||
VULKAN_HPP_ASSERT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() );
|
||||
VULKAN_HPP_ASSERT_ON_RESULT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() );
|
||||
#else
|
||||
if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() )
|
||||
{
|
||||
@@ -16209,7 +16213,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
# ifdef VULKAN_HPP_NO_EXCEPTIONS
|
||||
ignore( message );
|
||||
VULKAN_HPP_ASSERT( result == Result::eSuccess );
|
||||
VULKAN_HPP_ASSERT_ON_RESULT( result == Result::eSuccess );
|
||||
return ResultValue<UniqueHandle<T, D>>( result, UniqueHandle<T, D>( data, deleter ) );
|
||||
# else
|
||||
if ( result != Result::eSuccess )
|
||||
@@ -16230,7 +16234,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
# ifdef VULKAN_HPP_NO_EXCEPTIONS
|
||||
ignore( message );
|
||||
VULKAN_HPP_ASSERT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() );
|
||||
VULKAN_HPP_ASSERT_ON_RESULT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() );
|
||||
return ResultValue<UniqueHandle<T, D>>( result, UniqueHandle<T, D>( data, deleter ) );
|
||||
# else
|
||||
if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() )
|
||||
|
||||
Reference in New Issue
Block a user