mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 13:01:27 +12:00
Fix some -Weffc++ warnings (part 1)
This commit is contained in:
parent
deacf05769
commit
2212a131ef
24 changed files with 162 additions and 56 deletions
|
@ -95,7 +95,7 @@ namespace fs
|
|||
// Directory entry (TODO)
|
||||
struct dir_entry : stat_t
|
||||
{
|
||||
std::string name;
|
||||
std::string name{};
|
||||
|
||||
dir_entry()
|
||||
: stat_t{}
|
||||
|
@ -198,7 +198,7 @@ namespace fs
|
|||
|
||||
class file final
|
||||
{
|
||||
std::unique_ptr<file_base> m_file;
|
||||
std::unique_ptr<file_base> m_file{};
|
||||
|
||||
bool strict_read_check(u64 size, u64 type_size) const;
|
||||
|
||||
|
@ -501,7 +501,7 @@ namespace fs
|
|||
|
||||
class dir final
|
||||
{
|
||||
std::unique_ptr<dir_base> m_dir;
|
||||
std::unique_ptr<dir_base> m_dir{};
|
||||
|
||||
public:
|
||||
dir() = default;
|
||||
|
@ -562,7 +562,7 @@ namespace fs
|
|||
class iterator
|
||||
{
|
||||
const dir* m_parent;
|
||||
dir_entry m_entry;
|
||||
dir_entry m_entry{};
|
||||
|
||||
public:
|
||||
enum class mode
|
||||
|
@ -590,6 +590,14 @@ namespace fs
|
|||
}
|
||||
}
|
||||
|
||||
iterator(const iterator&) = default;
|
||||
|
||||
iterator(iterator&&) = default;
|
||||
|
||||
iterator& operator=(const iterator&) = default;
|
||||
|
||||
iterator& operator=(iterator&&) = default;
|
||||
|
||||
dir_entry& operator *()
|
||||
{
|
||||
return m_entry;
|
||||
|
@ -627,7 +635,7 @@ namespace fs
|
|||
// Unique pending file creation destined to be renamed to the destination file
|
||||
struct pending_file
|
||||
{
|
||||
fs::file file;
|
||||
fs::file file{};
|
||||
|
||||
// This is meant to modify files atomically, overwriting is likely
|
||||
bool commit(bool overwrite = true);
|
||||
|
@ -636,8 +644,8 @@ namespace fs
|
|||
~pending_file();
|
||||
|
||||
private:
|
||||
std::string m_path; // Pending file path
|
||||
std::string m_dest; // Destination file path
|
||||
std::string m_path{}; // Pending file path
|
||||
std::string m_dest{}; // Destination file path
|
||||
};
|
||||
|
||||
// Get real path for comparisons (TODO: investigate std::filesystem::path::compare implementation)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue