mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-11-14 15:57:08 +01:00
Specialize the buffer creation functions.
This commit is contained in:
1 parent
c2ac1f3fd8
commit
ad55025bc8
3 files changed
+64
-1
No files matched your search
@@ -7,6 +7,9 @@
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
namespace SqMod {
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
extern Object CreateBufferWrapperMove(Buffer && b);
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void Core::EmitCustomEvent(Int32 group, Int32 header, Object & payload)
|
||||
{
|
||||
@@ -1066,7 +1069,7 @@ void Core::EmitClientScriptData(Int32 player_id, const uint8_t * data, size_t si
|
||||
// Replicate the data to the allocated buffer
|
||||
b.Write(0, reinterpret_cast< Buffer::ConstPtr >(data), size);
|
||||
// Wrap the buffer into a script object
|
||||
const Object o = MakeObject(m_VM, BufferWrapper(std::move(b)));
|
||||
const Object o = CreateBufferWrapperMove(std::move(b));
|
||||
// Wrap the buffer into a script object
|
||||
if (o.IsNull())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user