mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 06:55:09 +00:00
Implement FN (lambda shortener)
Useful for some higher order functions. Allows to make short lambdas even shorter.
This commit is contained in:
parent
5c6f5a1610
commit
4b787b22c8
12 changed files with 80 additions and 72 deletions
|
|
@ -13,13 +13,13 @@ namespace rpcs3::cache
|
|||
std::string get_ppu_cache()
|
||||
{
|
||||
auto& _main = g_fxo->get<ppu_module>();
|
||||
|
||||
|
||||
if (!g_fxo->is_init<ppu_module>() || _main.cache.empty())
|
||||
{
|
||||
ppu_log.error("PPU Cache location not initialized.");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
return _main.cache;
|
||||
}
|
||||
|
||||
|
|
@ -75,10 +75,7 @@ namespace rpcs3::cache
|
|||
cache_dir.close();
|
||||
|
||||
// sort oldest first
|
||||
std::sort(file_list.begin(), file_list.end(), [](auto left, auto right)
|
||||
{
|
||||
return left.mtime < right.mtime;
|
||||
});
|
||||
std::sort(file_list.begin(), file_list.end(), FN(x.mtime < y.mtime));
|
||||
|
||||
// keep removing until cache is empty or enough bytes have been cleared
|
||||
// cache is cleared down to 80% of limit to increase interval between clears
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue