mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-26 13:49:21 +00:00
Use iterator
This commit is contained in:
parent
32511cc623
commit
22d173291f
@ -27,8 +27,9 @@ void FileSupport::UnreserveFile()
|
||||
|
||||
bool FileSupport::GetIdsForReservedFile(const Filepath& path, int& id, int& unit)
|
||||
{
|
||||
if (reserved_files.find(path.GetPath()) != reserved_files.end()) {
|
||||
const id_set ids = reserved_files[path.GetPath()];
|
||||
const auto& it = reserved_files.find(path.GetPath());
|
||||
if (it != reserved_files.end()) {
|
||||
const id_set ids = it->second;
|
||||
id = ids.first;
|
||||
unit = ids.second;
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user