mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Add support of attribute "protect" for enum values, second part
This commit is contained in:
parent
4dcc1f06b4
commit
3b46f5c497
@ -1249,7 +1249,16 @@ void VulkanHppGenerator::appendEnumToString( std::string &
|
|||||||
for ( auto const & value : enumData.second.values )
|
for ( auto const & value : enumData.second.values )
|
||||||
{
|
{
|
||||||
std::string enter, leave;
|
std::string enter, leave;
|
||||||
|
if ( !value.extension.empty() )
|
||||||
|
{
|
||||||
|
assert( value.protect.empty() );
|
||||||
std::tie( enter, leave ) = generateProtection( value.extension );
|
std::tie( enter, leave ) = generateProtection( value.extension );
|
||||||
|
}
|
||||||
|
else if ( !value.protect.empty() )
|
||||||
|
{
|
||||||
|
enter = "#if defined( " + value.protect + " )\n";
|
||||||
|
leave = "#endif /*" + value.protect + "*/\n";
|
||||||
|
}
|
||||||
if ( previousEnter != enter )
|
if ( previousEnter != enter )
|
||||||
{
|
{
|
||||||
str += previousLeave + enter;
|
str += previousLeave + enter;
|
||||||
|
Loading…
Reference in New Issue
Block a user