Skip to content

Commit 5ddd50e

Browse files
authored
refactor: inline expressions to reduce number of variables on stack
Signed-off-by: Athan <[email protected]>
1 parent d3741a1 commit 5ddd50e

File tree

1 file changed

+1
-9
lines changed
  • lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-of/lib

1 file changed

+1
-9
lines changed

lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-of/lib/main.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ var ndarraylike2scalar = require( '@stdlib/ndarray/base/ndarraylike2scalar' );
5959
function dlastIndexOf( arrays ) {
6060
var searchElement;
6161
var fromIndex;
62-
var stride;
63-
var offset;
64-
var idx;
6562
var N;
6663
var x;
6764

@@ -78,12 +75,7 @@ function dlastIndexOf( arrays ) {
7875
} else if ( fromIndex >= N ) {
7976
fromIndex = N - 1;
8077
}
81-
N = fromIndex + 1;
82-
stride = getStride( x, 0 );
83-
offset = getOffset( x );
84-
85-
idx = strided( N, searchElement, getData( x ), stride, offset );
86-
return idx;
78+
return strided( fromIndex+1, searchElement, getData( x ), getStride( x, 0 ), getOffset( x ) ); // eslint-disable-line max-len
8779
}
8880

8981

0 commit comments

Comments
 (0)