diff options
| author | Dentomologist <dentomologist@gmail.com> | 2022-08-05 17:14:57 -0700 |
|---|---|---|
| committer | Dentomologist <dentomologist@gmail.com> | 2022-08-06 13:28:28 -0700 |
| commit | ff26f6435e9fbbfdaf9828e59521cd4c820ac0d6 (patch) | |
| tree | 69608abda59e4675d3202e62391f21d376d6cbd8 /Source | |
| parent | d48d317cfb65b81c0a479fedbf29e9ba26fca2bb (diff) | |
Use structured binding for pair values
dir_path is used by PanicAlertFormatT, which prior to PR 10209 used a
lambda. Before c++20, referring to structured bindings in lambda captures
was forbidden. The problem is now doubly fixed, so put the structured
binding back in.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.cpp b/Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.cpp index 83263ed04d..5e012e44db 100644 --- a/Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.cpp +++ b/Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.cpp @@ -178,11 +178,7 @@ void CEXIMemoryCard::SetupGciFolder(const Memcard::HeaderData& header_data) current_game_id = Common::swap32(reinterpret_cast<const u8*>(game_id.c_str())); } - // TODO(C++20): Use structured bindings when we can use C++20 and refer to structured bindings - // in lambda captures - const auto folder_path_pair = GetGCIFolderPath(m_card_slot, AllowMovieFolder::Yes); - const std::string& dir_path = folder_path_pair.first; - const bool migrate = folder_path_pair.second; + const auto [dir_path, migrate] = GetGCIFolderPath(m_card_slot, AllowMovieFolder::Yes); const File::FileInfo file_info(dir_path); if (!file_info.Exists()) |
