Android issue (#2247)

* change window handler to uintptr_t

* fix compiling error
This commit is contained in:
minggo
2020-03-09 11:21:07 +08:00
committed by GitHub
parent 4e3270eb9e
commit fa511447e3
11 changed files with 14 additions and 14 deletions
@@ -467,9 +467,9 @@ namespace se {
return static_cast<unsigned long>(toNumber());
}
intptr_t Value::toIntptr_t() const
intptr_t Value::toUIntptr_t() const
{
return static_cast<intptr_t>(toNumber());
return static_cast<uintptr_t>(toNumber());
}
float Value::toFloat() const
@@ -316,7 +316,7 @@ namespace se {
* @brief Converts se::Value to unsigned long.
* @return intptr_t.
*/
intptr_t toIntptr_t() const;
intptr_t toUIntptr_t() const;
/**
* @brief Converts se::Value to float number.
* @return float number.
@@ -412,12 +412,12 @@ bool seval_to_Uint8Array(const se::Value& v, uint8_t* ret)
return true;
}
bool seval_to_intptr_t(const se::Value& v, intptr_t* ret)
bool seval_to_uintptr_t(const se::Value& v, uintptr_t* ret)
{
assert(ret != nullptr);
if (v.isNumber())
{
*ret = v.toIntptr_t();
*ret = v.toUIntptr_t();
return true;
}
*ret = 0UL;
@@ -111,7 +111,7 @@ bool seval_to_std_vector_uint16(const se::Value& v, std::vector<uint16_t>* ret);
bool seval_to_std_vector_float(const se::Value& v, std::vector<float>* ret);
bool seval_to_std_vector_Vec2(const se::Value& v, std::vector<cocos2d::Vec2>* ret);
bool seval_to_Uint8Array(const se::Value& v, uint8_t* ret);
bool seval_to_intptr_t(const se::Value& v, intptr_t* ret);
bool seval_to_uintptr_t(const se::Value& v, uintptr_t* ret);
bool seval_to_std_map_string_string(const se::Value& v, std::map<std::string, std::string>* ret);
bool seval_to_Data(const se::Value& v, cocos2d::Data* ret);