mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Change function throwResultException from static to anonymous namespace
This commit is contained in:
parent
14bfefb209
commit
c5218f5a82
@ -779,7 +779,9 @@ std::string VulkanHppGenerator::generateThrowResultException() const
|
|||||||
cases.pop_back(); // remove last newline
|
cases.pop_back(); // remove last newline
|
||||||
|
|
||||||
const std::string throwTemplate = R"(
|
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 )
|
switch ( result )
|
||||||
{
|
{
|
||||||
@ -787,6 +789,7 @@ ${cases}
|
|||||||
default: throw SystemError( make_error_code( result ) );
|
default: throw SystemError( make_error_code( result ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
)";
|
)";
|
||||||
return replaceWithMap( throwTemplate, { { "cases", cases } } );
|
return replaceWithMap( throwTemplate, { { "cases", cases } } );
|
||||||
}
|
}
|
||||||
|
@ -6297,7 +6297,9 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
};
|
};
|
||||||
# endif /*VK_USE_PLATFORM_WIN32_KHR*/
|
# 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 )
|
switch ( result )
|
||||||
{
|
{
|
||||||
@ -6333,6 +6335,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
default: throw SystemError( make_error_code( result ) );
|
default: throw SystemError( make_error_code( result ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} // namespace
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
Loading…
Reference in New Issue
Block a user