Change function throwResultException from static to anonymous namespace

This commit is contained in:
asuessenbach 2021-10-25 15:44:42 +02:00
parent 14bfefb209
commit c5218f5a82
2 changed files with 40 additions and 34 deletions

View File

@ -779,7 +779,9 @@ 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
{
[[noreturn]] void throwResultException( Result result, char const * message )
{
switch ( result )
{
@ -787,6 +789,7 @@ ${cases}
default: throw SystemError( make_error_code( result ) );
}
}
}
)";
return replaceWithMap( throwTemplate, { { "cases", cases } } );
}

View File

@ -6297,7 +6297,9 @@ namespace VULKAN_HPP_NAMESPACE
};
# endif /*VK_USE_PLATFORM_WIN32_KHR*/
[[noreturn]] static void throwResultException( Result result, char const * message )
namespace
{
[[noreturn]] void throwResultException( Result result, char const * message )
{
switch ( result )
{
@ -6333,6 +6335,7 @@ namespace VULKAN_HPP_NAMESPACE
default: throw SystemError( make_error_code( result ) );
}
}
} // namespace
#endif
template <typename T>