mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-13 09:27:48 +00:00
Remove memory allocations in some hot paths
This commit is contained in:
parent
72a469b967
commit
c7430e51e3
84 changed files with 501 additions and 458 deletions
|
@ -3,6 +3,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <iterator>
|
||||
|
||||
#include "common/concepts.h"
|
||||
#include "common/make_unique_for_overwrite.h"
|
||||
|
||||
namespace Common {
|
||||
|
@ -16,6 +19,12 @@ namespace Common {
|
|||
template <typename T>
|
||||
class ScratchBuffer {
|
||||
public:
|
||||
using iterator = T*;
|
||||
using const_iterator = const T*;
|
||||
using value_type = T;
|
||||
using element_type = T;
|
||||
using iterator_category = std::contiguous_iterator_tag;
|
||||
|
||||
ScratchBuffer() = default;
|
||||
|
||||
explicit ScratchBuffer(size_t initial_capacity)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue