File tree 1 file changed +2
-19
lines changed
1 file changed +2
-19
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,6 @@ void ArrayWrapper::New(const v8::FunctionCallbackInfo<v8::Value>& args)
243
243
try
244
244
{
245
245
ArrayWrapper* instance = nullptr ;
246
- int buffIdx = -1 ;
247
246
try
248
247
{
249
248
if (args.Length () == 0 )
@@ -261,21 +260,8 @@ void ArrayWrapper::New(const v8::FunctionCallbackInfo<v8::Value>& args)
261
260
else
262
261
{
263
262
Guard ();
264
- for (int i = 0 ; i < args.Length (); i++)
265
- {
266
- if (Buffer::HasInstance (args[i]))
267
- {
268
- buffIdx = i;
269
- break ;
270
- }
271
- }
272
-
273
- if (buffIdx == -1 )
274
- {
275
- // Creating new
276
- auto dimAndType = ParseDimAndTypeArgs (args);
277
- instance = new ArrayWrapper (new af::array (dimAndType.first , dimAndType.second ));
278
- }
263
+ auto dimAndType = ParseDimAndTypeArgs (args);
264
+ instance = new ArrayWrapper (new af::array (dimAndType.first , dimAndType.second ));
279
265
}
280
266
}
281
267
catch (...)
@@ -290,9 +276,6 @@ void ArrayWrapper::New(const v8::FunctionCallbackInfo<v8::Value>& args)
290
276
}
291
277
292
278
instance->Wrap (args.Holder ());
293
-
294
- // Set instance props: NanObjectWrapHandle(obj)->Set(NanNew(symbol), value);
295
-
296
279
NanReturnValue (args.Holder ());
297
280
}
298
281
ARRAYFIRE_CATCH
You can’t perform that action at this time.
0 commit comments