mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-23 17:00:57 +01:00
Address requested changes
This commit is contained in:
parent
136c563f76
commit
326403518d
2 changed files with 4 additions and 4 deletions
|
@ -6,11 +6,11 @@
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <boost/algorithm/string/case_conv.hpp>
|
|
||||||
|
|
||||||
#include "common/file_util.h"
|
#include "common/file_util.h"
|
||||||
#include "common/hex_util.h"
|
#include "common/hex_util.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
|
#include "common/string_util.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/file_sys/content_archive.h"
|
#include "core/file_sys/content_archive.h"
|
||||||
#include "core/file_sys/control_metadata.h"
|
#include "core/file_sys/control_metadata.h"
|
||||||
|
@ -50,14 +50,14 @@ std::string FormatTitleVersion(u32 version, TitleVersionFormat format) {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<VfsDirectory> FindSubdirectoryCaseless(const std::shared_ptr<VfsDirectory> dir,
|
std::shared_ptr<VfsDirectory> FindSubdirectoryCaseless(const std::shared_ptr<VfsDirectory> dir,
|
||||||
const std::string& name) {
|
std::string_view name) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
return dir->GetSubdirectory(name);
|
return dir->GetSubdirectory(name);
|
||||||
#else
|
#else
|
||||||
const auto subdirs = dir->GetSubdirectories();
|
const auto subdirs = dir->GetSubdirectories();
|
||||||
for (const auto& subdir : subdirs) {
|
for (const auto& subdir : subdirs) {
|
||||||
std::string dir_name = subdir->GetName();
|
std::string dir_name = subdir->GetName();
|
||||||
boost::algorithm::to_lower(dir_name);
|
dir_name = Common::ToLower(dir_name);
|
||||||
if (dir_name == name) {
|
if (dir_name == name) {
|
||||||
return subdir;
|
return subdir;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ std::string FormatTitleVersion(u32 version,
|
||||||
// Returns a directory with name matching name case-insensitive. Returns nullptr if directory
|
// Returns a directory with name matching name case-insensitive. Returns nullptr if directory
|
||||||
// doesn't have a directory with name.
|
// doesn't have a directory with name.
|
||||||
std::shared_ptr<VfsDirectory> FindSubdirectoryCaseless(const std::shared_ptr<VfsDirectory> dir,
|
std::shared_ptr<VfsDirectory> FindSubdirectoryCaseless(const std::shared_ptr<VfsDirectory> dir,
|
||||||
const std::string& name);
|
std::string_view name);
|
||||||
|
|
||||||
// A centralized class to manage patches to games.
|
// A centralized class to manage patches to games.
|
||||||
class PatchManager {
|
class PatchManager {
|
||||||
|
|
Loading…
Reference in a new issue