rsx: Apply Clang-Tidy fix "modernize-use-equals-default"

This commit is contained in:
scribam 2019-06-08 09:33:48 +02:00 committed by kd-11
parent 635695ac78
commit 44265aa27d
24 changed files with 64 additions and 89 deletions

View file

@ -254,8 +254,7 @@ public:
f32 fp_value; f32 fp_value;
}; };
program_buffer_patch_entry() program_buffer_patch_entry() = default;
{}
program_buffer_patch_entry(f32& key, f32& value) program_buffer_patch_entry(f32& key, f32& value)
{ {

View file

@ -38,7 +38,7 @@ namespace rsx
f32 scale_x = 1.f; f32 scale_x = 1.f;
f32 scale_y = 1.f; f32 scale_y = 1.f;
virtual ~sampled_image_descriptor_base() {} virtual ~sampled_image_descriptor_base() = default;
virtual u32 encoded_component_map() const = 0; virtual u32 encoded_component_map() const = 0;
}; };

View file

@ -149,7 +149,7 @@ namespace rsx
} }
format_info; format_info;
render_target_descriptor() {} render_target_descriptor() = default;
virtual ~render_target_descriptor() virtual ~render_target_descriptor()
{ {

View file

@ -180,8 +180,7 @@ namespace rsx
u16 depth = 1; u16 depth = 1;
bool do_not_cache = false; bool do_not_cache = false;
deferred_subresource() deferred_subresource() = default;
{}
deferred_subresource(image_resource_type _res, deferred_request_command _op, u32 _addr, u32 _fmt, u16 _x, u16 _y, u16 _w, u16 _h, u16 _d, texture_channel_remap_t _remap) : deferred_subresource(image_resource_type _res, deferred_request_command _op, u32 _addr, u32 _fmt, u16 _x, u16 _y, u16 _w, u16 _h, u16 _d, texture_channel_remap_t _remap) :
external_handle(_res), op(_op), base_address(_addr), gcm_format(_fmt), x(_x), y(_y), width(_w), height(_h), depth(_d), remap(std::move(_remap)) external_handle(_res), op(_op), base_address(_addr), gcm_format(_fmt), x(_x), y(_y), width(_w), height(_h), depth(_d), remap(std::move(_remap))
@ -210,8 +209,7 @@ namespace rsx
deferred_subresource external_subresource_desc = {}; deferred_subresource external_subresource_desc = {};
bool flag = false; bool flag = false;
sampled_image_descriptor() sampled_image_descriptor() = default;
{}
sampled_image_descriptor(image_view_type handle, texture_upload_context ctx, bool is_depth, sampled_image_descriptor(image_view_type handle, texture_upload_context ctx, bool is_depth,
f32 x_scale, f32 y_scale, rsx::texture_dimension_extended type, bool cyclic_reference = false) f32 x_scale, f32 y_scale, rsx::texture_dimension_extended type, bool cyclic_reference = false)
@ -1086,7 +1084,7 @@ namespace rsx
public: public:
texture_cache() : m_storage(this), m_predictor(this) {} texture_cache() : m_storage(this), m_predictor(this) {}
~texture_cache() {} ~texture_cache() = default;
void clear() void clear()
{ {

View file

@ -375,9 +375,7 @@ void GLFragmentDecompilerThread::Task()
m_shader = Decompile(); m_shader = Decompile();
} }
GLFragmentProgram::GLFragmentProgram() GLFragmentProgram::GLFragmentProgram() = default;
{
}
GLFragmentProgram::~GLFragmentProgram() GLFragmentProgram::~GLFragmentProgram()
{ {

View file

@ -268,8 +268,8 @@ namespace gl
public: public:
fence() {} fence() = default;
~fence() {} ~fence() = default;
void create() void create()
{ {
@ -1120,8 +1120,7 @@ namespace gl
: m_buffer(_buffer), m_offset(offset), m_range(range), m_format(format) : m_buffer(_buffer), m_offset(offset), m_range(range), m_format(format)
{} {}
buffer_view() buffer_view() = default;
{}
void update(buffer *_buffer, u32 offset, u32 range, GLenum format = GL_R8UI) void update(buffer *_buffer, u32 offset, u32 range, GLenum format = GL_R8UI)
{ {

View file

@ -79,9 +79,8 @@ namespace gl
public: public:
text_writer() {} text_writer() = default;
~text_writer() = default;
~text_writer(){}
void init() void init()
{ {

View file

@ -502,8 +502,7 @@ namespace gl
std::unique_ptr<gl::texture> image; std::unique_ptr<gl::texture> image;
std::unique_ptr<gl::texture_view> view; std::unique_ptr<gl::texture_view> view;
discardable_storage() discardable_storage() = default;
{}
discardable_storage(std::unique_ptr<gl::texture>& tex) discardable_storage(std::unique_ptr<gl::texture>& tex)
{ {

View file

@ -332,9 +332,7 @@ void GLVertexDecompilerThread::Task()
m_shader = Decompile(); m_shader = Decompile();
} }
GLVertexProgram::GLVertexProgram() GLVertexProgram::GLVertexProgram() = default;
{
}
GLVertexProgram::~GLVertexProgram() GLVertexProgram::~GLVertexProgram()
{ {

View file

@ -68,7 +68,7 @@ using draw_context_t = void*;
public: public:
GSFrameBase() = default; GSFrameBase() = default;
GSFrameBase(const GSFrameBase&) = delete; GSFrameBase(const GSFrameBase&) = delete;
virtual ~GSFrameBase() {} virtual ~GSFrameBase() = default;
virtual void close() = 0; virtual void close() = 0;
virtual bool shown() = 0; virtual bool shown() = 0;

View file

@ -46,7 +46,7 @@ namespace rsx
{ {
float values[4]; float values[4];
vertex() {} vertex() = default;
vertex(float x, float y) vertex(float x, float y)
{ {
@ -162,7 +162,7 @@ namespace rsx
public: public:
fontmgr() {} fontmgr() = default;
~fontmgr() ~fontmgr()
{ {
if (m_instance) if (m_instance)
@ -364,7 +364,7 @@ namespace rsx
u8 blur_strength = 0; u8 blur_strength = 0;
command_config() {} command_config() = default;
void set_image_resource(u8 ref) void set_image_resource(u8 ref)
{ {
@ -482,7 +482,7 @@ namespace rsx
u16 margin_left = 0; u16 margin_left = 0;
u16 margin_top = 0; u16 margin_top = 0;
overlay_element() {} overlay_element() = default;
overlay_element(u16 _w, u16 _h) : w(_w), h(_h) {} overlay_element(u16 _w, u16 _h) : w(_w), h(_h) {}
virtual ~overlay_element() = default; virtual ~overlay_element() = default;
@ -1100,7 +1100,7 @@ namespace rsx
struct label : public overlay_element struct label : public overlay_element
{ {
label() {} label() = default;
label(const std::string& text) label(const std::string& text)
{ {

View file

@ -158,8 +158,8 @@ namespace rsx
} }
public: public:
display_manager() {} display_manager() = default;
~display_manager() {} ~display_manager() = default;
// Adds an object to the internal list. Optionally removes other objects of the same type. // Adds an object to the internal list. Optionally removes other objects of the same type.
// Original handle loses ownership but a usable pointer is returned // Original handle loses ownership but a usable pointer is returned
@ -460,8 +460,8 @@ namespace rsx
u32 flags = 0; u32 flags = 0;
u32 char_limit = UINT32_MAX; u32 char_limit = UINT32_MAX;
osk_dialog() {} osk_dialog() = default;
virtual ~osk_dialog() {} virtual ~osk_dialog() = default;
void Create(const std::string& title, const std::u16string& message, char16_t* init_text, u32 charlimit, u32 options) override = 0; void Create(const std::string& title, const std::u16string& message, char16_t* init_text, u32 charlimit, u32 options) override = 0;
void Close(bool ok) override; void Close(bool ok) override;

View file

@ -124,7 +124,7 @@ namespace rsx
public: public:
FIFO_control(rsx::thread* pctrl); FIFO_control(rsx::thread* pctrl);
~FIFO_control() {} ~FIFO_control() = default;
u32 get_pos() { return m_internal_get; } u32 get_pos() { return m_internal_get; }
void sync_get() { m_ctrl->get.release(m_internal_get); } void sync_get() { m_ctrl->get.release(m_internal_get); }

View file

@ -394,8 +394,8 @@ namespace rsx
std::vector<queued_report_write> m_pending_writes; std::vector<queued_report_write> m_pending_writes;
std::unordered_map<u32, u32> m_statistics_map; std::unordered_map<u32, u32> m_statistics_map;
ZCULL_control() {} ZCULL_control() = default;
~ZCULL_control() {} ~ZCULL_control() = default;
void set_enabled(class ::rsx::thread* ptimer, bool state); void set_enabled(class ::rsx::thread* ptimer, bool state);
void set_active(class ::rsx::thread* ptimer, bool state); void set_active(class ::rsx::thread* ptimer, bool state);

View file

@ -409,9 +409,7 @@ void VKFragmentDecompilerThread::Task()
vk_prog->SetInputs(inputs); vk_prog->SetInputs(inputs);
} }
VKFragmentProgram::VKFragmentProgram() VKFragmentProgram::VKFragmentProgram() = default;
{
}
VKFragmentProgram::~VKFragmentProgram() VKFragmentProgram::~VKFragmentProgram()
{ {

View file

@ -74,8 +74,7 @@ struct command_buffer_chunk: public vk::command_buffer
std::atomic<u64> last_sync = { 0 }; std::atomic<u64> last_sync = { 0 };
shared_mutex guard_mutex; shared_mutex guard_mutex;
command_buffer_chunk() command_buffer_chunk() = default;
{}
void init_fence(VkDevice dev) void init_fence(VkDevice dev)
{ {
@ -246,7 +245,7 @@ struct flush_request_task
atomic_t<int> num_waiters{ 0 }; //Number of threads waiting for this request to be serviced atomic_t<int> num_waiters{ 0 }; //Number of threads waiting for this request to be serviced
bool hard_sync = false; bool hard_sync = false;
flush_request_task(){} flush_request_task() = default;
void post(bool _hard_sync) void post(bool _hard_sync)
{ {
@ -303,8 +302,8 @@ private:
public: public:
resource_manager() {} resource_manager() = default;
~resource_manager() {} ~resource_manager() = default;
void destroy() void destroy()
{ {

View file

@ -216,7 +216,7 @@ namespace vk
using mem_handle_t = void *; using mem_handle_t = void *;
mem_allocator_base(VkDevice dev, VkPhysicalDevice /*pdev*/) : m_device(dev) {} mem_allocator_base(VkDevice dev, VkPhysicalDevice /*pdev*/) : m_device(dev) {}
virtual ~mem_allocator_base() {} virtual ~mem_allocator_base() = default;
virtual void destroy() = 0; virtual void destroy() = 0;
@ -247,7 +247,7 @@ namespace vk
vmaCreateAllocator(&allocatorInfo, &m_allocator); vmaCreateAllocator(&allocatorInfo, &m_allocator);
} }
~mem_allocator_vma() {} ~mem_allocator_vma() = default;
void destroy() override void destroy() override
{ {
@ -315,7 +315,7 @@ namespace vk
{ {
public: public:
mem_allocator_vk(VkDevice dev, VkPhysicalDevice pdev) : mem_allocator_base(dev, pdev) {} mem_allocator_vk(VkDevice dev, VkPhysicalDevice pdev) : mem_allocator_base(dev, pdev) {}
~mem_allocator_vk() {} ~mem_allocator_vk() = default;
void destroy() override {} void destroy() override {}
@ -413,8 +413,8 @@ namespace vk
public: public:
physical_device() {} physical_device() = default;
~physical_device() {} ~physical_device() = default;
void create(VkInstance context, VkPhysicalDevice pdev) void create(VkInstance context, VkPhysicalDevice pdev)
{ {
@ -619,11 +619,8 @@ namespace vk
} }
public: public:
render_device() render_device() = default;
{} ~render_device() = default;
~render_device()
{}
void create(vk::physical_device &pdev, uint32_t graphics_queue_idx) void create(vk::physical_device &pdev, uint32_t graphics_queue_idx)
{ {
@ -789,8 +786,8 @@ namespace vk
VkCommandPool pool = nullptr; VkCommandPool pool = nullptr;
public: public:
command_pool() {} command_pool() = default;
~command_pool() {} ~command_pool() = default;
void create(vk::render_device &dev) void create(vk::render_device &dev)
{ {
@ -850,8 +847,8 @@ namespace vk
u32 flags = 0; u32 flags = 0;
public: public:
command_buffer() {} command_buffer() = default;
~command_buffer() {} ~command_buffer() = default;
void create(vk::command_pool &cmd_pool, bool auto_reset = false) void create(vk::command_pool &cmd_pool, bool auto_reset = false)
{ {
@ -1506,7 +1503,7 @@ namespace vk
vk::render_device *owner = nullptr; vk::render_device *owner = nullptr;
public: public:
swapchain_image_WSI() {} swapchain_image_WSI() = default;
void create(vk::render_device &dev, VkImage &swap_image, VkFormat format) void create(vk::render_device &dev, VkImage &swap_image, VkFormat format)
{ {
@ -1634,7 +1631,7 @@ public:
m_surface_format = format; m_surface_format = format;
} }
virtual ~swapchain_base() {} virtual ~swapchain_base() = default;
virtual void create(display_handle_t& handle) = 0; virtual void create(display_handle_t& handle) = 0;
virtual void destroy(bool full = true) = 0; virtual void destroy(bool full = true) = 0;
@ -1696,8 +1693,7 @@ public:
: swapchain_base(gpu, _present_queue, _graphics_queue, format) : swapchain_base(gpu, _present_queue, _graphics_queue, format)
{} {}
~abstract_swapchain_impl() ~abstract_swapchain_impl() = default;
{}
u32 get_swap_image_count() const override u32 get_swap_image_count() const override
{ {
@ -1852,7 +1848,7 @@ public:
: native_swapchain_base(gpu, _present_queue, _graphics_queue, format) : native_swapchain_base(gpu, _present_queue, _graphics_queue, format)
{} {}
~swapchain_X11(){} ~swapchain_X11() = default;
bool init() override bool init() override
{ {
@ -2045,8 +2041,7 @@ public:
} }
} }
~swapchain_WSI() ~swapchain_WSI() = default;
{}
void create(display_handle_t&) override void create(display_handle_t&) override
{} {}
@ -2618,8 +2613,8 @@ public:
u32 m_current_pool_index = 0; u32 m_current_pool_index = 0;
public: public:
descriptor_pool() {} descriptor_pool() = default;
~descriptor_pool() {} ~descriptor_pool() = default;
void create(const vk::render_device &dev, VkDescriptorPoolSize *sizes, u32 size_descriptors_count, u32 max_sets, u8 subpool_count) void create(const vk::render_device &dev, VkDescriptorPoolSize *sizes, u32 size_descriptors_count, u32 max_sets, u8 subpool_count)
{ {
@ -2833,8 +2828,7 @@ public:
} }
} }
~graphics_pipeline_state() ~graphics_pipeline_state() = default;
{}
graphics_pipeline_state& operator = (const graphics_pipeline_state& other) graphics_pipeline_state& operator = (const graphics_pipeline_state& other)
{ {
@ -3028,11 +3022,8 @@ public:
std::vector<u32> m_compiled; std::vector<u32> m_compiled;
public: public:
shader() shader() = default;
{} ~shader() = default;
~shader()
{}
void create(::glsl::program_domain domain, const std::string& source) void create(::glsl::program_domain domain, const std::string& source)
{ {

View file

@ -54,8 +54,7 @@ namespace vk
renderpass_config.set_primitive_type(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP); renderpass_config.set_primitive_type(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP);
} }
~overlay_pass() ~overlay_pass() = default;
{}
void check_heap() void check_heap()
{ {

View file

@ -239,7 +239,7 @@ namespace vk
public: public:
text_writer() {} text_writer() = default;
~text_writer() ~text_writer()
{ {
if (initialized) if (initialized)

View file

@ -343,9 +343,7 @@ void VKVertexDecompilerThread::Task()
vk_prog->SetInputs(inputs); vk_prog->SetInputs(inputs);
} }
VKVertexProgram::VKVertexProgram() VKVertexProgram::VKVertexProgram() = default;
{
}
VKVertexProgram::~VKVertexProgram() VKVertexProgram::~VKVertexProgram()
{ {

View file

@ -83,8 +83,8 @@ namespace rsx
public: public:
buffered_section() {} buffered_section() = default;
~buffered_section() {} ~buffered_section() = default;
void reset(const address_range &memory_range) void reset(const address_range &memory_range)
{ {
@ -863,7 +863,7 @@ namespace rsx
class default_vertex_cache class default_vertex_cache
{ {
public: public:
virtual ~default_vertex_cache() {} virtual ~default_vertex_cache() = default;
virtual storage_type* find_vertex_range(uintptr_t /*local_addr*/, upload_format, u32 /*data_length*/) { return nullptr; } virtual storage_type* find_vertex_range(uintptr_t /*local_addr*/, upload_format, u32 /*data_length*/) { return nullptr; }
virtual void store_range(uintptr_t /*local_addr*/, upload_format, u32 /*data_length*/, u32 /*offset_in_heap*/) {} virtual void store_range(uintptr_t /*local_addr*/, upload_format, u32 /*data_length*/, u32 /*offset_in_heap*/) {}
virtual void purge() {} virtual void purge() {}

View file

@ -546,7 +546,7 @@ namespace rsx
memset(transform_constants.data(), 0, 512 * 4 * sizeof(u32)); memset(transform_constants.data(), 0, 512 * 4 * sizeof(u32));
} }
~rsx_state() { } ~rsx_state() = default;
void decode(u32 reg, u32 value); void decode(u32 reg, u32 value);

View file

@ -91,7 +91,7 @@ namespace rsx
address_range range{}; address_range range{};
gcm_framebuffer_info() {} gcm_framebuffer_info() = default;
gcm_framebuffer_info(const u32 address_, const u32 pitch_, bool is_depth_, const rsx::surface_color_format fmt_, const rsx::surface_depth_format dfmt_, const u16 w, const u16 h, const u8 bpp_) gcm_framebuffer_info(const u32 address_, const u32 pitch_, bool is_depth_, const rsx::surface_color_format fmt_, const rsx::surface_depth_format dfmt_, const u16 w, const u16 h, const u8 bpp_)
:address(address_), pitch(pitch_), is_depth_surface(is_depth_), color_format(fmt_), depth_format(dfmt_), width(w), height(h), bpp(bpp_) :address(address_), pitch(pitch_), is_depth_surface(is_depth_), color_format(fmt_), depth_format(dfmt_), width(w), height(h), bpp(bpp_)
@ -786,7 +786,7 @@ namespace rsx
public: public:
atomic_bitmask_t() { m_data.store(0); } atomic_bitmask_t() { m_data.store(0); }
~atomic_bitmask_t() {} ~atomic_bitmask_t() = default;
T load() const T load() const
{ {
@ -848,7 +848,7 @@ namespace rsx
} }
public: public:
simple_array() {} simple_array() = default;
simple_array(u32 initial_size, const Ty val = {}) simple_array(u32 initial_size, const Ty val = {})
{ {

View file

@ -123,7 +123,7 @@ struct register_vertex_data_info
u8 size = 0; u8 size = 0;
vertex_base_type type = vertex_base_type::f; vertex_base_type type = vertex_base_type::f;
register_vertex_data_info() {} register_vertex_data_info() = default;
std::array<u32, 4> data; std::array<u32, 4> data;
}; };