Permalink
Browse files

use array initializer

  • Loading branch information...
Atsushi Takayama
Atsushi Takayama committed May 23, 2010
1 parent bc472c7 commit cdcdc2444715e7777f5b909aea7478c73a5ca6e3
Showing with 2 additions and 5 deletions.
  1. +2 −5 src/tokyocabinet.cc
View
@@ -186,17 +186,14 @@ class AsyncDataCore {
inline void
callCallback (Handle<Value> arg0) {
HandleScope scope;
- Handle<Value> args[1];
- args[0] = arg0;
+ Handle<Value> args[1] = {arg0};
callback(1, args);
}
inline void
callCallback (Handle<Value> arg0, Handle<Value>arg1) {
HandleScope scope;
- Handle<Value> args[2];
- args[0] = arg0;
- args[1] = arg1;
+ Handle<Value> args[2] = {arg0, arg1};
callback(2, args);
}
};

0 comments on commit cdcdc24

Please sign in to comment.