mirror of
https://github.com/akuker/RASCSI.git
synced 2025-02-18 01:31:02 +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)
|
bool FileSupport::GetIdsForReservedFile(const Filepath& path, int& id, int& unit)
|
||||||
{
|
{
|
||||||
if (reserved_files.find(path.GetPath()) != reserved_files.end()) {
|
const auto& it = reserved_files.find(path.GetPath());
|
||||||
const id_set ids = reserved_files[path.GetPath()];
|
if (it != reserved_files.end()) {
|
||||||
|
const id_set ids = it->second;
|
||||||
id = ids.first;
|
id = ids.first;
|
||||||
unit = ids.second;
|
unit = ids.second;
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user