mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-14 14:21:39 +00:00
StreamBuffer: Make factory function return a std::unique_ptr
This commit is contained in:
parent
ec71452706
commit
d20ba76ab3
5 changed files with 22 additions and 20 deletions
|
@ -2,6 +2,7 @@
|
|||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "Common/Common.h"
|
||||
|
@ -28,7 +29,7 @@ static const u32 UBO_LENGTH = 32*1024*1024;
|
|||
u32 ProgramShaderCache::s_ubo_buffer_size;
|
||||
s32 ProgramShaderCache::s_ubo_align;
|
||||
|
||||
static StreamBuffer *s_buffer;
|
||||
static std::unique_ptr<StreamBuffer> s_buffer;
|
||||
static int num_failures = 0;
|
||||
|
||||
static LinearDiskCache<SHADERUID, u8> g_program_disk_cache;
|
||||
|
@ -505,8 +506,7 @@ void ProgramShaderCache::Shutdown()
|
|||
pixel_uid_checker.Invalidate();
|
||||
vertex_uid_checker.Invalidate();
|
||||
|
||||
delete s_buffer;
|
||||
s_buffer = nullptr;
|
||||
s_buffer.reset();
|
||||
}
|
||||
|
||||
void ProgramShaderCache::CreateHeader()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue