Skip to content

Commit d60e17a

Browse files
committed
Moved kJSTypedArrayTypeLast out of the header
1 parent 0957269 commit d60e17a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

JavaScriptCore/API/JSTypedArray.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ const JSTypedArrayType TypedArrayTypes[] = {
3939
[TypedArrayFloat64] = kJSTypedArrayTypeFloat64Array
4040
};
4141

42+
const int kJSTypedArrayTypeLast = kJSTypedArrayTypeFloat64Array;
43+
4244

4345
template <typename ArrayType>JSObject * CreateTypedArray(JSC::ExecState* exec, size_t length) {
4446
RefPtr<ArrayType> array = ArrayType::create(length);
@@ -81,7 +83,7 @@ JSValueRef JSTypedArrayMake(JSContextRef ctx, JSTypedArrayType arrayType, size_t
8183
APIEntryShim entryShim(exec);
8284

8385
JSObject* result;
84-
if( arrayType > kJSTypedArrayTypeNone && arrayType < kJSTypedArrayTypeLast ) {
86+
if( arrayType > kJSTypedArrayTypeNone && arrayType <= kJSTypedArrayTypeLast ) {
8587
result = CreateTypedArrayFunc[arrayType]( exec, numElements );
8688
}
8789

JavaScriptCore/API/JSTypedArray.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ typedef enum {
3131
kJSTypedArrayTypeUint16Array,
3232
kJSTypedArrayTypeUint32Array,
3333
kJSTypedArrayTypeFloat32Array,
34-
kJSTypedArrayTypeFloat64Array,
35-
kJSTypedArrayTypeLast
34+
kJSTypedArrayTypeFloat64Array
3635
} JSTypedArrayType;
3736

3837
/*!

0 commit comments

Comments
 (0)