buffer: remove c-style casts

pull/5010/head
Trevor Norris 2013-04-28 22:13:45 -07:00
parent fb40da822f
commit 56869d9ae7
1 changed files with 3 additions and 5 deletions

View File

@ -285,9 +285,7 @@ Handle<Value> 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<Value> Fill(const Arguments &args) {
String::AsciiValue at(args[0]);
value = (*at)[0];
} else {
value = (char)args[0]->Int32Value();
value = static_cast<char>(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();
}