[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:
James Chen
2017-11-23 15:19:37 +08:00
committed by GitHub
parent cdad6b5868
commit 2e3883f097
3 changed files with 3 additions and 4 deletions
@@ -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;
}