Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Remove unused variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Feb 23, 2012
1 parent 1b5048b commit b92a919
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
3 changes: 1 addition & 2 deletions src/node_buffer.cc
Expand Up @@ -171,11 +171,10 @@ Handle<Value> Buffer::New(const Arguments &args) {

HandleScope scope;

Buffer *buffer;
if (args[0]->IsInt32()) {
// var buffer = new Buffer(1024);
size_t length = args[0]->Uint32Value();
buffer = new Buffer(args.This(), length);
new Buffer(args.This(), length);
} else {
return ThrowException(Exception::TypeError(String::New("Bad argument")));
}
Expand Down
1 change: 0 additions & 1 deletion src/node_script.cc
Expand Up @@ -357,7 +357,6 @@ Handle<Value> WrappedScript::EvalMachine(const Arguments& args) {

} else if (context_flag == userContext) {
// Use the passed in context
Local<Object> contextArg = args[sandbox_index]->ToObject();
WrappedContext *nContext = ObjectWrap::Unwrap<WrappedContext>(sandbox);
context = nContext->GetV8Context();
}
Expand Down
5 changes: 0 additions & 5 deletions src/v8_typed_array.cc
Expand Up @@ -345,11 +345,6 @@ class TypedArray {
v8::Handle<v8::Object> obj = v8::Handle<v8::Object>::Cast(args[0]);

if (TypedArray<TBytes, TEAType>::HasInstance(obj)) { // ArrayBufferView.
v8::Handle<v8::Object> src_buffer = v8::Handle<v8::Object>::Cast(
obj->Get(v8::String::New("buffer")));
v8::Handle<v8::Object> dst_buffer = v8::Handle<v8::Object>::Cast(
args.This()->Get(v8::String::New("buffer")));

if (args[1]->Int32Value() < 0)
return ThrowRangeError("Offset may not be negative.");

Expand Down

0 comments on commit b92a919

Please sign in to comment.