mirror of
https://github.com/DoneJS-Runtime/quickjs-done-nextgen.git
synced 2025-01-09 17:43:15 +00:00
Use INT32_MAX instead of inline value
This commit is contained in:
parent
da1d3cb994
commit
5db156fb08
1 changed files with 1 additions and 1 deletions
|
@ -516,7 +516,7 @@ static js_force_inline JSValue JS_NewInt64(JSContext *ctx, int64_t val)
|
||||||
static js_force_inline JSValue JS_NewUint32(JSContext *ctx, uint32_t val)
|
static js_force_inline JSValue JS_NewUint32(JSContext *ctx, uint32_t val)
|
||||||
{
|
{
|
||||||
JSValue v;
|
JSValue v;
|
||||||
if (val <= 0x7fffffff) {
|
if (val <= INT32_MAX) {
|
||||||
v = JS_NewInt32(ctx, (int32_t)val);
|
v = JS_NewInt32(ctx, (int32_t)val);
|
||||||
} else {
|
} else {
|
||||||
v = JS_NewFloat64(ctx, (double)val);
|
v = JS_NewFloat64(ctx, (double)val);
|
||||||
|
|
Loading…
Reference in a new issue