Fix issue #147. Do not assert on negative result codes when throwing an exception. There're cases where vendors are non-standard conform and return positive return codes and it's also possible that new success codes could be introduced which require special handling. For the latter case it's legit to throw an exception which a positive result code. (#156)

This commit is contained in:
Markus Tavenrath 2017-11-30 15:18:58 +01:00 committed by Andreas Süßenbach
parent b8b1b4db63
commit 05bd56f8c5
2 changed files with 0 additions and 2 deletions

View File

@ -3899,7 +3899,6 @@ void writeThrowExceptions( std::ostream & os, EnumData const& enumData)
os <<
R"( VULKAN_HPP_INLINE void throwResultException( Result result, char const * message )
{
assert ( static_cast<long long int>(result) < 0 );
switch ( result )
{
)";

View File

@ -819,7 +819,6 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void throwResultException( Result result, char const * message )
{
assert ( static_cast<long long int>(result) < 0 );
switch ( result )
{
case Result::eErrorOutOfHostMemory: throw OutOfHostMemoryError ( message );