From 56869d9ae7dd08138cce8442d71f070b793e2d30 Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Sun, 28 Apr 2013 22:13:45 -0700 Subject: [PATCH] buffer: remove c-style casts --- src/node_buffer.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 4c59a055c0..2e5115a239 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -285,9 +285,7 @@ Handle Copy(const Arguments &args) { target_length - target_start), obj_length - source_start); - memmove((void *)(target_data + target_start), - (const void*)(obj_data + source_start), - to_copy); + memmove(target_data + target_start, obj_data + source_start, to_copy); return scope.Close(Uint32::New(to_copy, node_isolate)); } @@ -304,12 +302,12 @@ Handle Fill(const Arguments &args) { String::AsciiValue at(args[0]); value = (*at)[0]; } else { - value = (char)args[0]->Int32Value(); + value = static_cast(args[0]->Int32Value()); } SLICE_START_END(args[1], args[2], obj_length) - memset((void*)(obj_data + start), value, length); + memset(obj_data + start, value, length); return args.This(); }