Apply suggestions from code review

Co-authored-by: GPUCode <47210458+GPUCode@users.noreply.github.com>
This commit is contained in:
georgemoralis 2024-03-11 13:10:05 +02:00 committed by GitHub
parent eb1a632c64
commit b40fd50d64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 7 deletions

View File

@ -2,8 +2,8 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include <Zydis/Zydis.h>
#include <common/config.h>
#include <common/path_util.h>
#include "common/config.h"
#include "common/path_util.h"
#include "common/logging/log.h"
#include "common/string_util.h"
#include "core/aerolib/aerolib.h"

View File

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <common/string_util.h>
#include "common/string_util.h"
#include "common/io_file.h"
#include "common/logging/log.h"
#include "common/types.h"
@ -35,8 +35,7 @@ const SymbolRecord* SymbolsResolver::FindSymbol(const SymbolResolver& s) const {
}
void SymbolsResolver::DebugDump(const std::filesystem::path& file_name) {
Common::FS::IOFile f;
f.Open(file_name, Common::FS::FileAccessMode::Write, Common::FS::FileType::TextFile);
Common::FS::IOFile f{file_name, Common::FS::FileAccessMode::Write, Common::FS::FileType::TextFile};
for (const auto& symbol : m_symbols) {
const auto ids = Common::SplitString(symbol.name, '#');
std::string nidName = "";
@ -50,7 +49,6 @@ void SymbolsResolver::DebugDump(const std::filesystem::path& file_name) {
symbol.virtual_address, ids.at(0), nidName, ids.at(1), ids.at(2),
ids.at(3), ids.at(4), ids.at(5), ids.at(6)));
}
f.Close();
}
} // namespace Core::Loader

View File

@ -44,7 +44,7 @@ public:
static std::string GenerateName(const SymbolResolver& s);
static std::string SymbolTypeToS(SymbolType sym_type) {
static std::string_view SymbolTypeToS(SymbolType sym_type) {
switch (sym_type) {
case SymbolType::Unknown:
return "Unknown";