Merge pull request #1115 from asuessenbach/throw

Change function throwResultException from static to anonymous namespace
This commit is contained in:
Andreas Süßenbach
2021-10-25 17:57:45 +02:00
committed by GitHub
2 changed files with 40 additions and 34 deletions

View File

@@ -779,12 +779,15 @@ std::string VulkanHppGenerator::generateThrowResultException() const
cases.pop_back(); // remove last newline
const std::string throwTemplate = R"(
[[noreturn]] static void throwResultException( Result result, char const * message )
namespace
{
switch ( result )
[[noreturn]] void throwResultException( Result result, char const * message )
{
switch ( result )
{
${cases}
default: throw SystemError( make_error_code( result ) );
default: throw SystemError( make_error_code( result ) );
}
}
}
)";