Merge branch 'main' of 116.62.144.93:atdunbg/Prism
This commit is contained in:
@ -5,6 +5,8 @@
|
|||||||
#ifndef BUFFER_H
|
#ifndef BUFFER_H
|
||||||
#define BUFFER_H
|
#define BUFFER_H
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include "Core.h"
|
#include "Core.h"
|
||||||
|
|
||||||
namespace Prism
|
namespace Prism
|
||||||
@ -36,7 +38,7 @@ namespace Prism
|
|||||||
Size = size;
|
Size = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Buffer Copy(void* data, uint32_t size)
|
static Buffer Copy(const void* data, const uint32_t size)
|
||||||
{
|
{
|
||||||
Buffer buffer;
|
Buffer buffer;
|
||||||
buffer.Allocate(size);
|
buffer.Allocate(size);
|
||||||
@ -56,7 +58,7 @@ namespace Prism
|
|||||||
memcpy(Data + offset, data, size);
|
memcpy(Data + offset, data, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
operator bool() const
|
explicit operator bool() const
|
||||||
{
|
{
|
||||||
return Data;
|
return Data;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user