mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-15 00:31:06 +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 )
|
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