From 1ac1b5bc5a853e8cc0c9c9e805ea7b330a478eb0 Mon Sep 17 00:00:00 2001 From: Mike Stroyan Date: Fri, 25 Sep 2015 16:36:21 -0600 Subject: [PATCH] layers: Image layer does not need to reserve space Image layer had been calling imageMap.reserve to recover from memset of imageMap. That is no longer needed. --- layers/image.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/layers/image.cpp b/layers/image.cpp index d822b2eb..b6d03a14 100644 --- a/layers/image.cpp +++ b/layers/image.cpp @@ -57,6 +57,10 @@ static unordered_map layer_data_map; static device_table_map image_device_table_map; static instance_table_map image_instance_table_map; +template static layer_data *get_my_data_ptr( + void *data_key, + std::unordered_map &data_map); + // "my device data" debug_report_data *mdd(const void* object) { @@ -171,7 +175,6 @@ VK_LAYER_EXPORT VkResult VKAPI vkCreateDevice(VkPhysicalDevice physicalDevice, c layer_data *device_data = get_my_data_ptr(get_dispatch_key(*pDevice), layer_data_map); device_data->report_data = layer_debug_report_create_device(instance_data->report_data, *pDevice); device_data->physicalDevice = physicalDevice; - device_data->imageMap.reserve(10); } return result; -- 2.34.1