diff options
| author | Tobin Ehlis <tobine@google.com> | 2017-06-21 09:26:04 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2017-06-21 10:51:36 -0600 |
| commit | 379b5351a43c484a49b56a00f6edf7aa2b9ba9e3 (patch) | |
| tree | a4432a731d66e36841f5986c18ab5b1ad4ae8e58 | |
| parent | ff80053c0c90187d4136b5882908ae19681e90e7 (diff) | |
| download | usermoji-379b5351a43c484a49b56a00f6edf7aa2b9ba9e3.tar.xz | |
layers:Pass shared_ptr by const ref
DescriptorSetLayout shared_ptr will always survive the lifetime of the
DescriptorSet constructor so pass by const ref.
| -rw-r--r-- | layers/descriptor_sets.cpp | 2 | ||||
| -rw-r--r-- | layers/descriptor_sets.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp index f4ce7a47..a0a300b2 100644 --- a/layers/descriptor_sets.cpp +++ b/layers/descriptor_sets.cpp @@ -313,7 +313,7 @@ cvdescriptorset::AllocateDescriptorSetsData::AllocateDescriptorSetsData(uint32_t : required_descriptors_by_type{}, layout_nodes(count, nullptr) {} cvdescriptorset::DescriptorSet::DescriptorSet(const VkDescriptorSet set, const VkDescriptorPool pool, - std::shared_ptr<DescriptorSetLayout> layout, const layer_data *dev_data) + const std::shared_ptr<DescriptorSetLayout> &layout, const layer_data *dev_data) : some_update_(false), set_(set), pool_state_(nullptr), diff --git a/layers/descriptor_sets.h b/layers/descriptor_sets.h index 975026d6..8b43b171 100644 --- a/layers/descriptor_sets.h +++ b/layers/descriptor_sets.h @@ -321,7 +321,7 @@ void PerformAllocateDescriptorSets(const VkDescriptorSetAllocateInfo *, const Vk */ class DescriptorSet : public BASE_NODE { public: - DescriptorSet(const VkDescriptorSet, const VkDescriptorPool, const std::shared_ptr<DescriptorSetLayout>, + DescriptorSet(const VkDescriptorSet, const VkDescriptorPool, const std::shared_ptr<DescriptorSetLayout> &, const core_validation::layer_data *); ~DescriptorSet(); // A number of common Get* functions that return data based on layout from which this set was created |
