mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 11:48:36 +12:00
Fix various explicitness, laziness, hard codes
This commit is contained in:
parent
5524cd1e75
commit
c69691f19b
6 changed files with 26 additions and 24 deletions
|
@ -1603,15 +1603,14 @@ bool fs::remove_all(const std::string& path, bool remove_root)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (entry.is_directory == false)
|
||||
if (!entry.is_directory)
|
||||
{
|
||||
if (!remove_file(path_append(path, entry.name)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (entry.is_directory == true)
|
||||
else
|
||||
{
|
||||
if (!remove_all(path_append(path, entry.name)))
|
||||
{
|
||||
|
@ -1651,12 +1650,11 @@ u64 fs::get_dir_size(const std::string& path, u64 rounding_alignment)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (entry.is_directory == false)
|
||||
if (!entry.is_directory)
|
||||
{
|
||||
result += ::align(entry.size, rounding_alignment);
|
||||
}
|
||||
|
||||
if (entry.is_directory == true)
|
||||
else
|
||||
{
|
||||
const u64 size = get_dir_size(path_append(path, entry.name), rounding_alignment);
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ namespace fmt
|
|||
template <typename T>
|
||||
std::string merge(const T& source, const std::string& separator)
|
||||
{
|
||||
if (!source.size())
|
||||
if (source.empty())
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
|
|
@ -154,7 +154,7 @@ namespace utils
|
|||
#else
|
||||
while ((m_file = ::shm_open("/rpcs3-mem1", O_RDWR | O_CREAT | O_EXCL, S_IWUSR | S_IRUSR)) == -1)
|
||||
{
|
||||
if (m_file == -1 && errno == EMFILE)
|
||||
if (errno == EMFILE)
|
||||
{
|
||||
fmt::throw_exception("Too many open files. Raise the limit and try again.");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue