From 6c5ea068c95a6c1ac258ea4f1095feb6e2f2d4d6 Mon Sep 17 00:00:00 2001 From: scribam Date: Sat, 11 May 2019 10:14:56 +0200 Subject: [PATCH] Remove redundant semicolons Fix "-Wextra-semi" warnings --- Utilities/address_range.h | 4 ++-- rpcs3/Crypto/unedat.h | 2 +- rpcs3/Emu/Audio/AL/OpenALBackend.h | 4 ++-- rpcs3/Emu/Audio/ALSA/ALSABackend.h | 4 ++-- rpcs3/Emu/Audio/Null/NullAudioBackend.h | 16 ++++++++-------- rpcs3/Emu/Audio/Pulse/PulseBackend.h | 4 ++-- rpcs3/Emu/Cell/Modules/cellSync.h | 2 +- rpcs3/Emu/Io/PadHandler.h | 16 ++++++++-------- .../Emu/RSX/Common/FragmentProgramDecompiler.cpp | 2 +- rpcs3/Emu/RSX/Common/ProgramStateCache.h | 2 +- rpcs3/Emu/RSX/Common/surface_store.h | 2 +- rpcs3/Emu/RSX/Common/texture_cache_predictor.h | 4 ++-- rpcs3/Emu/RSX/GL/GLGSRender.cpp | 2 +- rpcs3/Emu/RSX/GSRender.h | 2 +- rpcs3/Emu/RSX/RSXThread.h | 10 +++++----- rpcs3/Emu/RSX/VK/VKGSRender.cpp | 4 ++-- rpcs3/Emu/RSX/VK/VKHelpers.h | 8 ++++---- rpcs3/Emu/RSX/rsx_cache.h | 8 ++++---- rpcs3/Emu/RSX/rsx_decode.h | 6 +++--- rpcs3/Emu/RSX/rsx_utils.h | 2 +- rpcs3/Loader/PUP.h | 2 +- rpcs3/rpcs3qt/emu_settings.h | 6 +++--- rpcs3/rpcs3qt/gui_settings.h | 4 ++-- rpcs3/rpcs3qt/trophy_notification_helper.h | 2 +- rpcs3/rpcs3qt/user_account.h | 6 +++--- 25 files changed, 62 insertions(+), 62 deletions(-) diff --git a/Utilities/address_range.h b/Utilities/address_range.h index 064e81bf59..5df2758d86 100644 --- a/Utilities/address_range.h +++ b/Utilities/address_range.h @@ -58,12 +58,12 @@ namespace utils return (start1 >= start2 && end1 <= end2); } - address_range(u32 _start, u32 _end) : start(_start), end(_end) {}; + address_range(u32 _start, u32 _end) : start(_start), end(_end) {} public: // Constructors address_range() = default; - address_range(const address_range &other) : start(other.start), end(other.end) {}; + address_range(const address_range &other) : start(other.start), end(other.end) {} static inline address_range start_length(u32 _start, u32 _length) { diff --git a/rpcs3/Crypto/unedat.h b/rpcs3/Crypto/unedat.h index 41107a155f..fb8559b5f0 100644 --- a/rpcs3/Crypto/unedat.h +++ b/rpcs3/Crypto/unedat.h @@ -95,7 +95,7 @@ public: bool trunc(u64 length) override { return true; - }; + } u64 read(void* buffer, u64 size) override { u64 bytesRead = ReadData(pos, (u8*)buffer, size); diff --git a/rpcs3/Emu/Audio/AL/OpenALBackend.h b/rpcs3/Emu/Audio/AL/OpenALBackend.h index f3c27e94ec..28ef25997e 100644 --- a/rpcs3/Emu/Audio/AL/OpenALBackend.h +++ b/rpcs3/Emu/Audio/AL/OpenALBackend.h @@ -24,10 +24,10 @@ public: OpenALBackend(); virtual ~OpenALBackend() override; - virtual const char* GetName() const override { return "OpenAL"; }; + virtual const char* GetName() const override { return "OpenAL"; } static const u32 capabilities = PLAY_PAUSE_FLUSH | IS_PLAYING | GET_NUM_ENQUEUED_SAMPLES | SET_FREQUENCY_RATIO; - virtual u32 GetCapabilities() const override { return capabilities; }; + virtual u32 GetCapabilities() const override { return capabilities; } virtual void Open(u32 num_buffers) override; virtual void Close() override; diff --git a/rpcs3/Emu/Audio/ALSA/ALSABackend.h b/rpcs3/Emu/Audio/ALSA/ALSABackend.h index 078be868cd..db66b074ef 100644 --- a/rpcs3/Emu/Audio/ALSA/ALSABackend.h +++ b/rpcs3/Emu/Audio/ALSA/ALSABackend.h @@ -16,10 +16,10 @@ public: ALSABackend(); virtual ~ALSABackend() override; - virtual const char* GetName() const override { return "ALSA"; }; + virtual const char* GetName() const override { return "ALSA"; } static const u32 capabilities = 0; - virtual u32 GetCapabilities() const override { return capabilities; }; + virtual u32 GetCapabilities() const override { return capabilities; } virtual void Open(u32) override; virtual void Close() override; diff --git a/rpcs3/Emu/Audio/Null/NullAudioBackend.h b/rpcs3/Emu/Audio/Null/NullAudioBackend.h index 3a097f7f25..ad2f913a32 100644 --- a/rpcs3/Emu/Audio/Null/NullAudioBackend.h +++ b/rpcs3/Emu/Audio/Null/NullAudioBackend.h @@ -8,17 +8,17 @@ public: NullAudioBackend() {} virtual ~NullAudioBackend() {} - virtual const char* GetName() const override { return "Null"; } + virtual const char* GetName() const override { return "Null"; } static const u32 capabilities = PLAY_PAUSE_FLUSH; - virtual u32 GetCapabilities() const override { return capabilities; }; + virtual u32 GetCapabilities() const override { return capabilities; } - virtual void Open(u32) override {}; - virtual void Close() override {}; + virtual void Open(u32) override {} + virtual void Close() override {} - virtual void Play() override {}; - virtual void Pause() override {}; + virtual void Play() override {} + virtual void Pause() override {} - virtual bool AddData(const void*, u32) override { return true; }; - virtual void Flush() override {}; + virtual bool AddData(const void*, u32) override { return true; } + virtual void Flush() override {} }; diff --git a/rpcs3/Emu/Audio/Pulse/PulseBackend.h b/rpcs3/Emu/Audio/Pulse/PulseBackend.h index 27c324ddc4..d61033b950 100644 --- a/rpcs3/Emu/Audio/Pulse/PulseBackend.h +++ b/rpcs3/Emu/Audio/Pulse/PulseBackend.h @@ -10,10 +10,10 @@ public: PulseBackend(); virtual ~PulseBackend() override; - virtual const char* GetName() const override { return "Pulse"; }; + virtual const char* GetName() const override { return "Pulse"; } static const u32 capabilities = 0; - virtual u32 GetCapabilities() const override { return capabilities; }; + virtual u32 GetCapabilities() const override { return capabilities; } virtual void Open(u32) override; virtual void Close() override; diff --git a/rpcs3/Emu/Cell/Modules/cellSync.h b/rpcs3/Emu/Cell/Modules/cellSync.h index a33c01a88d..2e8de41b96 100644 --- a/rpcs3/Emu/Cell/Modules/cellSync.h +++ b/rpcs3/Emu/Cell/Modules/cellSync.h @@ -89,7 +89,7 @@ struct CellSyncBarrier } return true; - }; + } static inline bool try_wait(ctrl_t& ctrl) { diff --git a/rpcs3/Emu/Io/PadHandler.h b/rpcs3/Emu/Io/PadHandler.h index 0a9a1ed3b1..414f2b142f 100644 --- a/rpcs3/Emu/Io/PadHandler.h +++ b/rpcs3/Emu/Io/PadHandler.h @@ -259,7 +259,7 @@ struct Pad struct cfg_player final : cfg::node { pad_handler def_handler = pad_handler::null; - cfg_player(node* owner, const std::string& name, pad_handler type) : cfg::node(owner, name), def_handler(type) {}; + cfg_player(node* owner, const std::string& name, pad_handler type) : cfg::node(owner, name), def_handler(type) {} cfg::_enum handler{ this, "Handler", def_handler }; cfg::string device{ this, "Device", handler.to_string() }; @@ -288,12 +288,12 @@ struct cfg_input final : cfg::node } return false; - }; + } void save() { fs::file(cfg_name, fs::rewrite).write(to_string()); - }; + } }; extern cfg_input g_cfg_input; @@ -463,13 +463,13 @@ public: static std::string get_config_dir(pad_handler type); static std::string get_config_filename(int i); - virtual bool Init() { return true; }; + virtual bool Init() { return true; } PadHandlerBase(pad_handler type = pad_handler::null); virtual ~PadHandlerBase() = default; //Sets window to config the controller(optional) - virtual void GetNextButtonPress(const std::string& /*padId*/, const std::function& /*callback*/, const std::function& /*fail_callback*/, bool /*get_blacklist*/ = false, const std::vector& /*buttons*/ = {}) {}; - virtual void TestVibration(const std::string& /*padId*/, u32 /*largeMotor*/, u32 /*smallMotor*/) {}; - virtual void SetLED(const std::string& /*padId*/, s32 /*r*/, s32 /*g*/, s32 /*b*/){}; + virtual void GetNextButtonPress(const std::string& /*padId*/, const std::function& /*callback*/, const std::function& /*fail_callback*/, bool /*get_blacklist*/ = false, const std::vector& /*buttons*/ = {}) {} + virtual void TestVibration(const std::string& /*padId*/, u32 /*largeMotor*/, u32 /*smallMotor*/) {} + virtual void SetLED(const std::string& /*padId*/, s32 /*r*/, s32 /*g*/, s32 /*b*/) {} //Return list of devices for that handler virtual std::vector ListDevices() = 0; //Callback called during pad_thread::ThreadFunc @@ -479,7 +479,7 @@ public: virtual void init_config(pad_config* /*cfg*/, const std::string& /*name*/) = 0; private: - virtual void TranslateButtonPress(u64 /*keyCode*/, bool& /*pressed*/, u16& /*val*/, bool /*ignore_threshold*/ = false) {}; + virtual void TranslateButtonPress(u64 /*keyCode*/, bool& /*pressed*/, u16& /*val*/, bool /*ignore_threshold*/ = false) {} protected: void init_configs(); diff --git a/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp b/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp index 2e2f7d303c..8433ca6a98 100644 --- a/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp +++ b/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp @@ -979,7 +979,7 @@ bool FragmentProgramDecompiler::handle_tex_srb(u32 opcode) case RSX_FP_OPCODE_UPB: SetDst("(unpackUnorm4x8(floatBitsToUint($0.x)))"); return true; } return false; -}; +} std::string FragmentProgramDecompiler::Decompile() { diff --git a/rpcs3/Emu/RSX/Common/ProgramStateCache.h b/rpcs3/Emu/RSX/Common/ProgramStateCache.h index f092f76709..fc6785a28c 100644 --- a/rpcs3/Emu/RSX/Common/ProgramStateCache.h +++ b/rpcs3/Emu/RSX/Common/ProgramStateCache.h @@ -317,7 +317,7 @@ public: { free(pair.first.addr); } - }; + } const vertex_program_type& get_transform_program(const RSXVertexProgram& rsx_vp) const { diff --git a/rpcs3/Emu/RSX/Common/surface_store.h b/rpcs3/Emu/RSX/Common/surface_store.h index 5eea30072f..d7e92ea768 100644 --- a/rpcs3/Emu/RSX/Common/surface_store.h +++ b/rpcs3/Emu/RSX/Common/surface_store.h @@ -266,7 +266,7 @@ namespace rsx return 1; default: return 2; - }; + } } public: diff --git a/rpcs3/Emu/RSX/Common/texture_cache_predictor.h b/rpcs3/Emu/RSX/Common/texture_cache_predictor.h index a55f757cda..5cc7bb29e5 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache_predictor.h +++ b/rpcs3/Emu/RSX/Common/texture_cache_predictor.h @@ -342,7 +342,7 @@ namespace rsx // Constructors texture_cache_predictor(texture_cache_type* tex_cache) - : m_tex_cache(tex_cache){}; + : m_tex_cache(tex_cache) {} ~texture_cache_predictor() = default; // Trait wrappers @@ -413,4 +413,4 @@ namespace std return result; } }; -}; // namespace std \ No newline at end of file +} // namespace std \ No newline at end of file diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.cpp b/rpcs3/Emu/RSX/GL/GLGSRender.cpp index e88eb47e26..b80d5c9a56 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.cpp +++ b/rpcs3/Emu/RSX/GL/GLGSRender.cpp @@ -57,7 +57,7 @@ namespace case rsx::comparison_function::greater_or_equal: return GL_GEQUAL; case rsx::comparison_function::always: return GL_ALWAYS; } - fmt::throw_exception("Unsupported comparison op 0x%X" HERE, (u32)op);; + fmt::throw_exception("Unsupported comparison op 0x%X" HERE, (u32)op); } GLenum stencil_op(rsx::stencil_op op) diff --git a/rpcs3/Emu/RSX/GSRender.h b/rpcs3/Emu/RSX/GSRender.h index f4c34a0787..8d0c52c4a0 100644 --- a/rpcs3/Emu/RSX/GSRender.h +++ b/rpcs3/Emu/RSX/GSRender.h @@ -174,5 +174,5 @@ public: void flip(int buffer, bool emu_flip = false) override; - GSFrameBase* get_frame() { return m_frame; }; + GSFrameBase* get_frame() { return m_frame; } }; diff --git a/rpcs3/Emu/RSX/RSXThread.h b/rpcs3/Emu/RSX/RSXThread.h index 09b21343d8..fa6b772143 100644 --- a/rpcs3/Emu/RSX/RSXThread.h +++ b/rpcs3/Emu/RSX/RSXThread.h @@ -760,8 +760,8 @@ namespace rsx * TODO: It's more efficient to combine multiple call of this function into one. */ virtual std::array, 4> copy_render_targets_to_memory() { - return std::array, 4>(); - }; + return std::array, 4>(); + } /** * Copy depth and stencil content to buffers. @@ -769,11 +769,11 @@ namespace rsx */ virtual std::array, 2> copy_depth_stencil_buffer_to_memory() { return std::array, 2>(); - }; + } - virtual std::pair get_programs() const { return std::make_pair("", ""); }; + virtual std::pair get_programs() const { return std::make_pair("", ""); } - virtual bool scaled_image_from_memory(blit_src_info& /*src_info*/, blit_dst_info& /*dst_info*/, bool /*interpolate*/){ return false; } + virtual bool scaled_image_from_memory(blit_src_info& /*src_info*/, blit_dst_info& /*dst_info*/, bool /*interpolate*/) { return false; } public: void reset(); diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.cpp b/rpcs3/Emu/RSX/VK/VKGSRender.cpp index b87bcd5204..a2d2149395 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.cpp +++ b/rpcs3/Emu/RSX/VK/VKGSRender.cpp @@ -263,7 +263,7 @@ namespace vk default: fmt::throw_exception("Unknown blend factor 0x%x" HERE, (u32)factor); } - }; + } VkBlendOp get_blend_op(rsx::blend_equation op) { @@ -2162,7 +2162,7 @@ void VKGSRender::clear_surface(u32 mask) default: use_fast_clear = (colormask == (0x10 | 0x20 | 0x40 | 0x80)); break; - }; + } if (!ignore_clear) { diff --git a/rpcs3/Emu/RSX/VK/VKHelpers.h b/rpcs3/Emu/RSX/VK/VKHelpers.h index fdd0ec5f2e..a3d114e4c3 100644 --- a/rpcs3/Emu/RSX/VK/VKHelpers.h +++ b/rpcs3/Emu/RSX/VK/VKHelpers.h @@ -247,7 +247,7 @@ namespace vk vmaCreateAllocator(&allocatorInfo, &m_allocator); } - ~mem_allocator_vma() {}; + ~mem_allocator_vma() {} void destroy() override { @@ -314,10 +314,10 @@ namespace vk class mem_allocator_vk : public mem_allocator_base { public: - mem_allocator_vk(VkDevice dev, VkPhysicalDevice pdev) : mem_allocator_base(dev, pdev) {}; - ~mem_allocator_vk() {}; + mem_allocator_vk(VkDevice dev, VkPhysicalDevice pdev) : mem_allocator_base(dev, pdev) {} + ~mem_allocator_vk() {} - void destroy() override {}; + void destroy() override {} mem_handle_t alloc(u64 block_sz, u64 /*alignment*/, uint32_t memory_type_index) override { diff --git a/rpcs3/Emu/RSX/rsx_cache.h b/rpcs3/Emu/RSX/rsx_cache.h index 92aa738eb1..3c03017262 100644 --- a/rpcs3/Emu/RSX/rsx_cache.h +++ b/rpcs3/Emu/RSX/rsx_cache.h @@ -83,8 +83,8 @@ namespace rsx public: - buffered_section() {}; - ~buffered_section() {}; + buffered_section() {} + ~buffered_section() {} void reset(const address_range &memory_range) { @@ -489,7 +489,7 @@ namespace rsx } virtual void refresh() - {}; + {} virtual void close() { @@ -863,7 +863,7 @@ namespace rsx class default_vertex_cache { public: - virtual ~default_vertex_cache() {}; + virtual ~default_vertex_cache() {} 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 purge() {} diff --git a/rpcs3/Emu/RSX/rsx_decode.h b/rpcs3/Emu/RSX/rsx_decode.h index 11782aacd3..2f9355093b 100644 --- a/rpcs3/Emu/RSX/rsx_decode.h +++ b/rpcs3/Emu/RSX/rsx_decode.h @@ -4209,7 +4209,7 @@ struct registers_decoder { struct decoded_type { - decoded_type(u32) {}; + decoded_type(u32) {} }; static std::string dump(u32 &&) @@ -4223,7 +4223,7 @@ struct registers_decoder { struct decoded_type { - decoded_type(u32) {}; + decoded_type(u32) {} }; static std::string dump(u32 &&) @@ -4237,7 +4237,7 @@ struct registers_decoder { struct decoded_type { - decoded_type(u32) {}; + decoded_type(u32) {} }; static std::string dump(u32 &&) diff --git a/rpcs3/Emu/RSX/rsx_utils.h b/rpcs3/Emu/RSX/rsx_utils.h index 2df2fdb843..e1198a22a3 100644 --- a/rpcs3/Emu/RSX/rsx_utils.h +++ b/rpcs3/Emu/RSX/rsx_utils.h @@ -746,7 +746,7 @@ namespace rsx atomic_t m_data; public: - atomic_bitmask_t() { m_data.store(0); }; + atomic_bitmask_t() { m_data.store(0); } ~atomic_bitmask_t() {} T load() const diff --git a/rpcs3/Loader/PUP.h b/rpcs3/Loader/PUP.h index 246ddb0e95..2f70e4f6ea 100644 --- a/rpcs3/Loader/PUP.h +++ b/rpcs3/Loader/PUP.h @@ -41,7 +41,7 @@ class pup_object public: pup_object(const fs::file& file); - explicit operator bool() const { return isValid; }; + explicit operator bool() const { return isValid; } fs::file get_file(u64 entry_id); }; diff --git a/rpcs3/rpcs3qt/emu_settings.h b/rpcs3/rpcs3qt/emu_settings.h index 6565d55064..b7b5e1d2d1 100644 --- a/rpcs3/rpcs3qt/emu_settings.h +++ b/rpcs3/rpcs3qt/emu_settings.h @@ -153,10 +153,10 @@ public: bool supported = true; bool has_adapters = true; - Render_Info() {}; - Render_Info(const QString& name) : name(name), has_adapters(false) {}; + Render_Info() {} + Render_Info(const QString& name) : name(name), has_adapters(false) {} Render_Info(const QString& name, const QStringList& adapters, bool supported, SettingsType type) - : name(name), adapters(adapters), supported(supported), type(type) {}; + : name(name), adapters(adapters), supported(supported), type(type) {} }; struct Render_Creator diff --git a/rpcs3/rpcs3qt/gui_settings.h b/rpcs3/rpcs3qt/gui_settings.h index 6c795fdca5..649ccdc6d4 100644 --- a/rpcs3/rpcs3qt/gui_settings.h +++ b/rpcs3/rpcs3qt/gui_settings.h @@ -19,14 +19,14 @@ struct gui_save key = ""; name = ""; def = QVariant(); - }; + } gui_save(const QString& k, const QString& n, const QVariant& d) { key = k; name = n; def = d; - }; + } }; typedef std::map q_from_char; diff --git a/rpcs3/rpcs3qt/trophy_notification_helper.h b/rpcs3/rpcs3qt/trophy_notification_helper.h index 4a585a4ffa..ce73167a9e 100644 --- a/rpcs3/rpcs3qt/trophy_notification_helper.h +++ b/rpcs3/rpcs3qt/trophy_notification_helper.h @@ -9,7 +9,7 @@ class trophy_notification_helper : public TrophyNotificationBase { public: - trophy_notification_helper(QWindow* game_window) : m_game_window(game_window) { }; + trophy_notification_helper(QWindow* game_window) : m_game_window(game_window) { } s32 ShowTrophyNotification(const SceNpTrophyDetails& trophy, const std::vector& trophy_icon_buffer) override; private: QWindow* m_game_window; diff --git a/rpcs3/rpcs3qt/user_account.h b/rpcs3/rpcs3qt/user_account.h index 4f6de3a0cc..20c4473b01 100644 --- a/rpcs3/rpcs3qt/user_account.h +++ b/rpcs3/rpcs3qt/user_account.h @@ -13,9 +13,9 @@ class UserAccount public: explicit UserAccount(const std::string& user_id = "00000001"); - std::string GetUserId() { return m_user_id; }; - std::string GetUserDir() { return m_user_dir; }; - std::string GetUsername() { return m_username; }; + std::string GetUserId() { return m_user_id; } + std::string GetUserDir() { return m_user_dir; } + std::string GetUsername() { return m_username; } ~UserAccount(); private: