From 34274ec391b0cff053157c3b475838e4d11c1b2f Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Wed, 27 Jan 2021 22:46:30 +0300 Subject: [PATCH] Purge unused typeid() invocations --- Utilities/Config.cpp | 1 - Utilities/File.cpp | 3 +-- Utilities/Thread.cpp | 1 - rpcs3/Emu/CPU/CPUThread.cpp | 2 +- rpcs3/Emu/Cell/PPUModule.h | 5 ----- rpcs3/Emu/System.cpp | 1 - 6 files changed, 2 insertions(+), 11 deletions(-) diff --git a/Utilities/Config.cpp b/Utilities/Config.cpp index d37236b005..eee57fd928 100644 --- a/Utilities/Config.cpp +++ b/Utilities/Config.cpp @@ -4,7 +4,6 @@ #include "util/yaml.hpp" -#include #include LOG_CHANNEL(cfg_log, "CFG"); diff --git a/Utilities/File.cpp b/Utilities/File.cpp index ddbef7f8ee..e8fb333c09 100644 --- a/Utilities/File.cpp +++ b/Utilities/File.cpp @@ -7,7 +7,6 @@ #include #include #include -#include #include #include "util/asm.hpp" @@ -228,7 +227,7 @@ namespace fs stat_t file_base::stat() { - fmt::throw_exception("fs::file::stat() not supported for %s", typeid(*this).name()); + fmt::throw_exception("fs::file::stat() not supported."); } void file_base::sync() diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 61451b8cf0..e7cb893d2e 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -8,7 +8,6 @@ #include "Emu/RSX/RSXThread.h" #include "Thread.h" #include "Utilities/JIT.h" -#include #include #include diff --git a/rpcs3/Emu/CPU/CPUThread.cpp b/rpcs3/Emu/CPU/CPUThread.cpp index 504b0e57f4..01073d9216 100644 --- a/rpcs3/Emu/CPU/CPUThread.cpp +++ b/rpcs3/Emu/CPU/CPUThread.cpp @@ -856,7 +856,7 @@ std::vector> cpu_thread::dump_callstack_list() const std::string cpu_thread::dump_misc() const { - return fmt::format("Type: %s\n" "State: %s\n", typeid(*this).name(), state.load()); + return fmt::format("Type: %s\n" "State: %s\n", id_type() == 1 ? "PPU" : id_type() == 2 ? "SPU" : "CPU", state.load()); } bool cpu_thread::suspend_work::push(cpu_thread* _this) noexcept diff --git a/rpcs3/Emu/Cell/PPUModule.h b/rpcs3/Emu/Cell/PPUModule.h index b62fc9e258..6dec60458a 100644 --- a/rpcs3/Emu/Cell/PPUModule.h +++ b/rpcs3/Emu/Cell/PPUModule.h @@ -3,7 +3,6 @@ #include "PPUFunction.h" #include "PPUCallback.h" #include "ErrorCodes.h" -#include #include "Emu/Memory/vm_var.h" // Helper function @@ -41,7 +40,6 @@ struct ppu_static_function const char* name; u32 index; // Index for ppu_function_manager u32 flags; - const char* type; std::vector args; // Arg names const u32* export_addr; @@ -60,7 +58,6 @@ struct ppu_static_variable void(*init)(); // Variable initialization function u32 size; u32 align; - const char* type; u32 flags; u32 addr; const u32* export_addr; @@ -125,7 +122,6 @@ public: info.name = name; info.index = ppu_function_manager::register_function(func); info.flags = 0; - info.type = typeid(*Func).name(); registered::info = &info; @@ -152,7 +148,6 @@ public: info.init = [] {}; info.size = gvar::alloc_size; info.align = gvar::alloc_align; - info.type = typeid(*Var).name(); info.flags = 0; info.addr = 0; diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 301054af4b..240b306661 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -39,7 +39,6 @@ #include #include -#include #include #include #include