From a866a6cfcbae45d851200259ea1ce0c62efc1183 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Thu, 22 Sep 2016 07:30:05 -0600 Subject: [PATCH] layers: A few minor clean-ups from code review Better use of auto and killing some unneeded code. --- layers/core_validation.cpp | 4 ++-- layers/core_validation_types.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 2d1214f..df0e180 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -3730,7 +3730,7 @@ template void SetLayout(OBJECT *pObject, VkImage im void SetLayout(const layer_data *dev_data, GLOBAL_CB_NODE *pCB, VkImageView imageView, const VkImageLayout &layout) { auto view_state = getImageViewState(dev_data, imageView); assert(view_state); - const VkImage &image = view_state->create_info.image; + auto image = view_state->create_info.image; const VkImageSubresourceRange &subRange = view_state->create_info.subresourceRange; // TODO: Do not iterate over every possibility - consolidate where possible for (uint32_t j = 0; j < subRange.levelCount; j++) { @@ -9213,7 +9213,7 @@ static bool ValidateFramebufferCreateInfo(layer_data *dev_data, const VkFramebuf const VkImageView *image_views = pCreateInfo->pAttachments; for (uint32_t i = 0; i < pCreateInfo->attachmentCount; ++i) { auto view_state = getImageViewState(dev_data, image_views[i]); - auto ivci = view_state->create_info; + auto &ivci = view_state->create_info; if (ivci.format != rpci->pAttachments[i].format) { skip_call |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, diff --git a/layers/core_validation_types.h b/layers/core_validation_types.h index ff2cdbf..5d38a1a 100644 --- a/layers/core_validation_types.h +++ b/layers/core_validation_types.h @@ -162,7 +162,6 @@ class BUFFER_NODE : public BASE_NODE { class BUFFER_VIEW_STATE : public BASE_NODE { public: - using BASE_NODE::in_use; VkBufferView buffer_view; VkBufferViewCreateInfo create_info; BUFFER_VIEW_STATE() : buffer_view(VK_NULL_HANDLE), create_info{} {}; @@ -200,7 +199,6 @@ class IMAGE_NODE : public BASE_NODE { class IMAGE_VIEW_STATE : public BASE_NODE { public: - using BASE_NODE::in_use; VkImageView image_view; VkImageViewCreateInfo create_info; IMAGE_VIEW_STATE() : image_view(VK_NULL_HANDLE), create_info{} {}; -- 2.7.4