diff options
author | Rasmus Christian Pedersen <zerhacken@yahoo.com> | 2014-09-18 14:10:53 +0200 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2014-09-29 13:47:17 -0700 |
commit | 734fb49a2af580f2d9c97a0bdd82ad3e6a1f64a2 (patch) | |
tree | 68c116dc5070485f148baef55110c7015cd57309 | |
parent | f4df80584d57904edf72c2f71f7df644ba91d2f5 (diff) | |
download | node-734fb49a2af580f2d9c97a0bdd82ad3e6a1f64a2.tar.gz |
src: fix VC++ warning C4244
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
-rw-r--r-- | src/node.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/node.cc b/src/node.cc index 2223c3698..cf8f4ccbb 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1941,7 +1941,7 @@ static void InitGroups(const FunctionCallbackInfo<Value>& args) { void Exit(const FunctionCallbackInfo<Value>& args) { Environment* env = Environment::GetCurrent(args.GetIsolate()); HandleScope scope(env->isolate()); - exit(args[0]->IntegerValue()); + exit(args[0]->Int32Value()); } @@ -1993,7 +1993,7 @@ void Kill(const FunctionCallbackInfo<Value>& args) { return env->ThrowError("Bad argument."); } - int pid = args[0]->IntegerValue(); + int pid = args[0]->Int32Value(); int sig = args[1]->Int32Value(); int err = uv_kill(pid, sig); args.GetReturnValue().Set(err); @@ -2502,7 +2502,7 @@ static void DebugPortSetter(Local<String> property, const PropertyCallbackInfo<void>& info) { Environment* env = Environment::GetCurrent(info.GetIsolate()); HandleScope scope(env->isolate()); - debug_port = value->NumberValue(); + debug_port = value->Int32Value(); } @@ -3375,7 +3375,7 @@ void Init(int* argc, int* exec_argc, const char*** exec_argv) { // Initialize prog_start_time to get relative uptime. - prog_start_time = uv_now(uv_default_loop()); + prog_start_time = static_cast<double>(uv_now(uv_default_loop())); // Make inherited handles noninheritable. uv_disable_stdio_inheritance(); @@ -3530,7 +3530,7 @@ int EmitExit(Environment* env) { process_object->Set(env->exiting_string(), True(env->isolate())); Handle<String> exitCode = env->exit_code_string(); - int code = process_object->Get(exitCode)->IntegerValue(); + int code = process_object->Get(exitCode)->Int32Value(); Local<Value> args[] = { env->exit_string(), @@ -3540,7 +3540,7 @@ int EmitExit(Environment* env) { MakeCallback(env, process_object, "emit", ARRAY_SIZE(args), args); // Reload exit code, it may be changed by `emit('exit')` - return process_object->Get(exitCode)->IntegerValue(); + return process_object->Get(exitCode)->Int32Value(); } |