mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Make struct cast operators explicit.
This commit is contained in:
parent
cdbfbcbc80
commit
6fdeaa8001
@ -96,7 +96,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||||||
( formats[0].format == vk::Format::eUndefined ) ? vk::Format::eB8G8R8A8Unorm : formats[0].format;
|
( formats[0].format == vk::Format::eUndefined ) ? vk::Format::eB8G8R8A8Unorm : formats[0].format;
|
||||||
|
|
||||||
vk::SurfaceCapabilitiesKHR surfaceCapabilities = physicalDevice.getSurfaceCapabilitiesKHR( *surface );
|
vk::SurfaceCapabilitiesKHR surfaceCapabilities = physicalDevice.getSurfaceCapabilitiesKHR( *surface );
|
||||||
VkExtent2D swapchainExtent;
|
vk::Extent2D swapchainExtent;
|
||||||
if ( surfaceCapabilities.currentExtent.width == std::numeric_limits<uint32_t>::max() )
|
if ( surfaceCapabilities.currentExtent.width == std::numeric_limits<uint32_t>::max() )
|
||||||
{
|
{
|
||||||
// If the surface size is undefined, the size is set to the size of the images requested.
|
// If the surface size is undefined, the size is set to the size of the images requested.
|
||||||
|
@ -376,7 +376,7 @@ namespace vk
|
|||||||
colorFormat = surfaceFormat.format;
|
colorFormat = surfaceFormat.format;
|
||||||
|
|
||||||
vk::SurfaceCapabilitiesKHR surfaceCapabilities = physicalDevice.getSurfaceCapabilitiesKHR( *surface );
|
vk::SurfaceCapabilitiesKHR surfaceCapabilities = physicalDevice.getSurfaceCapabilitiesKHR( *surface );
|
||||||
VkExtent2D swapchainExtent;
|
vk::Extent2D swapchainExtent;
|
||||||
if ( surfaceCapabilities.currentExtent.width == std::numeric_limits<uint32_t>::max() )
|
if ( surfaceCapabilities.currentExtent.width == std::numeric_limits<uint32_t>::max() )
|
||||||
{
|
{
|
||||||
// If the surface size is undefined, the size is set to the size of the images requested.
|
// If the surface size is undefined, the size is set to the size of the images requested.
|
||||||
|
@ -11983,12 +11983,12 @@ ${allowDuplicate}
|
|||||||
${typeValue}
|
${typeValue}
|
||||||
${constructorAndSetters}
|
${constructorAndSetters}
|
||||||
|
|
||||||
operator Vk${structureType} const &() const VULKAN_HPP_NOEXCEPT
|
explicit operator Vk${structureType} const &() const VULKAN_HPP_NOEXCEPT
|
||||||
{
|
{
|
||||||
return *reinterpret_cast<const Vk${structureType}*>( this );
|
return *reinterpret_cast<const Vk${structureType}*>( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
operator Vk${structureType} &() VULKAN_HPP_NOEXCEPT
|
explicit operator Vk${structureType} &() VULKAN_HPP_NOEXCEPT
|
||||||
{
|
{
|
||||||
return *reinterpret_cast<Vk${structureType}*>( this );
|
return *reinterpret_cast<Vk${structureType}*>( this );
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||||||
( formats[0].format == vk::Format::eUndefined ) ? vk::Format::eB8G8R8A8Unorm : formats[0].format;
|
( formats[0].format == vk::Format::eUndefined ) ? vk::Format::eB8G8R8A8Unorm : formats[0].format;
|
||||||
|
|
||||||
vk::SurfaceCapabilitiesKHR surfaceCapabilities = physicalDevice.getSurfaceCapabilitiesKHR( surface );
|
vk::SurfaceCapabilitiesKHR surfaceCapabilities = physicalDevice.getSurfaceCapabilitiesKHR( surface );
|
||||||
VkExtent2D swapchainExtent;
|
vk::Extent2D swapchainExtent;
|
||||||
if ( surfaceCapabilities.currentExtent.width == std::numeric_limits<uint32_t>::max() )
|
if ( surfaceCapabilities.currentExtent.width == std::numeric_limits<uint32_t>::max() )
|
||||||
{
|
{
|
||||||
// If the surface size is undefined, the size is set to the size of the images requested.
|
// If the surface size is undefined, the size is set to the size of the images requested.
|
||||||
|
@ -909,7 +909,7 @@ namespace vk
|
|||||||
colorFormat = surfaceFormat.format;
|
colorFormat = surfaceFormat.format;
|
||||||
|
|
||||||
vk::SurfaceCapabilitiesKHR surfaceCapabilities = physicalDevice.getSurfaceCapabilitiesKHR( surface );
|
vk::SurfaceCapabilitiesKHR surfaceCapabilities = physicalDevice.getSurfaceCapabilitiesKHR( surface );
|
||||||
VkExtent2D swapchainExtent;
|
vk::Extent2D swapchainExtent;
|
||||||
if ( surfaceCapabilities.currentExtent.width == std::numeric_limits<uint32_t>::max() )
|
if ( surfaceCapabilities.currentExtent.width == std::numeric_limits<uint32_t>::max() )
|
||||||
{
|
{
|
||||||
// If the surface size is undefined, the size is set to the size of the images requested.
|
// If the surface size is undefined, the size is set to the size of the images requested.
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user