samples: Remove C++14 codes

This commit is contained in:
mocabe
2020-01-31 04:51:32 +09:00
committed by Markus Tavenrath
parent 1572c0b1ba
commit 32d0bc6843
5 changed files with 23 additions and 26 deletions

View File

@@ -41,4 +41,3 @@ target_link_libraries(utils PUBLIC glslang)
target_link_libraries(utils PUBLIC glslang-default-resource-limits)
target_link_libraries(utils PUBLIC SPIRV)
target_compile_definitions(utils PUBLIC VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1)
target_compile_features(utils PUBLIC cxx_std_14)

View File

@@ -448,7 +448,7 @@ namespace vk
for (size_t i = 0; i < sizeof(requestedFormats) / sizeof(requestedFormats[0]); i++)
{
vk::Format requestedFormat = requestedFormats[i];
auto it = std::find_if(formats.begin(), formats.end(), [requestedFormat, requestedColorSpace](auto const& f) { return (f.format == requestedFormat) && (f.colorSpace == requestedColorSpace); });
auto it = std::find_if(formats.begin(), formats.end(), [requestedFormat, requestedColorSpace](vk::SurfaceFormatKHR const& f) { return (f.format == requestedFormat) && (f.colorSpace == requestedColorSpace); });
if (it != formats.end())
{
pickedFormat = *it;
@@ -802,7 +802,7 @@ namespace vk
if (needsStaging)
{
assert((formatProperties.optimalTilingFeatures & formatFeatureFlags) == formatFeatureFlags);
stagingBufferData = std::make_unique<BufferData>(physicalDevice, device, extent.width * extent.height * 4, vk::BufferUsageFlagBits::eTransferSrc);
stagingBufferData = std::unique_ptr<BufferData>(new BufferData(physicalDevice, device, extent.width * extent.height * 4, vk::BufferUsageFlagBits::eTransferSrc));
imageTiling = vk::ImageTiling::eOptimal;
usageFlags |= vk::ImageUsageFlagBits::eTransferDst;
initialLayout = vk::ImageLayout::eUndefined;
@@ -813,8 +813,8 @@ namespace vk
initialLayout = vk::ImageLayout::ePreinitialized;
requirements = vk::MemoryPropertyFlagBits::eHostCoherent | vk::MemoryPropertyFlagBits::eHostVisible;
}
imageData = std::make_unique<ImageData>(physicalDevice, device, format, extent, imageTiling, usageFlags | vk::ImageUsageFlagBits::eSampled, initialLayout, requirements,
vk::ImageAspectFlagBits::eColor);
imageData = std::unique_ptr<ImageData>(new ImageData(physicalDevice, device, format, extent, imageTiling, usageFlags | vk::ImageUsageFlagBits::eSampled, initialLayout, requirements,
vk::ImageAspectFlagBits::eColor));
textureSampler = device->createSamplerUnique(vk::SamplerCreateInfo(vk::SamplerCreateFlags(), vk::Filter::eLinear, vk::Filter::eLinear, vk::SamplerMipmapMode::eLinear,
vk::SamplerAddressMode::eRepeat, vk::SamplerAddressMode::eRepeat, vk::SamplerAddressMode::eRepeat, 0.0f, anisotropyEnable,