mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Merge pull request #1007 from asuessenbach/protect
Add support of attribute "protect" for enum values, second part
This commit is contained in:
commit
6217c48a88
@ -1249,7 +1249,16 @@ void VulkanHppGenerator::appendEnumToString( std::string &
|
||||
for ( auto const & value : enumData.second.values )
|
||||
{
|
||||
std::string enter, leave;
|
||||
std::tie( enter, leave ) = generateProtection( value.extension );
|
||||
if ( !value.extension.empty() )
|
||||
{
|
||||
assert( value.protect.empty() );
|
||||
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 )
|
||||
{
|
||||
str += previousLeave + enter;
|
||||
|
Loading…
Reference in New Issue
Block a user