Merge pull request #488 from celeron55/fix_lua_variant_setbuffer
Fix Variant:SetBuffer and VariantMap:SetBuffer in Lua
This commit is contained in:
Коммит
c1b116ee50
|
@ -261,7 +261,7 @@ static void VariantSetString(Variant* variant, const String value)
|
|||
|
||||
static void VariantSetBuffer(Variant* variant, const VectorBuffer& value)
|
||||
{
|
||||
*variant = value.GetData();
|
||||
variant->SetBuffer(value.GetData(), value.GetBuffer().Size());
|
||||
}
|
||||
|
||||
static void VariantSetResourceRef(Variant* variant, const ResourceRef& value)
|
||||
|
@ -361,7 +361,7 @@ static void VariantMapSetString(VariantMap* vmap, const String& key, const Strin
|
|||
|
||||
static void VariantMapSetBuffer(VariantMap* vmap, const String& key, const VectorBuffer& value)
|
||||
{
|
||||
(*vmap)[StringHash(key)] = value.GetData();
|
||||
(*vmap)[StringHash(key)].SetBuffer(value.GetData(), value.GetBuffer().Size());
|
||||
}
|
||||
|
||||
static void VariantMapSetResourceRef(VariantMap* vmap, const String& key, const ResourceRef& value)
|
||||
|
|
Загрузка…
Ссылка в новой задаче