mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-22 05:45:46 +00:00
vfs_real: add simplified open file cache
This commit is contained in:
parent
729216e5d8
commit
87087b768b
2 changed files with 18 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <string_view>
|
||||
#include "common/intrusive_list.h"
|
||||
#include "core/file_sys/mode.h"
|
||||
|
@ -41,6 +42,7 @@ public:
|
|||
|
||||
private:
|
||||
using ReferenceListType = Common::IntrusiveListBaseTraits<FileReference>::ListType;
|
||||
std::map<std::string, std::weak_ptr<VfsFile>, std::less<>> cache;
|
||||
ReferenceListType open_references;
|
||||
ReferenceListType closed_references;
|
||||
size_t num_open_files{};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue