mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
[Android] Fixed compilation error while using APP_PLATFORM >= 22. (#1012)
* [Android] Fixed compilation error while using APP_PLATFORM >= 22. * Don't use deprecated createUint8TypedArray.
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "v8.h"
|
||||
|
||||
#include <string>
|
||||
#include <string.h> // Resolves that memset, memcpy aren't found while APP_PLATFORM >= 22 on Android
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
#include <functional>
|
||||
|
||||
@@ -1762,7 +1762,7 @@ bool Data_to_seval(const cocos2d::Data& v, se::Value* ret)
|
||||
{
|
||||
assert(ret != nullptr);
|
||||
assert(!v.isNull());
|
||||
se::HandleObject obj(se::Object::createUint8TypedArray(v.getBytes(), v.getSize()));
|
||||
se::HandleObject obj(se::Object::createTypedArray(se::Object::TypedArrayType::UINT8, v.getBytes(), v.getSize()));
|
||||
ret->setObject(obj);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user