Skip to content

Commit

Permalink
Fix warnings (#1741)
Browse files Browse the repository at this point in the history
* Fix warnings

Minor changes to reduce warnings seen when using gfxreconstruct,
no (intentional) functional changes.

Using struct as in the definition for forward declaration of the
ReplayDeviceInfo tag (clang -Wmismatched-tags)

Explicitely define assignment operators for clang
 -Wdeprecated-copy-with-user-provided-copy warning.
  clang output:
> definition of implicit copy assignment operator for 'ShaderDescriptorInfo'
> is deprecated because it has a user-provided copy constructor

* fix clang-format

---------

Co-authored-by: bradgrantham-lunarg <[email protected]>
  • Loading branch information
dfriederich and bradgrantham-lunarg authored Sep 16, 2024
1 parent 2ee1ed1 commit 247ff67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions framework/decode/vulkan_object_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,8 @@ struct ShaderModuleInfo : public VulkanObjectInfo<VkShaderModule>
type(type), readonly(readonly), accessed(accessed), count(count), is_array(is_array)
{}

ShaderDescriptorInfo(const ShaderDescriptorInfo& other) :
type(other.type), readonly(other.readonly), accessed(other.accessed), count(other.count),
is_array(other.is_array)
{}
ShaderDescriptorInfo(const ShaderDescriptorInfo& other) = default;
ShaderDescriptorInfo& operator=(const ShaderDescriptorInfo& other) = default;

VkDescriptorType type;
bool readonly;
Expand All @@ -428,6 +426,7 @@ struct ShaderModuleInfo : public VulkanObjectInfo<VkShaderModule>
capture_id = other.capture_id;
used_descriptors_info = other.used_descriptors_info;
}
ShaderModuleInfo& operator=(const ShaderModuleInfo& other) = default;

// One entry per descriptor binding
using ShaderDescriptorSetInfo = std::map<uint32_t, ShaderDescriptorInfo>;
Expand Down
2 changes: 1 addition & 1 deletion framework/graphics/vulkan_device_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
namespace gfxrecon::decode
{
//! forward declaration to avoid cyclic include
class ReplayDeviceInfo;
struct ReplayDeviceInfo;
} // namespace gfxrecon::decode

GFXRECON_BEGIN_NAMESPACE(gfxrecon)
Expand Down

0 comments on commit 247ff67

Please sign in to comment.