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

Unified Diff: third_party/WebKit/Source/wtf/IntegralTypedArrayBase.h

Issue 1611343002: wtf reformat test Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pydent Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/wtf/Int8Array.h ('k') | third_party/WebKit/Source/wtf/LeakAnnotations.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/IntegralTypedArrayBase.h
diff --git a/third_party/WebKit/Source/wtf/IntegralTypedArrayBase.h b/third_party/WebKit/Source/wtf/IntegralTypedArrayBase.h
index f5ba6141e73417c649dd1a6039930e9341a1d26c..379bc8799f05fa29c1103588a8eadfadf6e1ee1a 100644
--- a/third_party/WebKit/Source/wtf/IntegralTypedArrayBase.h
+++ b/third_party/WebKit/Source/wtf/IntegralTypedArrayBase.h
@@ -37,27 +37,27 @@ namespace WTF {
// (non-floating-point) values.
template <typename T>
class IntegralTypedArrayBase : public TypedArrayBase<T> {
-public:
- void set(unsigned index, double value)
- {
- if (index >= TypedArrayBase<T>::m_length)
- return;
- if (std::isnan(value)) // Clamp NaN to 0
- value = 0;
- // The double cast is necessary to get the correct wrapping
- // for out-of-range values with Int32Array and Uint32Array.
- TypedArrayBase<T>::data()[index] = static_cast<T>(static_cast<int64_t>(value));
- }
-
-protected:
- IntegralTypedArrayBase(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
- : TypedArrayBase<T>(buffer, byteOffset, length)
- {
- }
+ public:
+ void set(unsigned index, double value) {
+ if (index >= TypedArrayBase<T>::m_length)
+ return;
+ if (std::isnan(value)) // Clamp NaN to 0
+ value = 0;
+ // The double cast is necessary to get the correct wrapping
+ // for out-of-range values with Int32Array and Uint32Array.
+ TypedArrayBase<T>::data()[index] =
+ static_cast<T>(static_cast<int64_t>(value));
+ }
+
+ protected:
+ IntegralTypedArrayBase(PassRefPtr<ArrayBuffer> buffer,
+ unsigned byteOffset,
+ unsigned length)
+ : TypedArrayBase<T>(buffer, byteOffset, length) {}
};
-} // namespace WTF
+} // namespace WTF
using WTF::IntegralTypedArrayBase;
-#endif // IntegralTypedArrayBase_h
+#endif // IntegralTypedArrayBase_h
« no previous file with comments | « third_party/WebKit/Source/wtf/Int8Array.h ('k') | third_party/WebKit/Source/wtf/LeakAnnotations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698