Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: Source/wtf/Int16Array.h

Issue 134663006: Update WTF classes to use OVERRIDE / FINAL when needed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 14 matching lines...) Expand all
25 25
26 #ifndef Int16Array_h 26 #ifndef Int16Array_h
27 #define Int16Array_h 27 #define Int16Array_h
28 28
29 #include "wtf/IntegralTypedArrayBase.h" 29 #include "wtf/IntegralTypedArrayBase.h"
30 30
31 namespace WTF { 31 namespace WTF {
32 32
33 class ArrayBuffer; 33 class ArrayBuffer;
34 34
35 class Int16Array : public IntegralTypedArrayBase<short> { 35 class Int16Array FINAL : public IntegralTypedArrayBase<short> {
36 public: 36 public:
37 static inline PassRefPtr<Int16Array> create(unsigned length); 37 static inline PassRefPtr<Int16Array> create(unsigned length);
38 static inline PassRefPtr<Int16Array> create(const short* array, unsigned len gth); 38 static inline PassRefPtr<Int16Array> create(const short* array, unsigned len gth);
39 static inline PassRefPtr<Int16Array> create(PassRefPtr<ArrayBuffer>, unsigne d byteOffset, unsigned length); 39 static inline PassRefPtr<Int16Array> create(PassRefPtr<ArrayBuffer>, unsigne d byteOffset, unsigned length);
40 40
41 // Should only be used when it is known the entire array will be filled. Do 41 // Should only be used when it is known the entire array will be filled. Do
42 // not return these results directly to JavaScript without filling first. 42 // not return these results directly to JavaScript without filling first.
43 static inline PassRefPtr<Int16Array> createUninitialized(unsigned length); 43 static inline PassRefPtr<Int16Array> createUninitialized(unsigned length);
44 44
45 using TypedArrayBase<short>::set; 45 using TypedArrayBase<short>::set;
46 using IntegralTypedArrayBase<short>::set; 46 using IntegralTypedArrayBase<short>::set;
47 47
48 inline PassRefPtr<Int16Array> subarray(int start) const; 48 inline PassRefPtr<Int16Array> subarray(int start) const;
49 inline PassRefPtr<Int16Array> subarray(int start, int end) const; 49 inline PassRefPtr<Int16Array> subarray(int start, int end) const;
50 50
51 virtual ViewType getType() const 51 virtual ViewType getType() const OVERRIDE
52 { 52 {
53 return TypeInt16; 53 return TypeInt16;
54 } 54 }
55 55
56 private: 56 private:
57 inline Int16Array(PassRefPtr<ArrayBuffer>, 57 inline Int16Array(PassRefPtr<ArrayBuffer>,
58 unsigned byteOffset, 58 unsigned byteOffset,
59 unsigned length); 59 unsigned length);
60 // Make constructor visible to superclass. 60 // Make constructor visible to superclass.
61 friend class TypedArrayBase<short>; 61 friend class TypedArrayBase<short>;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 PassRefPtr<Int16Array> Int16Array::subarray(int start, int end) const 94 PassRefPtr<Int16Array> Int16Array::subarray(int start, int end) const
95 { 95 {
96 return subarrayImpl<Int16Array>(start, end); 96 return subarrayImpl<Int16Array>(start, end);
97 } 97 }
98 98
99 } // namespace WTF 99 } // namespace WTF
100 100
101 using WTF::Int16Array; 101 using WTF::Int16Array;
102 102
103 #endif // Int16Array_h 103 #endif // Int16Array_h
OLDNEW
« no previous file with comments | « Source/wtf/Functional.h ('k') | Source/wtf/Int32Array.h » ('j') | Source/wtf/TypedArrayBase.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698