mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 12:33:17 +01:00
Initialise fields of MemoryStream in header
This makes all the constructors use these defaulted values
This commit is contained in:
committed by
GitHub
parent
afbe1dda0f
commit
171d973e55
@@ -18,17 +18,6 @@
|
||||
#include "Memory.hpp"
|
||||
#include "MemoryStream.h"
|
||||
|
||||
MemoryStream::MemoryStream()
|
||||
{
|
||||
_access = MEMORY_ACCESS_READ |
|
||||
MEMORY_ACCESS_WRITE |
|
||||
MEMORY_ACCESS_OWNER;
|
||||
_dataCapacity = 0;
|
||||
_dataSize = 0;
|
||||
_data = nullptr;
|
||||
_position = nullptr;
|
||||
}
|
||||
|
||||
MemoryStream::MemoryStream(const MemoryStream ©)
|
||||
{
|
||||
_access = copy._access;
|
||||
@@ -44,11 +33,7 @@ MemoryStream::MemoryStream(const MemoryStream ©)
|
||||
|
||||
MemoryStream::MemoryStream(size_t capacity)
|
||||
{
|
||||
_access = MEMORY_ACCESS_READ |
|
||||
MEMORY_ACCESS_WRITE |
|
||||
MEMORY_ACCESS_OWNER;
|
||||
_dataCapacity = capacity;
|
||||
_dataSize = 0;
|
||||
_data = Memory::Allocate<void>(capacity);
|
||||
_position = _data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user