mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Fix all uninitialized variable warnings (C26495)
This commit is contained in:
@ -23,7 +23,7 @@ using UnderlyingType = typename std::enable_if_t<std::is_enum<T>{}, std::underly
|
||||
|
||||
struct Location
|
||||
{
|
||||
System system;
|
||||
System system{};
|
||||
std::string section;
|
||||
std::string key;
|
||||
|
||||
|
@ -85,11 +85,11 @@ enum
|
||||
|
||||
namespace File
|
||||
{
|
||||
// FileSystem tree node/
|
||||
// FileSystem tree node
|
||||
struct FSTEntry
|
||||
{
|
||||
bool isDirectory;
|
||||
u64 size; // File length, or for directories, recursive count of children
|
||||
bool isDirectory = false;
|
||||
u64 size = 0; // File length, or for directories, recursive count of children
|
||||
std::string physicalName; // Name on disk
|
||||
std::string virtualName; // Name in FST names table
|
||||
std::vector<FSTEntry> children;
|
||||
|
@ -78,7 +78,7 @@ public:
|
||||
bool empty() const noexcept { return size() == 0; }
|
||||
|
||||
private:
|
||||
std::array<T, N> storage;
|
||||
std::array<T, N> storage{};
|
||||
int head = 0;
|
||||
int tail = 0;
|
||||
// Sacrifice 4 bytes for a simpler implementation. may optimize away in the future.
|
||||
|
@ -59,9 +59,9 @@ public:
|
||||
}
|
||||
|
||||
template <typename T, std::size_t N>
|
||||
bool ReadArray(std::array<T, N>& elements, size_t* num_read = nullptr)
|
||||
bool ReadArray(std::array<T, N>* elements, size_t* num_read = nullptr)
|
||||
{
|
||||
return ReadArray(elements.data(), elements.size(), num_read);
|
||||
return ReadArray(elements->data(), elements->size(), num_read);
|
||||
}
|
||||
|
||||
template <typename T, std::size_t N>
|
||||
|
@ -153,7 +153,7 @@ private:
|
||||
std::min(Common::scm_rev_git_str.size(), sizeof(ver)));
|
||||
}
|
||||
|
||||
u32 id;
|
||||
u32 id = 0;
|
||||
const u16 key_t_size = sizeof(K);
|
||||
const u16 value_t_size = sizeof(V);
|
||||
char ver[40] = {};
|
||||
@ -161,5 +161,5 @@ private:
|
||||
} m_header;
|
||||
|
||||
File::IOFile m_file;
|
||||
u32 m_num_entries;
|
||||
u32 m_num_entries = 0;
|
||||
};
|
||||
|
@ -14,5 +14,5 @@ public:
|
||||
void Log(Common::Log::LOG_LEVELS level, const char* text) override;
|
||||
|
||||
private:
|
||||
bool m_use_color;
|
||||
bool m_use_color = false;
|
||||
};
|
||||
|
@ -98,7 +98,7 @@ private:
|
||||
delete next_ptr;
|
||||
}
|
||||
|
||||
T current;
|
||||
T current{};
|
||||
std::atomic<ElementPtr*> next;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user