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

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

Issue 1218293019: Fix virtual/override/final usage in Source/wtf/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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
« no previous file with comments | « Source/wtf/FilePrintStream.h ('k') | Source/wtf/Float64Array.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 using TypedArrayBase<float>::set; 43 using TypedArrayBase<float>::set;
44 44
45 void set(unsigned index, double value) 45 void set(unsigned index, double value)
46 { 46 {
47 if (index >= TypedArrayBase<float>::m_length) 47 if (index >= TypedArrayBase<float>::m_length)
48 return; 48 return;
49 TypedArrayBase<float>::data()[index] = static_cast<float>(value); 49 TypedArrayBase<float>::data()[index] = static_cast<float>(value);
50 } 50 }
51 51
52 virtual ViewType type() const override 52 ViewType type() const override
53 { 53 {
54 return TypeFloat32; 54 return TypeFloat32;
55 } 55 }
56 56
57 private: 57 private:
58 inline Float32Array(PassRefPtr<ArrayBuffer>, 58 inline Float32Array(PassRefPtr<ArrayBuffer>,
59 unsigned byteOffset, 59 unsigned byteOffset,
60 unsigned length); 60 unsigned length);
61 // Make constructor visible to superclass. 61 // Make constructor visible to superclass.
62 friend class TypedArrayBase<float>; 62 friend class TypedArrayBase<float>;
(...skipping 22 matching lines...) Expand all
85 Float32Array::Float32Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length) 85 Float32Array::Float32Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
86 : TypedArrayBase<float>(buffer, byteOffset, length) 86 : TypedArrayBase<float>(buffer, byteOffset, length)
87 { 87 {
88 } 88 }
89 89
90 } // namespace WTF 90 } // namespace WTF
91 91
92 using WTF::Float32Array; 92 using WTF::Float32Array;
93 93
94 #endif // Float32Array_h 94 #endif // Float32Array_h
OLDNEW
« no previous file with comments | « Source/wtf/FilePrintStream.h ('k') | Source/wtf/Float64Array.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698