From c747ca458836188457e438c40ad343650fb4247f Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Tue, 8 Mar 2022 11:36:54 +0100 Subject: [PATCH] chore(warnings): fix warnings about unused variables in Release mode ``` /home/stephan/projects/Vulkan-Hpp/VulkanHppGenerator.cpp:9105:12: error: unused variable 'constructorCommandIt' [-Werror,-Wunused-variable] auto constructorCommandIt = m_commands.find( handle.second.constructorIts.front()->first ); ^ /home/stephan/projects/Vulkan-Hpp/VulkanHppGenerator.cpp:9732:12: error: unused variable 'handleIt' [-Werror,-Wunused-variable] auto handleIt = m_handles.find( "Vk" + parentType ); ``` --- VulkanHppGenerator.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 18f4263..fd760e4 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -9102,7 +9102,9 @@ std::string if ( !handle.second.secondLevelCommands.empty() ) { assert( !handle.second.constructorIts.empty() ); +#if !defined( NDEBUG ) auto constructorCommandIt = m_commands.find( handle.second.constructorIts.front()->first ); +#endif assert( ( constructorCommandIt != m_commands.end() ) && ( 1 < constructorCommandIt->second.params.size() ) ); assert( std::next( constructorCommandIt->second.params.begin() )->type.type == "Vk" + parentType ); @@ -9729,7 +9731,9 @@ std::tuplesecond.params.empty() ); auto const & frontType = handle.second.constructorIts.front()->second.params.front().type.type; assert( isHandleType( frontType ) ); +#if !defined( NDEBUG ) auto handleIt = m_handles.find( "Vk" + parentType ); +#endif assert( handleIt != m_handles.end() ); assert( handleIt->second.parent == frontType ); std::string frontName = handle.second.constructorIts.front()->second.params.front().name;