From 62242331d865a842687f463eb93c9a10fd505a00 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 22 Apr 2018 23:13:28 -0400 Subject: [PATCH 1/2] NandPaths: Remove unused header inclusions --- Source/Core/Common/NandPaths.cpp | 7 ++----- Source/Core/Common/NandPaths.h | 2 -- Source/Core/Core/HW/GCMemcard/GCMemcard.h | 1 + 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Source/Core/Common/NandPaths.cpp b/Source/Core/Common/NandPaths.cpp index ec43b38484..5f0bdc34f3 100644 --- a/Source/Core/Common/NandPaths.cpp +++ b/Source/Core/Common/NandPaths.cpp @@ -2,19 +2,16 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include "Common/NandPaths.h" + #include #include #include -#include #include #include "Common/CommonTypes.h" -#include "Common/File.h" #include "Common/FileUtil.h" -#include "Common/Logging/Log.h" -#include "Common/NandPaths.h" #include "Common/StringUtil.h" -#include "Common/Swap.h" namespace Common { diff --git a/Source/Core/Common/NandPaths.h b/Source/Core/Common/NandPaths.h index 6ef53a9912..1afa5e619b 100644 --- a/Source/Core/Common/NandPaths.h +++ b/Source/Core/Common/NandPaths.h @@ -5,8 +5,6 @@ #pragma once #include -#include -#include #include "Common/CommonTypes.h" diff --git a/Source/Core/Core/HW/GCMemcard/GCMemcard.h b/Source/Core/Core/HW/GCMemcard/GCMemcard.h index 54247316dc..d08bb76d7a 100644 --- a/Source/Core/Core/HW/GCMemcard/GCMemcard.h +++ b/Source/Core/Core/HW/GCMemcard/GCMemcard.h @@ -6,6 +6,7 @@ #include #include +#include #include "Common/CommonTypes.h" #include "Common/NandPaths.h" From c1c360d9b10a442223d9e09421966137ae53cce3 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 22 Apr 2018 23:14:23 -0400 Subject: [PATCH 2/2] NandPaths: Make function parameters consistent Also drops trailing underscores from said parameter names. --- Source/Core/Common/NandPaths.cpp | 16 ++++++++-------- Source/Core/Common/NandPaths.h | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Source/Core/Common/NandPaths.cpp b/Source/Core/Common/NandPaths.cpp index 5f0bdc34f3..b670be635d 100644 --- a/Source/Core/Common/NandPaths.cpp +++ b/Source/Core/Common/NandPaths.cpp @@ -28,10 +28,10 @@ std::string GetImportTitlePath(u64 title_id, FromWhichRoot from) static_cast(title_id)); } -std::string GetTicketFileName(u64 _titleID, FromWhichRoot from) +std::string GetTicketFileName(u64 title_id, FromWhichRoot from) { return StringFromFormat("%s/ticket/%08x/%08x.tik", RootUserPath(from).c_str(), - (u32)(_titleID >> 32), (u32)_titleID); + static_cast(title_id >> 32), static_cast(title_id)); } std::string GetTitlePath(u64 title_id, FromWhichRoot from) @@ -40,19 +40,19 @@ std::string GetTitlePath(u64 title_id, FromWhichRoot from) static_cast(title_id >> 32), static_cast(title_id)); } -std::string GetTitleDataPath(u64 _titleID, FromWhichRoot from) +std::string GetTitleDataPath(u64 title_id, FromWhichRoot from) { - return GetTitlePath(_titleID, from) + "data/"; + return GetTitlePath(title_id, from) + "data/"; } -std::string GetTitleContentPath(u64 _titleID, FromWhichRoot from) +std::string GetTitleContentPath(u64 title_id, FromWhichRoot from) { - return GetTitlePath(_titleID, from) + "content/"; + return GetTitlePath(title_id, from) + "content/"; } -std::string GetTMDFileName(u64 _titleID, FromWhichRoot from) +std::string GetTMDFileName(u64 title_id, FromWhichRoot from) { - return GetTitleContentPath(_titleID, from) + "title.tmd"; + return GetTitleContentPath(title_id, from) + "title.tmd"; } bool IsTitlePath(const std::string& path, FromWhichRoot from, u64* title_id) diff --git a/Source/Core/Common/NandPaths.h b/Source/Core/Common/NandPaths.h index 1afa5e619b..5a1dcffce4 100644 --- a/Source/Core/Common/NandPaths.h +++ b/Source/Core/Common/NandPaths.h @@ -21,11 +21,11 @@ std::string RootUserPath(FromWhichRoot from); // Returns /import/%08x/%08x. Intended for use by ES. std::string GetImportTitlePath(u64 title_id, FromWhichRoot from = FROM_SESSION_ROOT); -std::string GetTicketFileName(u64 _titleID, FromWhichRoot from); +std::string GetTicketFileName(u64 title_id, FromWhichRoot from); std::string GetTitlePath(u64 title_id, FromWhichRoot from); -std::string GetTitleDataPath(u64 _titleID, FromWhichRoot from); -std::string GetTitleContentPath(u64 _titleID, FromWhichRoot from); -std::string GetTMDFileName(u64 _titleID, FromWhichRoot from); +std::string GetTitleDataPath(u64 title_id, FromWhichRoot from); +std::string GetTitleContentPath(u64 title_id, FromWhichRoot from); +std::string GetTMDFileName(u64 title_id, FromWhichRoot from); // Returns whether a path is within an installed title's directory. bool IsTitlePath(const std::string& path, FromWhichRoot from, u64* title_id = nullptr);